Plesk

Database backup in Plesk fails because of missing MySQL/MariaDB user: The user specified as a definer does not exist

Symptoms

Cause

The MySQL/MariaDB user set as a definer in the MySQL/MariaDB view is missing on the system.

Resolution

  1. Log in to Plesk GUI

  2. Create a backup of the affected domain to find out the missing MySQL/MariaDB user going to Domains > example.com > Backup Manager > Back Up

  3. The backup will show a warning message, click on View the log option:

    The backup Aug 1, 2019 02:45 PM was created and can be restored, although some minor issues occurred. Download the log file View the log Close this message

  4. Get the missing MySQL/MariaDB user from the error message:

    Warning: mysql "dbname"
    Not all the data was backed up into /var/lib/psa/dumps/domains/example.com/databases/dbname successfully. Total space: 18.00 GB; Available space: 11.00 GB; Mounted on: /. mysqldump: Got error: 1449: "The user specified as a definer ('old-dbuser'@'%') does not exist" when using LOCK TABLES

  5. Go to Domains > example.com > Databases > User Management > Add Database User > Fill the form with the missing database user from the 4th step, in our example: old-dbuser > OK

Exit mobile version