Support » How-To and Troubleshooting » MySQL connection failing for no reason

MySQL connection failing for no reason

  • yossarian


    I keep 2 copies of my wordpress directory – one copy on my hard drive, and one which I just now uploaded to my web server. My MySQL database is on a remote server.

    The copy of wordpress on my hard drive connects to the DB perfectly fine. However, the copy on the server gives me an error every time. I know for certain that it has both PHP and MySQL installed on it. All files are exactly the same on my computer and on the server.

    Here is the first bit of my config file:
    // ** MySQL settings ** //

    define(‘DB_NAME’, ‘yossarian’); // The name of the database

    define(‘DB_USER’, ‘****’); // Your MySQL username

    define(‘DB_PASSWORD’, ‘****’); // …and password

    define(‘DB_HOST’, ‘www.freesql.org’); // 99% chance you won’t need to change

Viewing 4 replies - 1 through 4 (of 4 total)
  • Cypher


    Any chance your webhost is preventing access to this external SQL server? Does your host not provide a MySQL database for you to use?




    The problem is the www. in the DB_HOST. http://www.freesql.com is not the same as freesql.com.

    /me refrains from a rant on www



    Sorry, no change in the symptoms after changing it to “freesql.com”.



    hey, if you happen to be running a fedora-ish system…

    Disable selinux

    To see if it has been causing the problems, watch /var/log/messages and hit the URL. If it says selinux stuff, that’s the cuplrit.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘MySQL connection failing for no reason’ is closed to new replies.