Switch from SQLite to MySQL as DBMS
Switching from SQLite to MySQL as a DBMS for storing the ispmanager 6 lite/pro/host panel database can be performed starting from version 6.79.0. Using SQLite is a convenient solution for small data volumes and low system load. However, in case ispmanager has a large number of users and receives a significant number of competitive queries, it is recommended to switch to MySQL DBMS.
Database conversion from SQLite to MySQL can be performed using a special script. First, you need to download the script and run it using the following command:
wget https://download.ispmanager.com/tools/sqlite-to-mysql.sh && sh sqlite-to-mysql.sh
The script performs the following actions:
1. Installs MySQL and the SQLite console client if they have not been previously installed.
2. Creates MySQL database and user for the ispmanager panel.
3. Creates a /usr/local/mgr5/etc/ispmgr.conf.d/db.conf configuration file with connection data for the new MySQL database.
4. Creates table dumps from SQLite database and restarts ispmanager panel.
5. The panel will automatically restore data from dumps to the new MySQL database.
Возможные проблемы и их решения:
1. "Convertation is not supported for ispmgrnode DB!" - This message means that the conversion script does not support working with the ispmanager business database. It is intended for ispmanager lite/pro/host only.
2. "MySQL database 'ispmgr' already exist" - This indicates that the database named 'ispmgr' already exists in MySQL. In this case, you should delete it and try the conversion again.
3. "Failed to create MySQL database" - If you cannot create a MySQL database, make sure that the MySQL server is running and that you can connect to it from the root console without using a password.
4. "Failed to restore dump. Return to SQLite" - If an error occurs when restoring data from a dump, you need to contact ispmanager technical support and provide the logs of the requests that caused the error.