Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Failed to remote Cpanel mysql

Discussion in 'Database Discussion' started by inori0821, Jul 10, 2009.

  1. inori0821

    inori0821 Registered

    Jul 10, 2009
    Likes Received:
    Trophy Points:
    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
  2. Spiral

    Spiral BANNED

    Jun 24, 2005
    Likes Received:
    Trophy Points:
    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:
    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,
    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! :rolleyes:
    #2 Spiral, Jul 12, 2009
    Last edited: Jul 12, 2009

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice