Back to the category
Game Servers & OuiPanel
53 guides
Game Servers & OuiPanelPublished on February 6, 20262 min read

How to create a MySQL user and database

A OuiHeberg MySQL plan gives you a standalone MariaDB database server, managed in OuiPanel, the OuiHeberg game panel. This guide shows how to start it, create an admin user and a first database from the console, then connect to it remotely. For the database included with a game server or a bot, follow How to create and manage a MySQL database on OuiPanel instead.


Open your MySQL server in OuiPanel

  1. Log in to OuiPanel at dash.ouipanel.com with your credentials.

  2. In the left menu, click My servers.

  3. On your MySQL server's row, click Manage Server.

The server console opens.

My servers page listing the servers with their Manage Server buttons


Start the server

If the console shows "The server is off" and the "Offline" state, the MySQL server is stopped.

  1. Click Start the server in the middle of the console, or Start in the statistics block.

  2. Wait until the state changes to "Running".


Create a MySQL admin user

The OuiPanel console is already connected to MySQL as an administrator. You type SQL queries straight into it.

  1. Click the command field below the console.

  2. Paste the query, then click Send.

  3. Repeat for each query below, in order.

Create a new admin user

Replace admin_user and strong_password with the username you want and a secure password.

CREATE USER 'admin_user'@'%' IDENTIFIED BY 'strong_password';

Grant all privileges to the admin user

GRANT ALL PRIVILEGES ON *.* TO 'admin_user'@'%' WITH GRANT OPTION;

Apply the privilege changes

FLUSH PRIVILEGES;

The % host lets this user connect from any address. That is what allows remote access, so pick a long, unique password.


Create a database

With the admin user in place, create your first database from the same console.

Create a new database

Replace my_database with the name of your database.

CREATE DATABASE my_database;

Check that the database exists

SHOW DATABASES;

The console lists the databases. Yours should be among them.


Manage your databases remotely

Your database is ready. You can manage databases and users with standard MySQL commands in the console, or with a database management tool.

  • HeidiSQL is a management tool for Windows, well suited to MySQL and MariaDB databases. You can download it from its website.

To connect with a tool like this:

  1. In your server's console, note the address shown under Connection Information. It looks like address:port.

  2. In the tool, enter the part before the colon as the host and the part after it as the port.

  3. Use the admin user and password you created above.


Need help?

Open a ticket from Tickets › Open a Ticket, or from the Contact support tile at the bottom of your server's page in the client area. You can also ask your question on the OuiHeberg Discord.

Was this article helpful?

384 views
Share this article

Related Articles