What's new
  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Connect Multicraft Database to a plugin

AssistanceHub

Administrator
Staff member
Joined
Mar 3, 2018
Messages
9
Likes
0
Points
1
#1
Connect to a database
This is a lot simpler than you might think. If you have read the thread on the Advanced Tab, you will know how to create the database itself.

Database.PNG

In this thread, i will be using the plugin CoreProtect as an example. Below is the default MySQL portion of the config. it only takes a few minor edits to make it functional.
Code:
use-mysql: false
table-prefix: co_
mysql-host: 127.0.0.1
mysql-port: 3306
mysql-database: database
mysql-username: root
mysql-password:
use-mysql: Change this to true
table-prefix: This will normally have a value set, do not change unless you know what you are doing.
mysql-host: This will be a numerical IP, in most cases the IP of your server. In the example image, it would be 000.00.000.00
mysql-port:
Leave this as is, most cases it will be the defualt value. If none is set, it is the following. default: 3306
mysql-database:
Just take what is in the "Name" section to find this out.
mysql-username: This will be easy to find, it is just the "Username" section of the database information.
mysql-password: It might be best to copy and paste the password, just be sure you get it all.

Once all the information is entered and checked that it is all correct, save and upload. Then restart your server. Upon startup, you will see in the console that the plugin is connecting to the database, and creating the tables.

Overall, creating and connecting to the database should take no longer than 10 minutes. If you struggle with any steps, feel free to ask someone who may know more.