Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2002

    Exclamation Cannot Connect to MySQL server

    I'm sure this is a simple fix... but for the life of me I can't figure it out.

    I have a website on one server, and a vbulletin mysql DB on another server. Have allowed the website server's IP address in Access Hosts.

    However, I am getting this error on the website:

    Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on '' (4) in /home/fifa2002/

    Does anyone have any ideas what is causing this?

    If someone is available to take a look send me a PM. Thanks!

  2. #2
    Join Date
    Aug 2001
    I suppose you get this message most probably due to a firewall. Try whether you can connect with telnet to the particular MySQL port. If this fails as well you have a network issue - again probably a firewall. Otherwise check your PHP configuration, maybe you havent specified the right port. - Is your site up?
    Multi-Location Service Availability Check ● the only with support for HTTPS & IDN

  3. #3
    Join Date
    Dec 2006
    Also check on the /etc/my.cnf file and verify that there is not a line that says

    If you see skip-networking on that file, you will need to remove it, and save the file. Then restart the MySQL service.

  4. #4
    Join Date
    Sep 2002
    Top Secret
    Check to make sure that the server you're trying to access [B]from[B] is allowed to connect to the remote server. Since you're not trying to connect to localhost (as evidenced in the error message), you're most likely having connection issues between a and b

    -- make sure that the server you're trying to access from is allowed
    -- make sure the remote server is accepting connections
    -- make sure the remote server hasn't blocked out the incoming server
    -- make sure the USER you're trying to connect as has not maxed out connections
    WHMCS Guru - WHMCS addons, management, support and more.
    WHMCS Notifications Extended - Add slack, hipchat, SMS, pushover to WHMCS !!
    Linux Problems? WHMCS Issues? +1-866-546-8914 (linux-14) or @whmcsguru on twitter!

  5. #5
    Join Date
    Dec 2002
    Thanks to everyone for your help. took a look david510 and fixed the issue. The permissions were not granted correctly for that server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts