WordPress.org

Ready to get started?Download WordPress

Forums

MySQL connection failing for no reason (5 posts)

  1. yossarian
    Member
    Posted 8 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
    Member
    Posted 8 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?

    Regards

  3. masquerade
    Member
    Posted 8 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
    http://no-www.org

  4. yossarian
    Member
    Posted 8 years ago #

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

  5. jebba
    Member
    Posted 8 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