servers

Server Hosting Docs

MCrow
Share

This guide is for Unturned servers hosted at FangHosting, our hosting partner. If you host your server somewhere else, check your host's documentation for setting up a MySQL database.

Don't have a server yet? Plan one with our server builder. Every FangHosting Unturned plan comes with at least one MySQL database and all of our premium plugins.

  1. Log in to the FangHosting panel.
  2. Open your server and click Databases in the menu.
  3. Click New Database. The panel creates the database and a user for it straight away.

How many databases you can create depends on your plan: Basic and Starter include 1, Pro includes 2 and Elite includes 3.

In all plugins that use a MySQL database, you need to set the database connection information in the configuration file.

Open the configuration file of the plugin you want to use and look for the database connection settings. The setting names vary from plugin to plugin.

You will find everything you need on the Databases page of your server: the Endpoint (address and port), the database name, the username and the password (click the database to show it).

In plugins like Uconomy, UPets, Moderation etc. you set the address, username, password and database name separately. For example, in Uconomy you set these values in the Uconomy.configuration.xml file:

<DatabaseAddress>address-from-the-endpoint</DatabaseAddress>
<DatabaseUsername>your-database-username</DatabaseUsername>
<DatabasePassword>your-database-password</DatabasePassword>
<DatabaseName>your-database-name</DatabaseName>
<DatabaseTableName>uconomy</DatabaseTableName>
<DatabasePort>3306</DatabasePort>

Here is where each value comes from:

  • Database Address: the part of the Endpoint before the colon (:).
  • Database Port: the number after the colon in the Endpoint. It is usually 3306.
  • Database Username and Database Password: shown when you click the database on the Databases page.
  • Database Name: the name of the database you created in the previous step.
  • Database Table Name: the table the plugin stores its data in. You can name it anything, but we recommend keeping the plugin's default.

In plugins like Advanced Economy, MySQL Vault, Battlepass etc. you only set one connection string that holds all the information. For example, in Advanced Economy you set this value in the AdvancedEconomy.configuration.xml file:

<ConnectionString>Server=address-from-the-endpoint;Port=3306;Database=your-database-name;User Id=your-database-username;Password=your-database-password;</ConnectionString>

If you want to look at your data or change something by hand, you can open the database yourself:

  • phpMyAdmin, in your browser: on the Databases page, click the phpMyAdmin button next to your database. It opens in a new tab and logs you in automatically. From there you can browse the tables your plugins created and run SQL queries from the SQL tab.
  • From your PC: you can also connect with a tool like HeidiSQL, using the endpoint, username and password from the Databases page.

Need help? Ask in the FangHosting Discord or the live chat on fanghosting.com.

Skip the setup
Unturned hosting by FangHosting, with every premium plugin included.
50% off first month From $10/mo
Get a server
Need help?

If you need assistance with the documentation or have any questions, our community is here to help you: