MySQL connection failing for no reason (5 posts)

  1. yossarian
    Posted 10 years ago #

    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

  2. Cypher
    Posted 10 years ago #

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


  3. masquerade
    Posted 10 years ago #

    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

  4. yossarian
    Posted 10 years ago #

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

  5. jebba
    Posted 10 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic