Unable to migrate a database user: Not enough parameters were specified to find a particular database

Created:

2016-11-16 13:25:00 UTC

Modified:

2017-08-08 13:19:08 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to migrate a database user: Not enough parameters were specified to find a particular database

Applicable to:

  • Plesk for Windows
  • Plesk for Linux

Symptoms

  • Database user could not be migrated with the following error:
error: An error occurred, when restoring hosting settings:
Execution of "C:\\Program Files (x86)\\Parallels\\Plesk\\bin\\database.exe" --update database_name -add_user database_username -server localhost:3306 -type mysql -print-id -user-role readWrite -set-acl % -set-privileges "Select,Insert,Update,Delete,Create,Drop,Index,Alter,Create Temporary Tables,Lock Tables,Create View,Show View" -passwd "" -passwd_type sym -ignore-nonexistent-options failed with return code 1.
Stderr is
Not enough parameters were specified to find a particular database
  • There is already a database user with name 'database_username' on a destination server that belongs to different subscription:

# root@source:~# plesk db
mysql> select User from mysql.user where User='database_username';
+-------------------+
| User              |
+-------------------+
| database_username |
+-------------------+
1 row in set (0,00 sec)

 


# root@target:~# plesk db
mysql> select User from mysql.user where User='database_username';
+-------------------+
| User              |
+-------------------+
| database_username |
+-------------------+
1 row in set (0,00 sec)

Cause

2 database users with the same usernames cannot be created in MySQL server. 

Resolution

  1. create new database user for example.com domain's database on target server in Domains > example.com > Databases > User Management . Make sure database username is unique for this server

  2. modify website's configuration to use the database with the another credentials. For example WordPress config file wp-config.php:

    
    /** MySQL database username */
    define('DB_USER', 'new_dbuser_name');

    /** MySQL database password */
    define('DB_PASSWORD', 'new_dbuser_password');

Another solution is:

  1. modify database user for example.com on source server in Domains > example.com > Databases > User Management so that the username is unique for both source and target servers

  2. Start new migration

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