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.

Backup / Restore / Remote MySQL problem

Discussion in 'General Discussion' started by ErkDog, Oct 26, 2008.

  1. ErkDog

    ErkDog Member

    Joined:
    Jan 26, 2004
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    OK I've got two problems here.

    I currently have web/DB on a single server.

    I just purchased 2 new servers, one for DB only one for cPanel/Web only.

    Well I configured the remote SQL.

    IP: IP of the machine
    Port: Non standard ssh port but I changed it
    Root Password.

    On the first run it got angry because the /scripts folder on the DB machine didn't exist, so I created it and then the initial setup seemed to run OK.

    I had to do some finangling and manual stuff to get the mysql root password set to the random string that cPanel was trying to set it to.

    Well, I tried to do a full backup of one of my accounts, and migrate it over.

    Everything went fine, except for the part where it did not create the databases for the backed up account, even though it reported in WHM that it did and imported them. It did load all the permissions for the user hosts and databases.

    And now even from the cPanel the user account cannot create a database. When I do MySQL Databases, put anything in to create one, it just says, Database Created, but it never actually creates it!!

    I assume whatever is causing cPanel users to not be able to create databases, is the same thing that kept the restore scripts from creating and importing said databases.

    Any ideas?
     
  2. bashar

    bashar Registered

    Joined:
    May 11, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    yeah, check /usr/local/cpanel/logs/error_log for errors. I have the same problem, and the error message is:
    Tue Oct 28 14:33:50 2008 info [/usr/local/cpanel/bin/mysqladmin]: Creating MySQL database Cpanel::Mysql=HASH(0x87741d0) for user toon
    /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)'

    I don't understand why is trying to create the db on the localhost mysql server, as long as there is a remote MySQL server setup
     
  3. bashar

    bashar Registered

    Joined:
    May 11, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I fixed my problem by creating .my.cnf files for root with the same info on both servers. For the server where CPanel is installed the file looks like:

    [client]
    host="10.0.0.90"
    user="root"
    pass="passs"

    10.0.0.90 is the ip of the remote MySQL server.

    On the remote MySQL server, .my.cnf looks like:
    [client]
    user="root"
    pass="passs"
     
Loading...

Share This Page