Applicable to:
- Plesk for Linux
Symptoms
-
When creating a database, modifying a database user settings or installing WordPress in Plesk, the operation fails with one of the the following error messages:
PLESK_ERROR: 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.
PLESK_ERROR: Column count of mysql.user is wrong. Expected 45, found 48. The table is probably corrupted
-
A Plesk backup task finishes with the warning:
PLESK_INFO: Warning: mysql "db_example"
Not all the data was backed up into /path/to/db_example 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) - Routines (stored procedures and functions) are not displayed in phpMyAdmin.
Cause
Some tables in the mysql database have incorrect schema.
Resolution
-
Connect to the server via SSH.
-
Upgrade the mysql database:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin -T --debug-check mysql
Comments
2 comments
After entering 2 commands above, i encountered following error:
mysql_upgrade: [ERROR] unknown variable 'forceMYSQL_PWD=$AES-128 .............
-------------------------------------------------------------------------------------------------------------------------------
I still have the problem:
@David
Hello!
The error is caused by incorrect syntax in MySQL configuration. MySQL is unable to recognize the variable "forceMYSQL_PWD".
Also, please, note that variable "MYSQL_PWD" is considered as insecure.
Please sign in to leave a comment.