MySQL Commands icon

MySQL Commands -----

Run any command from MySQL. Perfect for eshops, external systems, and automation.



What is MySQL Commands?
MySQL Commands is a lightweight yet powerful plugin that allows you to run any server-side command directly from your MySQL database.
It was built for use with webshops, external integrations, and custom backend systems that need to communicate with your Minecraft server in real time.


How does it work?
This plugin checks a MySQL table for new entries containing commands to be executed.
When it finds a matching row (targeted at a specific player or global), it executes the command from the console, and marks it as done = 1.

✅ Example Use Cases
  • A webshop (e.g. Tebex, own e-shop, etc.) inserts a command into MySQL → the plugin executes it when the player is online

  • External systems can reward players, assign ranks, send messages, or execute any command – all through a shared MySQL DB
⚙️ Table structure

id - Unique ID of the request
wait_for_player - 1 = wait until player is online, 0 = run anytime
for_uuid - Target player's UUID (can be null if wait_for_player = 0)
for_nick - Target player's name (can be null if wait_for_player = 0)
cmd - Command to execute via console
info - Optional info/description
done - Mark as completed ( done = 1)
done_timestamp - When it was done
timestamp - When the row was created


Configuration options (config.yml)
check-interval: 5 - Interval (in seconds) to check DB for new commands
check-player-by: "UUID" - "UUID" or "NAME" – how to match the player


Commands and permissions
  • /mysqlcmds reload | Reloads config file
    Permission: mysqlcmds.reload
  • /mysqlcmds notify | Toggles in-game notifications about executed cmds (for debug/admins)
    Permission: mysqlcmds.notify



Why use this plugin?
✅ Decouples command control from Minecraft
✅ Ideal for e-commerce / payment gateways
✅ UUID or Name-based execution
✅ Works with offline or online players
✅ Logs executions with timestamps
✅ Lightweight & easy to configure

Before its done:
[​IMG]

After command execution:
[​IMG]

Notify message (/mysqlcmds notify)
[​IMG]

Create table:
Code (Text):
CREATE TABLE `mysql_cmds` (
  `id` int NOT NULL AUTO_INCREMENT,
  `wait_for_player` tinyint(1) NOT NULL DEFAULT '0',
  `for_uuid` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `for_nick` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `cmd` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `done` tinyint(1) NOT NULL DEFAULT '0',
  `done_timestamp` timestamp NULL DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
)
Add row:
Code (Text):
INSERT INTO `mysql_cmds` (`id`, `wait_for_player`, `for_uuid`, `for_nick`, `cmd`, `info`, `done`, `done_timestamp`, `timestamp`) VALUES (NULL, '1', '03dea68f-c6ea-462c-91ad-cd56b4dbbb01', 'Dj_Nejk', 'lp user Dj_Nejk parent set vip', 'Set VIP rank', '0', NULL, CURRENT_TIMESTAMP);

Code (Text):

# ︽︽ If any new settings are added in future updates, they will appear at the top of the configuration file automatically. ︽︽
config-version: 1.2
debug: false
# /$$      /$$            /$$$$$$   /$$$$$$  /$$              /$$$$$$                                                                  /$$
#| $$$    /$$$           /$$__  $$ /$$__  $$| $$             /$$__  $$                                                                | $$
#| $$$$  /$$$$ /$$   /$$| $$  \__/| $$  \ $$| $$            | $$  \__/  /$$$$$$  /$$$$$$/$$$$  /$$$$$$/$$$$   /$$$$$$  /$$$$$$$   /$$$$$$$  /$$$$$$$
#| $$ $$/$$ $$| $$  | $$|  $$$$$$ | $$  | $$| $$            | $$       /$$__  $$| $$_  $$_  $$| $$_  $$_  $$ |____  $$| $$__  $$ /$$__  $$ /$$_____/
#| $$  $$$| $$| $$  | $$ \____  $$| $$  | $$| $$            | $$      | $$  \ $$| $$ \ $$ \ $$| $$ \ $$ \ $$  /$$$$$$$| $$  \ $$| $$  | $$|  $$$$$$
#| $$\  $ | $$| $$  | $$ /$$  \ $$| $$/$$ $$| $$            | $$    $$| $$  | $$| $$ | $$ | $$| $$ | $$ | $$ /$$__  $$| $$  | $$| $$  | $$ \____  $$
#| $$ \/  | $$|  $$$$$$$|  $$$$$$/|  $$$$$$/| $$$$$$$$      |  $$$$$$/|  $$$$$$/| $$ | $$ | $$| $$ | $$ | $$|  $$$$$$$| $$  | $$|  $$$$$$$ /$$$$$$$/
#|__/     |__/ \____  $$ \______/  \____ $$$|________/       \______/  \______/ |__/ |__/ |__/|__/ |__/ |__/ \_______/|__/  |__/ \_______/|_______/
#              /$$  | $$                \__/
#             |  $$$$$$/
#              \______/
# MySQL Commands plugin by DjDevs.eu (@djnejk)


##############################################
# MySQL database connection creditals:
mysql:
  host: "localhost"
  port: 3306
  database: "minecraft"
  username: "root"
  password: "password"
  table-name: "mysql_cmds"
##############################################




##############################################
# Checking interval for incoming commands:
check-interval: 5  # (Every 5 second)
##############################################


##############################################
# Checking incoming rows in DB for user by UUID or his Name:
check-player-by: "UUID"  # (UUID/NAME)
##############################################




##############################################
# Messages:

# Prefix using placeholder {prefix}
prefix: "&8[&4&l{#55ff55}M{#55ff80}y{#55ffaa}S{#55ffd5}Q{#55ffff}L{#ffffff}C{#e3e3e3}m{#c6c6c6}d{#aaaaaa}s&8]"

reload-message: "{prefix} &8» &a✅ MySQL Commands plugin has been reloaded."
nopermission-message: "{prefix} &8» &c❌ You don't have permission."
reload-use-message: "{prefix} &8» &7Usage: &f/mysqlcmds reload"
notify-use-message: "{prefix} &8» &7Usage: &f/mysqlcmds notify"

notify-message: "{prefix} &8» &7Command executed for player &f{player}&7:\n&f{plaincmd}\n&7 " # (Placeholders: {player} - player name, {uuid} - player uuid, {cmd} - command, {plaincmd} - command in plain text => things like &, {#00ff00}, ... will be displayed)
notify-console-message: "Command executed for player {player}: {plaincmd}" # (Placeholders: {player} - player name, {uuid} - player uuid, {plaincmd} - command in plain text => things like &, {#00ff00}, ... will be displayed)
notify-enable: "{prefix} &8» &7Notifications have been &2enabled&7."
notify-disable: "{prefix} &8» &7Notifications have been &4disabled&7."
##############################################




##############################################
# List (local database) of players who receive notifications using /mysqlcmds notify
notify-users: []

##############################################
 


Minecraft servers using this plugin

play.aestros.cz
[​IMG]
Resource Information
Author:
----------
Total Downloads: 29
First Release: Apr 7, 2025
Last Update: Apr 7, 2025
Category: ---------------
All-Time Rating:
1 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings