1

MySQL Help

ImJohn 5/12/14 3:10 pm
151
5/14/2014 1:42 pm
Hello everyone! I'm creating a plugin that I believe will require a MySQL. I have two questions for all of you:

1.) How do I connect a minecraft server to one.
2.) How do I bind a plugin to one.
3.) Is it possible to connect two minecraft servers to one database.
4.) Is it possible to connect one minecraft server to multiple MySQL databases.

Kudos to anyone who answers them!
Posted by
ImJohn
Level 36 : Artisan Pixel Painter
19

  Have something to say?

JoinSign in

2

DtigerCSK
05/12/2014 7:28 pm
Level 34 : Artisan Pokémon
1) If you are using a game server provider, they should provide you with one already. If you are using multicraft, it should be under advanced > MySQL database.
If you are using a VPS/dedicated server with linux (may differ between distros, this is primarily for Ubuntu)
Click to reveal
sudo apt-get install mysql-server
Input password you want.

Login to MySQL shell:
mysql -u root -p

Input password previously set, then create a database called "minecraft," or whatever you want.
create database minecraft;
exit

For this, you would connect to it by host: localhost, username as root, password as previously set, then database minecraft, or whatever you chose.

2) Plugins connect to databases, you can connect with information in your Multicraft panel, or with the instructions above.
3) You can connect 2 minecraft servers to one database, just fill in the same information and if needed, allow the (external) IP access.
4) There isn't really much point to doing this, but you can do this with separate plugins. Just create new databases and fill out configurations respectively. Different things usually use different prefixes so using the same database shouldn't be a problem.
If you are using a game server provider, they will most likely not let you have multiple databases.
1
ImJohn
05/14/2014 1:42 pm
Level 36 : Artisan Pixel Painter
Thank you.
1

Welcome