The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Transfer Tool w Remote Mysql (transfer to DB server)

Discussion in 'Database Discussions' started by NevGibson, Jan 27, 2016.

  1. NevGibson

    NevGibson Registered

    Joined:
    Dec 28, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    This issue stems from a configuration we advise against:

    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.
     
Loading...

Share This Page