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.

Use of an existing remote mysql server.

Discussion in 'General Discussion' started by devonblzx, Jan 15, 2008.

  1. devonblzx

    devonblzx Member

    Joined:
    Feb 16, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I am trying to set CPanel to use an existing remote mysql server I have set up. The reason for it being existing is I all ready have another web server using the same server with the databases in place, but I am having troubles when setting it up.

    I go to WHM and run through the remote mysql setup but it seems like it can't access the remote server because it isn't using the right mysql root password, but there is no way to specify it. It says it is using a password because it says (using password: YES) but I have tried changing the root password on the mysql server without luck. ( I tried the current local root password, local mysql root password, and remote ssh root password but none seemed to work ).

    Code:
    Using Remote mySQL Server
    Copying MySQL Script.....0%.. ..100%.. ...Done
    Running MySQL Script... 
    Using 74.63.XX.XX as the access ip
    Sync Source: http://httpupdate.cpanel.net/RELEASE-x86_64/scripts
    Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.lock (0)....@74.200.212.130......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.bz2 (0)....@74.200.212.130......connected......receiving...23%...46%...70%...93%...100%......Done
    Sync Source: http://httpupdate.cpanel.net/RELEASE-x86_64/scripts
    Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.lock (0)....@74.200.212.130......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.bz2 (0)....@74.200.212.130......connected......receiving...23%...46%...70%...93%...100%......Done
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    Waiting for mysql to restart..............finished.
    
    root     19733  0.2  0.0  10716  1232 ?        S    12:05   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/mysql.xxxxxxx.com.pid
    mysql    19756  0.3  0.4 139380 18088 ?        Sl   12:05   0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mysql.xxxxxxx.com.pid --skip-external-locking
    
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    mysql has failed, please contact the sysadmin (result was "mysql has failed").
    Done
    
    74.63.XX.XXX is now configured for use as the remote mySQL server.
    
    
    Any ideas on how to specify the remote SQL root password so it will read it correctly?
     
  2. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    /root/.my.cnf

    I believe it's in that one, if I remember right. I just set this up for one of my clients that was using Plesk for their DB server and cPanel as the web server. So yes it can be done :)
     
  3. krunoz

    krunoz Registered

    Joined:
    Apr 21, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Yes, you need to enter your MySQL password in /root/.my.cnf. I had same problem, after entering root password in /root/.my.cnf everything is OK.
     
  4. devonblzx

    devonblzx Member

    Joined:
    Feb 16, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Yes, thank you guys! That's a life save, looks like everything is working now.
     
  5. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    Cheers, glad to help!
     
Loading...

Share This Page