1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setup Remote MySQL server

Discussion in 'General Discussion' started by Maxence, Apr 26, 2010.

  1. Maxence

    Maxence New Member

    Joined:
    Apr 25, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello there,

    I saw a lot of threads about this feature, but no succes. I can't connect to my sql server.

    There we go :
    I got a vm with Debian & mysql 5.0, I can connect via my vm with cpanel (centOS)
    #mysql -u root -p -h sql.domain.com

    it works nice.

    But if I try to setup a remote sql server via my cpanel WHM
    I got this :

    Code:
    trace ouput :
    root@sql1.domain.com's password: ==sshcontroloutput==
    Using xxx.xxx.xxx.xxx as the access ip
    Sync Source: http://httpupdate.cpanel.net/RELEASE/Cpanel
    Fetching http://httpupdate.cpanel.net/cpanels...panelsync.lock (0)....@94.75.231.77......connected......receiving ......Done
    Fetching http://httpupdate.cpanel.net/cpanels...cpanelsync.bz2 (1)....@94.75.231.77......connected......receiving ...100%......Done
    Can't exec "bzip2": No such file or directory at /scripts/cpanelsync line 512, <$__ANONIO__> line 18.
    Sync Source: http://httpupdate.cpanel.net/RELEASE/scripts
    Fetching http://httpupdate.cpanel.net/cpanels...panelsync.lock (0)....@94.75.231.77......connected......receiving ......Done
    Fetching http://httpupdate.cpanel.net/cpanels...cpanelsync.bz2 (1)....@94.75.231.77......connected......receiving ...100%......Done
    Can't exec "bzip2": No such file or directory at /scripts/cpanelsync line 512, <$__ANONIO__> line 18.
    Sync Source: http://httpupdate.cpanel.net/RELEASE/Cpanel
    Fetching http://httpupdate.cpanel.net/cpanels...panelsync.lock (0)....@94.75.231.77......connected......receiving ......Done
    Fetching http://httpupdate.cpanel.net/cpanels...cpanelsync.bz2 (1)....@94.75.231.77......connected......receiving ...100%......Done
    Can't exec "bzip2": No such file or directory at /scripts/cpanelsync line 512, <$__ANONIO__> line 18.
    Sync Source: http://httpupdate.cpanel.net/RELEASE/scripts
    Fetching http://httpupdate.cpanel.net/cpanels...panelsync.lock (0)....@94.75.231.77......connected......receiving ......Done
    Fetching http://httpupdate.cpanel.net/cpanels...cpanelsync.bz2 (1)....@94.75.231.77......connected......receiving ...100%......Done
    Can't exec "bzip2": No such file or directory at /scripts/cpanelsync line 512, <$__ANONIO__> line 18.
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    Waiting for mysql to restart..............finished.
    
    [2010-04-26 17:11:01 +0200] info [restartsrv_mysql] BSD::Resource not available. Resource Limits not adjusted
    mysqld_safe (/bin/sh /usr/bin/mysqld_safe) running as root with PID 8463
    mysqld_safe (logger -p daemon.err -t mysqld_safe -i -t mysqld) running as root with PID 8501
    mysqld (/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock) running as mysql with PID 8500
    
    [2010-04-26 17:11:06 +0200] info [restartsrv_mysql] BSD::Resource not available. Resource Limits not adjusted
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)' 
    Any help will be appreciated :)
     
    #1 Maxence, Apr 26, 2010
    Last edited by a moderator: Apr 26, 2010
  2. thewebhostingdi

    Joined:
    Jan 10, 2008
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,288
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, TX
  4. Maxence

    Maxence New Member

    Joined:
    Apr 25, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for your anwsers, I use debian for my mysql server not for cpanel. But I tested with centOS, got the same problem :/

    I read your link but I don't know how to solve it

     
    #4 Maxence, May 8, 2010
    Last edited: May 8, 2010
  5. cPanelJamyn

    cPanelJamyn Social Engineer
    Staff Member

    Joined:
    Jan 29, 2009
    Messages:
    105
    Likes Received:
    1
    Trophy Points:
    31,337
    The core problem here is that the mysql password you are providing to the script appears to be incorrect.
     
  6. Maxence

    Maxence New Member

    Joined:
    Apr 25, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Trying to solve it but it's still doesn't work :/

    Anyone can help me please ? Fresh install with a clean cPanel VPS Optimized (CentOS)

    :eek:
     
  7. arunsv84

    arunsv84 Member

    Joined:
    Oct 20, 2008
    Messages:
    374
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    127.0.0.1
    Are you getting the same error message as mentioned above? Please paste the exact error message here...
     
  8. Maxence

    Maxence New Member

    Joined:
    Apr 25, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Sql server 111.222.333.444
    Cpanel server : 111.222.333.555

    Using Remote mySQL Server
    Fetching password from remote mysql server.... Copying mysql configuration from remote host.....0%.. ..100%.. ...Done
    ...password set in /root/.my.cnf on remote server, it will be used...Done
    Generating Setup Script....Done

    Copying MySQL Script.....0%.. ..100%.. ...Done
    Running MySQL Script...

    Using 111.222.333.555 as the access ip
    Sync Source: http://httpupdate.cpanel.net/RELEASE-x86_64/Cpanel
    Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/Cpanel/.cpanelsync.lock (0)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/Cpanel/.cpanelsync.bz2 (1)....@67.205.110.4......connected......receiving...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)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.bz2 (1)....@67.205.110.4......connected......receiving...100%......Done
    Sync Source: http://httpupdate.cpanel.net/RELEASE-x86_64/Cpanel
    Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/Cpanel/.cpanelsync.lock (0)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/Cpanel/.cpanelsync.bz2 (1)....@67.205.110.4......connected......receiving...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)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.bz2 (1)....@67.205.110.4......connected......receiving...100%......Done
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    Waiting for mysql to restart..............finished.

    [2010-08-07 06:11:27 +0000] info [restartsrv_mysql] BSD::Resource not available. Resource Limits not adjusted
    mysqld_safe (/bin/sh /usr/bin/mysqld_safe) running as root with PID 10735
    mysqld (/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306) running as mysql with PID 10846

    [2010-08-07 06:11:32 +0000] info [restartsrv_mysql] BSD::Resource not available. Resource Limits not adjusted
    /usr/bin/mysqladmin: connect to server at 'localhost' failed





    error: 'Access denied for user 'root'@'localhost' (using password: YES)'


     
  9. Maxence

    Maxence New Member

    Joined:
    Apr 25, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I don't understand why this feature doesn't work, I saw a lot of topic about remote mysql server, and no one is solved ...

    cPanel don't support it anymore ?
     
  10. asent

    asent Member

    Joined:
    Apr 5, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Create another root user with the host to match the cpanel server ip address you're connecting from? Looks like a auth failure to me.
     
  11. nilesh_kolte

    nilesh_kolte Member

    Joined:
    Apr 13, 2006
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    Try following..

    1. Login to WHM
    2. Click on Additional MySQL Access Hosts
    3. Enter the Debian Servers IP there.
    4. Click on Setup Remote MySQL server
    5. Enter Debian server Hostname, Port,
    6. Login as Root,Enter root password
    And click on setup.

    Make sure you have add Debian server IP to WHM server allow list and WHM server IP in Debian server allow list.


    Regards,
     
  12. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,558
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    Please consider submitting a support request directly to us so that we may assist with investigating the difficulty being experienced. When available, please send me a private message referencing this thread and including the ticket ID number of your support request so that we may follow-up internally. If you have submitted a support request about this in the past, please also let me know your earlier ticket ID number(s) so that we may review the prior communication.
     
  13. wescb

    wescb New Member

    Joined:
    Sep 16, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    FYI, since accessing cPanel support was such a nightmare, the key to this issue (for me at least) was in the first few lines:

    ...password set in /root/.my.cnf on remote server, it will be used...Done

    Looking at this file it appeared to have a long hash of my password, I changed it to the cleartext MySQL password (leaving the quotes), restarted mysql and I was able to add the remote MySQL server to WHM.

    Hope that helps,
    Wes
     
  14. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,558
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    So that we may more accurately diagnose the root cause, please let us know the OS and OS version of both servers and the full cPanel version number of the system that was used to setup the remote MySQL server via WebHost Manager. Knowing this information will help us to identify possible circumstances and attempt to reproduce the difficulty.

    For reference, the cPanel version is displayed in the upper-right corner of WHM, but it can also be obtained via root SSH access; the following command will output the cPanel version and environment type:
    Code:
    # grep -H '' /usr/local/cpanel/version /var/cpanel/envtype
    If using CentOS or RHEL, the OS version can be obtained using the following command via root SSH access:
    Code:
    # cat /etc/redhat-release
     
  15. sohahm

    sohahm New Member

    Joined:
    Sep 3, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    It solved the issue I was having, thank you. I had saved the password in HeidiSQL client and forgot to recheck it.
     

Share This Page