Migration fails with "Failed to pack files", "Cannot load from mysql.proc"

Created:

2016-11-16 12:56:36 UTC

Modified:

2017-02-07 16:48:31 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Migration fails with "Failed to pack files", "Cannot load from mysql.proc"

Symptoms

Migration or database export fails with the following error:

Failed to pack files backup_domain.tld_1_1309020900 in /var/cache/20130902085729642/...

mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'db_name'': Cannot load from mysql.proc. The table is probably corrupted (1548)

Cause

There is an incomplete upgrade of MySQL on the source server. The database still has an old version.

Resolution

On the source server:

  1. Create database backups:

    # mkdir /root/__sqlbackups
    # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow ` psa > /root/__sqlbackups/psa.`date +%F_%H.%M`.sql
    # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow ` mysql > /root/__sqlbackups/mysql.`date +%F_%H.%M`.sql
    # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow ` --all-databases > /root/__sqlbackups/all.`date +%F_%H.%M`.sql
  2. Complete the MySQL upgrade:

    # mysql_upgrade -uadmin -p` cat /etc/psa/.psa.shadow ` --debug-check --debug-info --verbose

    If it did not help and you still get the error above, but mysql_upgrade shows the following:

    This installation of MySQL is already upgraded to <MYSQL_VERSION>, use --force if you still need to run mysql_upgrade

    Run

    # mysql_upgrade -uadmin -p` cat /etc/psa/.psa.shadow ` --force

Please use the official MySQL guide for you reference.

Have more questions? Submit a request
Please sign in to leave a comment.