#1 (permalink)  
Old 07-10-2009, 11:23 AM
Registered User
 
Join Date: Jul 2009
Posts: 1
inori0821 is on a distinguished road
Failed to remote Cpanel mysql

I have add a wildcard % both on "Remote Database Access Hosts" from Cpanel and "Additional MySQL Access Hosts" from WHM to allow any IP to access the mysql server.After restart mysql service,I try to login the mysql via another server ssh.
It always show the error message:
Can't connect to MySql server on '……'(10061) Socket error on connect
Please give me some ideas..
Thanks everyone
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-12-2009, 03:21 PM
Spiral's Avatar
Registered User
 
Join Date: Jun 2005
Location: Area 51
Posts: 1,479
Spiral is on a distinguished road
Post

Well for starters, you must be using the wrong settings to connect
because you generated a socket error and remote database connections
use direct TCP network connections instead of system sockets which
incidentally is the method commonly used for reading from localhost.

Second, if you have any firewall setup on either machine, you need to
make sure you have TCP communications open for port 3306 else you
won't be able to make any database connections

You can also check your "skip_networking" setting on the machine
running the database server you are trying to reach and make sure
it is turned OFF or you won't be able to connect remotely:
Code:
mysql> show variables like 'skip_networking';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| skip_networking | OFF   |
+-----------------+-------+
1 row in set (0.00 sec)

mysql> quit
In your my.cnf, if you have a bind-address pointing to 127.0.0.1,
you need to delete that line or reset it for an actual external network IP
else you again won't be able to connect remotely.

Now jumping topics a bit, generally speaking remote MySQL connections
are a very bad idea for both security and performance reasons. Network
instability common throughout the internet can cause substantial performance
impairments for your server which will slow down and wait for responses
whenever there is any kind of network issues and can impact the entire
operation of your server well beyond just the database server.

In the few instances where you might actually have no choice but to run
a remote connection, as is the case for successfully running fully live
mirrored sites for example, then you would want to limit connections only
to the IP of the server authorized to connect specifically. NEVER A WILDCARD!

Opening up the database server to allow connections from everywhere is
not only a bad idea, it's just plain stupid from a security standpoint!

Last edited by Spiral; 07-12-2009 at 03:25 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cPanel remote mysql server [urgent] prixone cPanel and WHM Discussions 2 08-03-2007 12:34 AM
Mysql Failed error after setting up Remote MySQL server ReB cPanel and WHM Discussions 6 03-28-2007 03:47 AM
cPanel and remote MySQL krava cPanel and WHM Discussions 0 09-13-2006 09:02 AM
with a remote mysql server does cpanel still back up the databses with remote ftp? DWHS.net cPanel and WHM Discussions 1 09-17-2005 01:32 AM
Can the remote mysql serv setup in "Remote mySQL Serv" be runnin any version of mysql EdRooney cPanel and WHM Discussions 4 12-24-2004 11:00 PM


All times are GMT -5. The time now is 04:48 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc