How to use a MySQL Database with plugins
DedicatedMC offers free databases to use with your plugins! This guide offers some basic instructions to get you started!
Please review our Terms Of Service and Fair Usage policy before creating a database with DedicatedMC.
Misuse of our Database system will result in your database being deleted and potentially being prohibited from using any DedicatedMC databases in the future.
Prerequisites
- Ensure you have a database created for the plugin you want to use it with.
- Make sure the plugin you want to use supports MySQL or MariaDB databases.
Don't have a database yet? Create one following this guide.
Guide
For this guide, we will be using LuckPerms as an example.
These instructions should generally work for any plugins that support databases.
For more detailed instructions on how to connect a specific plugin to a database, please consult the documentation of that plugin.
1. Navigate to your plugin's config file and open it. Usually it's inside a folder named after the plugin, under the plugins
folder. For example: plugins/LuckPerms
2. Configure your plugin to use databases to save its data, for LuckPerms this is the storage-method
option. Set the option to mariadb
.
If your plugin doesn't support MariaDB, then set the option to mysql
.
3. Now configure the plugin to use your database.address
- The address of your database (usually in the following format host:port
).database
- The name of the database the plugin will use.username
- The username to connect with.password
- The password to connect with.
All the information above can be found on the Panel when viewing your Database.
4. (ONLY IF USING MySQL INSTEAD OF MariaDB)
You will need to disable SSL mode if your plugin does not support the MariaDB driver. This option can usually be found under database settings
or properties
.
Sometimes it may need to be added at the end of the connection string as ?useSSL=false
or &useSSL=false
, check with the plugin author for the proper way to disable SSL mode.
5. Verify the details you added are correct and save the config file.
6. Restart your server!
If no errors appear on the console about connecting to MariaDB/MySQL then you are all good to go, otherwise do not hesitate to contact us!