Create a MySQL database for a plugin
My plugin needs MySQL. How do I get a database?
Create one in the Databases tab and copy its host, port, name, username and password into the plugin's config.
Before you start: The plugin installed, and its config file open in Files.
Step by step
- Open Databases and create a new database. Give it a name like luckperms.
- Click it to see the host (address), port, database name, username and password.
- Open the plugin config (for example plugins/LuckPerms/config.yml) and set the storage method to MySQL.
- Fill in address as host:port, database, username and password exactly.
- Save the config file and restart the server (a plugin reload is not enough for a storage change).
- Watch the console for "connected" or a database error; a wrong password or host shows here.
Check it worked: The console shows the plugin connected to the database without errors.
Why it happens: Plugins such as LuckPerms, CoreProtect or shops can store data in MySQL, which several servers can share.
More guides on Control panel and server setup: