Transfer Tool w Remote Mysql (transfer to DB server)

NevGibson

Registered
Dec 28, 2012
2
0
1
cPanel Access Level
Root Administrator
Hello!
I have two cpanel servers conveniently named 'webster' (web) and 'databud' (dedicated database). Remote MySQL is set up so that all of the databases from webster actually live on databud.

I'm now starting to host some sites on databud too as it has been underutilized. new sites work great, but now I'm trying to use the transfer tool to move certain sites from webster to databud.
In the transfer tool I unchecked the "copy databases" option so it doesn't try and copy the database over itself. However, I still get the error:

Failed: Account Restore Failed: “Account failure: Failed to create the account: The system could not create the user “USERNAME” because it conflicts with an unmanaged MySQL database user.”

Is there any workaround to make this work? In a perfect world I'd hope it would just adopt the databases. I can imagine this would be useful going the other way (migrating from a single server, to dual server w remote databases configuration) or, with restoring packages from similar configurations after a crash too.

Any insight would be greatly appreciated. Thanks so much.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello :)

This issue stems from a configuration we advise against:

We strongly recommend that each remote MySQL server correspond to a single cPanel & WHM server. While you can use a single remote MySQL server for multiple cPanel & WHM servers, we do not recommend this configuration.
This is documented at:

Manage MySQL® Profiles - Documentation - cPanel Documentation

However, that being said, you could manually drop the users on the destination server before transferring the accounts with a command such as:

Code:
mysql -e "DROP USER '$username'@'$hostname'"
Replace "$username" with the username of the database, and $hostname with the host associated with the MySQL username. You can verify the hostname with a command such as:

Code:
mysql -e "select User,Host from mysql.user where User='$username'";
Thank you.