Migration fails: MySQL database does not exist on target.

Created:

2017-02-07 18:07:29 UTC

Modified:

2017-08-08 13:22:13 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Migration fails: MySQL database does not exist on target.

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux

Symptoms

Migration fails with eh following entries:

[Migration] Plesk restore report problem:
Failed deployment of database user usr of database database
[Migration] Plesk restore report problem:
Execution of /opt/psa/admin/plib/api-cli/database.php --update database -update_user usr -server localhost:3306 -type mysql -print-id -set-acl % -set-privileges Select,Insert,Update,Delete,Create,Drop,References,Index,Alter,Create\ Temporary\ Tables,Lock\ Tables,Create\ View,Show\ View,Create\ Routine,Alter\ Routine,Execute,Event,Trigger -passwd '' -ignore-nonexistent-options failed with return code 1.
Stderr is
Unable to update database user properties: Specified database was not found
[Migration] MySQL database 'database' does not exist on target. Its content will not be copied.
Resolve the issue with database creation or create database on target panel. Then run migration for the failed subscription once more.

Cause

On the source server, the domain example.com has two databases with the same name. The only difference is uppercase letters like as follows:

DataBase
database

Resolution

The databases were created in older versions of Plesk. In Plesk 12.5 and higher it is no longer possible to create such databases.

Rename one of the databases of example.com on the source server :

  1. Go to Domains > example.com > Databases .
  2. Decide which database to rename and Export Dump .
  3. Click Remove Database after exporting its dump.
  4. Click Add Database and create a new database.
  5. Import Dump to the new database.

NOTE : It is necessary to update the configuration file of the application which is using the database with new database name, user and password.

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