/
/
DBMS in ispmanager 6

DBMS in ispmanager 6

Why?

To gain a deeper understanding of the installed DBMS on the server and how to work with it from the panel and console.

Instructions

DBMS version check

Lite, pro and host versions

In the panel's main menu, go to the "Databases" section. In a newly opened tab, click the "Database servers" button.

 

The version of the native DBMS installed on the server can be found in the "MySQL" row, in the "Version" column.

 

PLEASE NOTE!

A native DBMS is installed from the operating system repositories as part of the panel installation process. The control panel works exclusively with the native DBMS.

This section also contains information about the alternative DBMS versions that have been installed, including the type of DBMS, its address, connection port, and the version.

In the server's console

To find out the version of the native DBMS via the console, please connect to the server via SSH and run the following commands:

  • mysql --version - to display the version of the client part of the DBMS;
  • mysql -e 'SHOW VARIABLES LIKE "%version%";' - to display the version of the server part of the DBMS;

PLEASE NOTE!

The functionality of the control panel is tested exclusively with the native DBMS for each of the supported operating systems. We advise against changing the native DBMS or its version, as this may lead to incorrect panel operation.

To find out data on alternative versions via the console, the following Docker command must be executed:

docker ps –all

This command will output the complete list of containers, including the type of DBMS, its address, connection port, and the version.

PLEASE NOTE!

When a new alternative DBMS is created, the assigned port will be increased by 1.

Once an alternative database server has been deleted, the port it occupied is released, but it remains recorded in the panel database. This is necessary so that the administrator has the ability to connect a previously disabled DBMS with the same settings.

Working with a database dump

Please be cautious when working with database dumps. Once imported, the current database data will be replaced by the data from the dump.

Save the current data before importing if you need it for further work, to ensure the integrity of your data.

Lite, pro and host versions

To upload or download a database dump, go to the "Databases" section. Select the desired database and click the "Dump" button.

 

For more information on working with dumps in the panel's web interface, please refer to our documentation.

In the server's console

The export and import of the dump via the console is performed using the "mysqldump" utility.

  • mysqldump <database-name> > <path-to-the-dump> - to export (create) a database dump;
  • mysqldump <database-name> < <path-to-the-dump> - to import a database dump.

For example, to import a previously created dump at /root/backup/mydb.sql into a database named my-database, run the following command:

mysqldump my-database < /root/backup/mydb.sql

To export from the my-database database to a file at /root/backup/mydb.sql, run the following command:

mysqldump my-database > /root/backup/mydb.sql

 

The export and import of alternative database dumps is performed by calling the "mysqldump" utility inside a Docker container.

  • docker exec <container-id-or-name> /usr/bin/mysqldump <database-name> > <path-to-the-dump> - to export a dump;
  • cat <path-to-the-dump> | docker exec -i <container-id-or-name> /usr/bin/mysql <database-name> -  to import a dump;

For example, to import a previously created dump at /root/backup/myaltdb.sql into a database named my-alt-database in a container running MariaDB 10.11, execute the following command:

cat /root/backup/myaltdb.sql | docker exec -i mariadb-10.11 /usr/bin/mysql my-alt-database

To export a dump to a file at /root/backup/myaltdb.sql from a database named my-alt-database in a container running MariaDB 10.11, execute the following command:

docker exec mariadb-10.11 /usr/bin/mysqldump my-alt-database > /root/backup/myaltdb.sql