How to install another MySQL version in ISPmanager

The main database server is installed with the panel (MariaDB on Ubuntu). If a site needs another version — for example MySQL 8.0 or an old MariaDB 10.x — you can install it alongside. Alternative servers run in Docker.

Database servers
Database servers

Install another version

  1. Install Docker: Software configuration → Docker.
  2. "Navigation board" → "Database servers" → "Create a server".
  3. Choose the version in the "Action" list. The list has a search: start typing, for example, MySQL 8.
New database server
New database server
Choosing a version: MySQL 5.5–9.0, MariaDB 10.0–11.4, Percona
Choosing a version: MySQL 5.5–9.0, MariaDB 10.0–11.4, Percona
  1. The server name is filled in. Set the root password for the new server.
  2. Click "Create".
Password and creation
Password and creation

The panel downloads the image and starts the container. It takes a few minutes. The new server appears in the list with its own port, for example 127.0.0.1:3310.

MySQL 8.0 next to the main server
MySQL 8.0 next to the main server

A database on the required version

When creating a database, choose the server in the "Database server" field. Users can do this too.

Database on the mysql-8.0 server
Database on the mysql-8.0 server

In the site settings for such a database specify the host with the port: 127.0.0.1:3310 (the port is in the server list). localhost leads to the main server.

Server settings (my.cnf)

Select the server → "Database server settings". The list of parameters: max_connections, innodb_buffer_pool_size, character sets and others. Changed ones are marked "Modified".

"Database server settings" button
"Database server settings" button
MySQL server parameters
MySQL server parameters

Remote access to a database

"Remote access" in the server settings opens connections to MySQL from outside. Then you can set for a database user which addresses it connects from. Open access only for your own IPs — see Firewall.

Moving a database to the main server is a separate guide: Moving a database from Docker.

Move a database from an alternative server to the main one

  1. Create a new database on the main server.
  2. Dump the old database: database export.
  3. Load the dump into the new database: database import.
  4. In the site config change the host to localhost, the database name, user and password.
  5. Check the site and delete the old database.

Loading a dump into a container database over SSH as root: docker exec -i mysql-8.0 mysql -uroot -p shop_db < dump.sql.

Questions and answers
If a site or CMS does not work with the main version, for example it needs MySQL 5.7 or 8.0. Other sites are fine with the main server.
The site config needs the host with the port, for example 127.0.0.1:3310. localhost leads to the main server.
"Navigation board" → "Database servers", the "Server address" column.