Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

MySQL setup guide

ZachZach Administrator
edited August 2014 in Tutorials
MySQL is a powerful database system that many applications are using. (Even the forums use it to store data!)
You may come past a plugin or mod you would like to install, but requires a MySQL database to run, luckily for you, Ausfrag offers free web hosting for any game server clients!

How do I get the hosting account?

Easy! Navigate to the main Ausfrag site and click "Web hosting". Once on that page select the "Freebie" plan. After that it will ask you to enter your email address to confirm you have an active game server with Ausfrag. If you do, you will be taken to the signup process, simply fill in those details and you'll be automatically set up with an account.

You will receive confirmation emails including your login details.

Setting up the database:

Navigate to http://ausfrag.net:2082/ and login with your cPanel details. (That you received in the email)

One logged in, scroll down to where it has "Databases" and click on "MySQL databases".

PFlNhdk.png

Create a new database:

bF0JHmi.png

Now that you've got your database, you need to create a new user to add to that database:

eZtMPOS.png

Adding the user to your database:

oa9avMe.png

After doing that it will ask you to set the permissions for the user. If you intend on using this for a plugin or mod (and of course intend to keep the login details secure) just grant all permissions.

gHp9yFi.png

Allow your server to access the database:

An awesome security feature of MySQL allows you to set IP whitelists for databases, meaning you can prevent people with malicious intends from ever getting a MySQL connection to the database.

To do some, navigate back the cPanel homepage, but instead click "Remote MySQL".
Add the access host '203.33.121.%'. This ensures that only servers from inside the Ausfrag network (your server) can access your databases.

sdonW6v.png

Plugin/mod configuration:

Using an FTP client (preferable, see guide HERE) log into your server and navigate to the plugins data folder. The configuration file for the plugin will likely be called "config.yml". Edit this file.

When in the file, look for something that says "MySQL". It will likely look like something similar to this:

C55snxG.png

After filling in those details correctly and saving the file, restart your server and the database connection should be successful! You may now enjoy the benefits that your MySQL enabled plugins offer!

If you require further assistance, feel free to jump onto IRC and ask for help or open a support ticket!

Comments

  • I agree with your thought.Thank you for your sharing.
    ________________________________________________________________
    Pursue your object, be it what it will, steadily and indefatigably.
    china-safetywear. com | fifassd. com | fujihd. net
Sign In or Register to comment.