Plesk

Backup failed with the error in Plesk: 1049 Unknown database ‘example’

Symptoms

Backup failed and the following error is shown in Plesk backup manager:

Unable to back up database example. Error: SQLSTATE[42000]: Syntax error or access violation: 1049 Unknown database 'example'

Cause

The database was removed manually from MySQL and the orphaned record left in the Plesk database.

Resolution

  1. Connect to the server via SSH

  2. Create backup of PSA databse

  3. Verify that the database does not exist in MySQL:

    # plesk db "show databases like '%example%'"
    # (empty output)

  4. Find the ID of the unexisting database in the PSA database:

    # plesk db "select id,name from data_bases where name like '%example%'"
    | 529 | example | 

  5. Remove the missing database from Plesk database:

    # plesk db "delete from data_bases where id = 529"

Exit mobile version