Skip to content

Database Setup

In this guide, I will explain how to install MariaDB in combination with HeidiSQL to manage your server’s database.

  • Download MariaDB from the official website.
  • Select MariaDB Server Version 11.4.4.
  • Select “Windows” as “Operating System”.
  • Leave the “mirror” default.
  • Press “Download”.

Now that we have installed the MSI file, it’s time to install the application.

  • Run the MSI file.
  • Press “Next”.
  • Tick the box for License Agreement and press “Next”.
  • Leave the settings default, press “Next”.
  • You can either choose to untick the box to continue without a password or create a password—that’s up to you. If you have done that, press “Next” again.
  • Leave all the settings default and press “Next”.
  • Press “Install”.
  • If your computer asks, “Do you want this app to make changes to your device?” click “Yes”.
  • Once that is done, you should be able to click “Finish”.
  • To make sure that MariaDB is properly installed, we will go to services.msc and look for “MariaDB”.
  • If you followed all these steps, MariaDB should be present in the services.

HeidiSQL is used to view and manage the database.

  • Download HeidiSQL from the official website.
  • Click “Installer, 32/64 bit combined”.
  • Save the executable (.exe) to your download location and press “Save”.
  • Open the .exe file we just installed.
  • Select the option for “I accept the agreement” and press “Next”.
  • Leave the destination location default and press “Next”.
  • Press “Next” again on the “Select Start Menu Folder” option.
  • For “Select Additional Tasks”, you can decide what options you want to turn on. Press “Next” again.
  • Press “Install”.
  • Click “Finish”.

Connect to the server and create a database

Section titled “Connect to the server and create a database”
  • Open HeidiSQL once the installation is complete.
  • In the bottom left, click on “New”.
  • Now enter the connection details as follows:
    • Hostname / IP: If you installed MariaDB on the same machine as HeidiSQL, leave it as 127.0.0.1. If not, enter the public IP of the machine where MariaDB is installed (Port Forwarding needed). Click here to learn how to port forward.
    • User: Leave as root.
  • Press “Open”.
  • Right-click the server in the top left (usually Unnamed) and press “Create new -> Database”.
  • Enter the name of the database and press “OK”.
  • Open your server.cfg file.
  • Add one of the following lines to the file (above ensure oxmysql):
Terminal window
set mysql_connection_string "mysql://root:PASSWORD@localhost:3306/DATABASE_NAME"