This guide will step you through configuring MySQL or MariaDB for use with SafeConsole.


Configuring MySQL for SafeConsole

Please note:

  • Currently supported on the latest version of MySQL 5.7 (5.7.37)

  • MySQL 8 is currently NOT supported.


MySQL Pre-Config using MySQL Shell

1) Open MySQL Shell

2) switch to SQL > \sql



3) Connect to SQL DB as root > \c root@localhost:3306



4) Create the Safeconsole Database > CREATE DATABASE safeconsole



5) Create User for safeconsole DB(recommended to not use root) > CREATE USER username@localhost IDENTIFIED BY 'password';


Note:

- The password will need to be placed in the italicized space between ' ' when entering the password.

- If connecting to a separate server, your username will be “username@ipaddress” where the Ip address is the server where your Safeconsole installation resides.



6) Grant all privileges for the new user on the Safeconsole Database > GRANT ALL ON safeconsole.* TO username@localhost;



7) Exit MySQL Shell

8) In the Safeconsole Configurator on the Database Settings screen, please fill in the appropriate information about the database you have just created. 


Note:

Make sure to select MySQL as your Database Type.

- Port 3306 is the default MySQL port.


9) Finally, test your connection. If configured correctly you will see a successful test connection and can proceed to the end of the configurator.


Command Reference (In Order)


\sql


\c root@localhost:3306


CREATE DATABASE safeconsole;


CREATE USER safeconsole@localhost IDENTIFIED BY 'inputpassword';


GRANT ALL ON safeconsole.* TO safeconsole@localhost;



Note: You do not have to specify tables for the schema as the configuration tool will perform this.

Note: We do not recommend using root for the safeconsole database. We recommend creating a separate user (safeconsole@localhost or safeconsole@ipaddressofsqlserver if not hosted on the same server as Safeconsole)




Configuring MariaDB for SafeConsole

  • Currently supported on the latest version of MariaDB. (10.7.3)

  • If MariaDB is using MySQL 8 this is currently NOT supported.


MariaDB Pre-Config

Using MySQL Shell: 

You can utilize the MySQL shell to interact with a MariaDB instance if preferred. The commands will be the same as were used in the MySQL Pre-Config section above.


Using HeidiSQL:

MariaDB uses HeidiSQL for its workbench functionality by default. Follow the below steps to set up your database using the HeidiSQL workbench.


1) Click "New" -> Fill in the appropriate connection settings and login information for your local database.

Please note: Make sure to select the “libmysql.dll” Library*


2) Click "Open".



2) Right-Click in the left pane -> Click "Create new" -> Click "Database".



3) Input your desired database name and click "OK".



4) Next, click “Tools” and the top then “User Manager”


5) Add a new user and input the information




6) Press “Add Object” and select the safeconsole database.

 



7) Check the checkbox for the safeconsole database and click “Save”.



8) Exit the HeidiSQL workbench.

9) On page 3 of the SafeConsole Configurator fill in the appropriate information about the database you have just created.

Note: 

  • MariaDB uses MySQL for its database. As a result, please select MySQL as the Database Type.
  • Port 3306 is the default MariaDB port.



10) Finally, test your connection. If configured correctly you will see a successful test connection and can proceed to the end of the configurator.


Note:

  •  You do not have to specify tables for the schema as the configuration tool will perform this.
  • We do not recommend using root for the SafeConsole database. We recommend creating a separate user (safeconsole@localhost or safeconsole@ipaddressofsqlserver if not hosted on the same server as Safeconsole)