MIDAS Knowledge Base MIDAS Knowledge Base

How to manually create a new MySQL/MariaDB Database

Before you install your self-hosted MIDAS scheduling system, you will need to create a blank MySQL or MariaDB database on your server. The following instructions describe how to manually create a database from the command line.

If your server runs cPanel, follow our How to create a database in cPanel instead, otherwise carry on reading...

Note: Text in red below denotes details you may need to modify for your particular server setup.


Step 1: Login to your database server

From your server's command line, login to your MySQL/MariaDB server by executing the following command:

$ mysql -u root

NOTE: If you're running MySQL on a Windows machine, you can skip this step and access the MySQL command line via the "MySQL Command Line Client" shortcut in your Start Menu → Programs → MySQL folder instead.


Step 2: Create a Database

Enter a desired name for your MIDAS database:

mysql> CREATE DATABASE `MIDAS`;

NOTE: You will need the name of this database when installing MIDAS - also, please note that MySQL queries outlined here may contain "backtick" characters ( ` ) which are not the same as regular apostrophes ( ' )


Step 3: Create a User

Once you've created a database, create a new MySQL user:

mysql> CREATE USER `username`@`localhost` IDENTIFIED BY 'password';

NOTE: You will need this username/password when installing MIDAS

If your MySQL and Web Server reside on separate hardware to each other, you will need to substitute localhost in the above code to reflect the IP/domain of your web server. If unsure of your web server's IP/domain, you can substitute localhost for %, which will accept incoming connections from any host, however for security this is not recommended, and you should always endeavor to use localhost or the IP/domain name of your web server instead.


Step 4: Assign The User To The Database & Set User Privileges

Once you've created a database and a MySQL user, you will need to associate the user with the database and grant the necessary privileges:

mysql> GRANT ALTER, CREATE, DELETE, DROP, INSERT, LOCK TABLES, SELECT, UPDATE ON `MIDAS`.* TO `username`@`localhost`;


Step 5: Flush Privileges

Finally, to ensure that the privileges you set in the previous step are applied, issue the following command:

mysql> FLUSH PRIVILEGES;


Once you've set up your MySQL database, you're ready to install MIDAS



You might also be interested in...


MIDAS » KB » Support » Article 00111

← Return to the Knowledge Base