Maxence

Member
Apr 25, 2010
12
2
53
cPanel Access Level
DataCenter Provider
Twitter
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 :
[email protected]'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)[email protected] ......Done
Fetching http://httpupdate.cpanel.net/cpanels...cpanelsync.bz2 (1)[email protected] ...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)[email protected] ......Done
Fetching http://httpupdate.cpanel.net/cpanels...cpanelsync.bz2 (1)[email protected] ...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)[email protected] ......Done
Fetching http://httpupdate.cpanel.net/cpanels...cpanelsync.bz2 (1)[email protected] ...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)[email protected] ......Done
Fetching http://httpupdate.cpanel.net/cpanels...cpanelsync.bz2 (1)[email protected] ...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 a moderator:

Maxence

Member
Apr 25, 2010
12
2
53
cPanel Access Level
DataCenter Provider
Twitter
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/cpanelsync/RELEASE/Cpanel/.cpanelsync.lock (0)[email protected]
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE/Cpanel/.cpanelsync.bz2 (1)[email protected]%......Done
Sync Source: http://httpupdate.cpanel.net/RELEASE/scripts
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE/scripts/.cpanelsync.lock (0)[email protected]
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE/scripts/.cpanelsync.bz2 (1)[email protected]%......Done
Sync Source: http://httpupdate.cpanel.net/RELEASE/Cpanel
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE/Cpanel/.cpanelsync.lock (0)[email protected]
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE/Cpanel/.cpanelsync.bz2 (1)[email protected]%......Done
Sync Source: http://httpupdate.cpanel.net/RELEASE/scripts
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE/scripts/.cpanelsync.lock (0)[email protected]
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE/scripts/.cpanelsync.bz2 (1)[email protected]%......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:

Maxence

Member
Apr 25, 2010
12
2
53
cPanel Access Level
DataCenter Provider
Twitter
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)[email protected]
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/Cpanel/.cpanelsync.bz2 (1)[email protected]%......Done
Sync Source: http://httpupdate.cpanel.net/RELEASE-x86_64/scripts
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.lock (0)[email protected]
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.bz2 (1)[email protected]%......Done
Sync Source: http://httpupdate.cpanel.net/RELEASE-x86_64/Cpanel
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/Cpanel/.cpanelsync.lock (0)[email protected]
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/Cpanel/.cpanelsync.bz2 (1)[email protected]%......Done
Sync Source: http://httpupdate.cpanel.net/RELEASE-x86_64/scripts
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.lock (0)[email protected]
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.bz2 (1)[email protected]%......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 :

[email protected]'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

[email protected]:~# 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
[email protected]:~# sudo su
-bash: sudo: command not found
[email protected]:~# 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
[email protected]:~# set TERM dumb ; export TERM=dumb
[email protected]:~# stty columns 80
[email protected]:~# stty columns 80
[email protected]:~# 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/cpanelsync/RELEASE-x86_64/Cpanel/.cpanelsync.lock (0)[email protected]
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/Cpanel/.cpanelsync.bz2 (1)[email protected]%......Done
Sync Source: http://httpupdate.cpanel.net/RELEASE-x86_64/scripts
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.lock (0)[email protected]
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.bz2 (1)[email protected]%......Done
Sync Source: http://httpupdate.cpanel.net/RELEASE-x86_64/Cpanel
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/Cpanel/.cpanelsync.lock (0)[email protected]
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/Cpanel/.cpanelsync.bz2 (1)[email protected]%......Done
Sync Source: http://httpupdate.cpanel.net/RELEASE-x86_64/scripts
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.lock (0)[email protected]
Fetching http://httpupdate.cpanel.net/cpanelsync/RELEASE-x86_64/scripts/.cpanelsync.bz2 (1)[email protected]%......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)'
 

asent

Active Member
Apr 5, 2005
33
0
156
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.
 

nilesh_kolte

Well-Known Member
Apr 13, 2006
65
0
156
Pune ,India
cPanel Access Level
Root Administrator
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,
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
14
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
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.
 

wescb

Registered
Sep 16, 2010
1
0
51
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
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
14
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
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