The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remote MySQL Access Problem

Discussion in 'General Discussion' started by mikelegg, Jun 11, 2007.

  1. mikelegg

    mikelegg Well-Known Member

    Joined:
    Mar 29, 2005
    Messages:
    330
    Likes Received:
    0
    Trophy Points:
    16
    I'm trying to remotely access a mysql database on server 111.111.111.111 from server 222.222.222.222.

    I've logged into the cPanel account on server 111.111.111.111 and added 222.222.222.222 to the Remote Database Access Hosts. (As well as %.domain.com where domain .com.is the actual domain on 222.222.222.222 that will be accessing the database)

    I'm using the same username/password that I use to access the database locally on 111.111.111.111. (without any problems)

    But when It try to access the database from the remote server via PHP using -
    mysql_connect('111.111.111.111', 'username', 'password');

    I get the error -
    Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 111.111.111.111 (4)

    I know the database is running fine and I've read every post I can find on this subject, but I can't get it to work.

    I'd appreciate any suggestions.
     
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Since you aren't seeing the server at all according to your error message, your host is most likely running a firewall and blocking port 3306 from the open public.

    They would probably grant access through the firewall if you explain your situation. If not, seek another host. I do not publicly open 3306 either but I do facilitate active client connections.

    Good luck
     
  3. mikelegg

    mikelegg Well-Known Member

    Joined:
    Mar 29, 2005
    Messages:
    330
    Likes Received:
    0
    Trophy Points:
    16
    Thanks jayh, I'll take it up with them.
     
Loading...

Share This Page