Symptoms
- Plesk upgrade fails with the following error:
ERROR while trying to upgrade APSC SQL database from 11.1.0
- The following error can be found in
/tmp/plesk_11.5.30_installation.log
or/tmp/autoinstaller3.log
file:ERROR 1548 (HY000) at line 67: Cannot load from mysql.proc. The table is probably corrupted
- Attempt to drop a procedure (even if it does not exist) fails:
mysql> DROP PROCEDURE IF EXISTS test1234; ERROR 1548 (HY000): Cannot load from mysql.proc. The table is probably corrupted
- In
/var/log/mysqld.log
the following errors can be found:# grep ERROR /var/log/mysqld.log [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it ..... [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure ..... [ERROR] Incorrect definition of table mysql.proc: expected column 'comment' at position 15 to have type text, found type char(64).
Cause
The structure of the mysql
tables is incorrect or has not been upgraded.
Resolution
- Make sure
mysql
database is not corrupted with themysqlcheck
command:# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqlcheck -uadmin mysql mysql.columns_priv OK mysql.db OK ..... mysql.time_zone_transition_type OK mysql.user OK
- Repair the table if necessary:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin mysql -Ne"REPAIR TABLE mysql.proc" +------------+--------+----------+----------+ | Table | Op | Msg_type | Msg_text | +------------+--------+----------+----------+ | mysql.proc | repair | status | OK | +------------+--------+----------+----------+
- Change the type of
proc.comment
row as below:# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin mysql -Ne"alter table proc change comment comment text" Query OK, 0 rows affected (0.01 sec)Records: 0 Duplicates: 0 Warnings: 0
- Upgrade MySQL server:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -u admin Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck Running 'mysqlcheck with default connection arguments Running 'mysqlcheck with default connection arguments apsc.aps_application OK apsc.aps_application_backup OK .... mysql.columns_priv OK mysql.db OK .... psa.Configurations OK psa.DashboardPreset OK .... Running 'mysql_fix_privilege_tables'... OK
Fuente support.plesk.com