Error during Plesk upgrade: Cannot load from mysql.proc.

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 10.4 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 10.x and below for Linux

Created:

2016-11-16 13:24:53 UTC

Modified:

2016-12-21 20:39:46 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Error during Plesk upgrade: Cannot load from mysql.proc.

Symptoms

  1. The MySQL upgrade fails with the following error:

    ERROR while trying to upgrade APSC SQL database from 11.1.0
  2. The following error is in the ' /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

Diagnostic

  1. Attempting to drop a procedure (even if it does not exist):

    mysql> DROP PROCEDURE IF EXISTS test1234;
    ERROR 1548 (HY000): Cannot load from mysql.proc. The table is probably corrupted
  2. Check the MySQL log for errors:

    # grep log /etc/my.cnf
    log-error=/var/log/mysqld.log
    # 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

  1. Make sure the MySQL database is not corrupted. You can check with the "mysqlcheck" command:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqlcheck -uadmin mysql
    mysql.columns_priv OK
    mysql.db OK
    mysql.event OK
    mysql.func OK
    mysql.general_log OK
    mysql.help_category OK
    mysql.help_keyword OK
    mysql.help_relation OK
    mysql.help_topic OK
    mysql.host OK
    mysql.ndb_binlog_index OK
    mysql.plugin OK
    mysql.proc OK
    mysql.procs_priv OK
    mysql.proxies_priv OK
    mysql.servers OK
    mysql.slow_log OK
    mysql.tables_priv OK
    mysql.time_zone OK
    mysql.time_zone_leap_second OK
    mysql.time_zone_name OK
    mysql.time_zone_transition OK
    mysql.time_zone_transition_type OK
    mysql.user
    OK
    1. 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 |+------------+--------+----------+----------+1 row in set (0.00 sec

  2. 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
  3. Make sure that, if you upgraded the MySQL server, the ' mysql_upgrade ' script is executed successfully:

    # mysql_upgrade -uroot -p <root_password>
    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
    apsc.aps_application_resource OK
    ....
    mysql.columns_priv OK
    mysql.db OK
    ....
    psa.Configurations OK
    psa.DashboardPreset OK
    psa.DashboardPresetConfig OK
    psa.DatabaseServers OK
    ....
    Running 'mysql_fix_privilege_tables'...
    OK
Have more questions? Submit a request
Please sign in to leave a comment.