Mysql Backup error: Cannot dump database content of type 'mysql'

Refers to:

  • Plesk 11.5 for Linux
  • Plesk 12.0 for Windows

Created:

2016-11-16 13:25:21 UTC

Modified:

2016-12-21 20:40:48 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Mysql Backup error: Cannot dump database content of type 'mysql'

Symptoms

  1. Backup fails with the following errors:

    Error: domain "example.com"
    Cannot dump database content 'db_example' of type 'mysql'

    Error:
    Cannot backup content of database 'db_example'. The mysqldump utility has returned '2'.
    STDERR: mysqldump: Got error: 1049: Unknown database 'db_example' when selecting the database

    Warning:
    Deployer has been terminated by exception: Line 70 Position 4 Error: The element 'migration-dump' has invalid child element 'role'. List of possible elements expected: 'reseller-info, client-info, domain-info, server'.
  2. Database db_example does not exist on the server, however, psa database contains a record about it:

    mysql> select * from data_bases where name='db_example';
    +----+-----------------+-------+--------+--------------+-----------------+
    | id | name | type | dom_id | db_server_id | default_user_id |
    +----+-----------------+-------+--------+--------------+-----------------+
    | 1 | db_example | mysql | 1 | 1 | 1 |
    +----+-----------------+-------+--------+--------------+-----------------+

Cause

Database inconsistency.

Resolution

  1. Create psa database backup:

    # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` psa > /root/psa_backup.sql
  2. Remove the record about db_example from psa database:

     mysql> delete from data_bases where name='db_example';
  3. Restart the backup process.

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