- Plesk for Linux
Plesk upgrade fails with a similar to the below error message:
CONFIG_TEXT: ERROR while trying to upgrade APSC SQL database from 11.1.0
Check the error reason(see log file: /var/log/plesk/install/plesk_XX.X.XX_repair.log), fix and try again
In the mentioned above error logfile, the following error message appears:
CONFIG_TEXT: ERROR 1558 (HY000) at line 67: Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50095, now running 50538. Please use mysql_upgrade to fix this error.
It is not possible to create a database in Plesk or install WordPress with the error message below. In some cases, other actions may lead to the same error, e.g., WordPress installation, new PHP handler installation, password reset:
PLESK_INFO: Connection to the database server failed: Column count of mysql.user is wrong. Expected 42, found 39. Created with MySQL 50173, now running 50556. Please use mysql_upgrade to fix this error.
Unable to create a database user or database or reconnect a database server at Tools & Settings > Database servers > db_server > OK:
PLESK_ERROR: Column count of mysql.user is wrong. Expected 45, found 48. The table is probably corrupted
Plesk backup finishes with warnings:
PLESK_INFO: Warning: mysql "db_example"
Not all the data was backed up into /var/lib/psa/dumps/domains/example.com/databases/db_example_1 successfully. Total space: 200.00 GB; Available space: 150.00 GB; Mounted on: /. mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'db_example'': Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100134, now running 100313. Please use mysql_upgrade to fix this error (1558)
mysql.user table has an incorrect schema.
Connect to the server via SSH.
For security reasons, create a backup of the
Note: This step is not required if you have a full server backup/snapshot to restore.
2.1. Stop the MySQL server (The command depends on OS and installed MySQL server):
# service mysqld stop
# service mysql stop
# service mariadb stop
2.2. Copy the directory (Make sure that there is enough disk space on the server using the command
# cp -rp /var/lib/mysql/ /root/
2.3. Start the MySQL server:
# service mysqld start
# service mysql start
# service mariadb start
Upgrade MySQL databases:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` /usr/bin/mysql_upgrade -uadmin --force