Results 1 to 15 of 15

Thread: Setup Remote MySQL server

  1. #1
    Registered Member
    Join Date
    Apr 2010
    Posts
    5

    Default Setup Remote MySQL server

    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
    Last edited by Infopro; 04-26-2010 at 02:41 PM.

  2. #2
    Registered Member
    Join Date
    Jan 2008
    Posts
    141

    Default

    Kindly refer to below mentioned URL which might helps you to solve your issue:

    http://forums.cpanel.net/f5/remote-m...er-142657.html
    http://forums.cpanel.net/f5/setting-...ql-114669.html

  3. #3
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,296
    cPanel/WHM Access Level

    Root Administrator

    Default

    You mentioned using Debian. You may want to consider using an OS currently supported by cPanel/WHM for a better experience:

    System Requirements - cPanel Inc.

  4. #4
    Registered Member
    Join Date
    Apr 2010
    Posts
    5

    Default

    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

    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 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)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanels...cpanelsync.bz2 (1)....@67.205.110.4......connected......receiving...100%......Done
    Sync Source: http://httpupdate.cpanel.net/RELEASE/scripts
    Fetching http://httpupdate.cpanel.net/cpanels...panelsync.lock (0)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanels...cpanelsync.bz2 (1)....@67.205.110.4......connected......receiving...100%......Done
    Sync Source: http://httpupdate.cpanel.net/RELEASE/Cpanel
    Fetching http://httpupdate.cpanel.net/cpanels...panelsync.lock (0)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanels...cpanelsync.bz2 (1)....@67.205.110.4......connected......receiving...100%......Done
    Sync Source: http://httpupdate.cpanel.net/RELEASE/scripts
    Fetching http://httpupdate.cpanel.net/cpanels...panelsync.lock (0)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanels...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-05-08 22:21:12 +0400] info [restartsrv_mysql] BSD::Resource not available. Resource Limits not adjusted
    mysqld_safe (/bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --user=mysql) running as root with PID 1673
    mysqld (/usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock) running as mysql with PID 1723

    [2010-05-08 22:21:17 +0400] 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)'
    Last edited by Maxence; 05-08-2010 at 02:30 PM.

  5. #5
    cPanel Staff cPanelJamyn's Avatar
    Join Date
    Jan 2009
    Posts
    105

    Default

    Quote Originally Posted by Maxence View Post
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    The core problem here is that the mysql password you are providing to the script appears to be incorrect.

  6. #6
    Registered Member
    Join Date
    Apr 2010
    Posts
    5

    Default

    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)


  7. #7
    Registered Member arunsv84's Avatar
    Join Date
    Oct 2008
    Location
    127.0.0.1
    Posts
    374
    cPanel/WHM Access Level

    Root Administrator

    Default

    Are you getting the same error message as mentioned above? Please paste the exact error message here...
    [root@linux ~]$ w
    1:00:01 up 28 years 300 days, 22:00, 1 user, Today's status : Fine

  8. #8
    Registered Member
    Join Date
    Apr 2010
    Posts
    5

    Default

    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/cpanels...panelsync.lock (0)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanels...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/cpanels...panelsync.lock (0)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanels...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/cpanels...panelsync.lock (0)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanels...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/cpanels...panelsync.lock (0)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanels...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)'


    Trace ouput :

    root@111.222.333.444's password:
    Linux sql1 2.6.24-11-pve #1 SMP PREEMPT Fri May 14 09:28:08 CEST 2010 x86_64

    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Sat Aug 7 05:37:54 2010 from 356.free.fr

    root@sql1:~# export LANG=C ; setenv LANG C ; echo ${LANG}_SSH_CLIENT=${SSH_CL
    <; setenv LANG C ; echo ${LANG}_SSH_CLIENT=${SSH_CLI ENT}
    -bash: setenv: command not found
    C_SSH_CLIENT=111.222.333.555 41461 22
    root@sql1:~# sudo su
    -bash: sudo: command not found
    root@sql1:~# setenv SSH_CLIENT 111.222.333.555 ; export SSH_CLIENT=111.222.333.
    <ENT 111.222.333.555 ; export SSH_CLIENT=111.222.333.555
    -bash: setenv: command not found
    root@sql1:~# set TERM dumb ; export TERM=dumb
    root@sql1:~# stty columns 80
    root@sql1:~# stty columns 80
    root@sql1:~# perl -e 'print "\t==sshcontroloutput==\n"';sh ~root/.mysqlscript
    < "\t==sshcontroloutput==\n"';sh ~root/.mysqlscript ; rm -f ~root/.mysqlscrip
    <"';sh ~root/.mysqlscript ; rm -f ~root/.mysqlscript ;echo;perl -e 'print "\t=
    < rm -f ~root/.mysqlscript;echo;perl -e 'print "\t== sshcontroloutput==\n"'
    ==sshcontroloutput==
    Using 111.222.333.555 as the access ip
    Sync Source: http://httpupdate.cpanel.net/RELEASE-x86_64/Cpanel
    Fetching http://httpupdate.cpanel.net/cpanels...panelsync.lock (0)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanels...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/cpanels...panelsync.lock (0)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanels...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/cpanels...panelsync.lock (0)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanels...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/cpanels...panelsync.lock (0)....@67.205.110.4......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanels...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. #9
    Registered Member
    Join Date
    Apr 2010
    Posts
    5

    Default

    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. #10
    Registered Member asent's Avatar
    Join Date
    Apr 2005
    Posts
    33

    Default

    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. #11
    Registered Member nilesh_kolte's Avatar
    Join Date
    Apr 2006
    Posts
    66

    Default

    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,
    ~~~ Cool Buddy ~~~

  12. #12
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,549
    cPanel/WHM Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by Maxence View Post
    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 ?
    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. #13
    Registered User
    Join Date
    Sep 2010
    Posts
    1

    Default

    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. #14
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,549
    cPanel/WHM Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by wescb View Post
    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
    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. #15
    Registered User
    Join Date
    Sep 2011
    Posts
    1
    cPanel/WHM Access Level

    Website Owner

    Default Re: Setup Remote MySQL server

    Quote Originally Posted by cPanelJamyn View Post
    The core problem here is that the mysql password you are providing to the script appears to be incorrect.
    It solved the issue I was having, thank you. I had saved the password in HeidiSQL client and forgot to recheck it.

Similar Threads

  1. Setup MySQL Remote server
    By gabidavila in forum New User Questions
    Replies: 2
    Last Post: 06-14-2010, 07:30 PM
  2. Remote mysql server setup - ssh for setup only?
    By Alcedema in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 10-08-2009, 01:29 PM
  3. Setup Remote Mysql Server
    By izmirhost in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 03-28-2008, 03:50 AM
  4. [Q] setup remote MySQL server
    By abdoh2010 in forum cPanel & WHM Discussions
    Replies: 9
    Last Post: 03-23-2006, 12:17 PM
  5. when i setup a remote mysql server..
    By allenhui in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 12-26-2003, 04:11 AM
bargain