• I just tried logging into my website http://www.ThedaBaraVintage.com and I’m
    getting the following message “Error establishing a database connection”. I
    get the same error message when I go to me website. I don’t even have the option to enter my user name and password, I just get this error message. How can I fix this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • There are numerous reasons that may prevent you from connecting to your database.

    The database may not exist. If you are unsure, then you may need to ask your Web Host for information on your MySQL database.
    Your configuration file may have erroneous information. This is the most common mistake when configuring WordPress.
    You may be missing a necessary user prefix. If so in the wp-config.php file modify the “DB_NAME” constant to “yourloginname_wp”, or modify “DB_USER” with “yourloginname_dbuser”.
    Check that there is no whitespace at the bottom of your wp-config.php file.

    Also, check your WordPress configuration values have been set correctly.

    Thread Starter Theda Bara

    (@theda-bara)

    Thanks for your reply. I’m so confused has to how this happened. My site was working fine the other day, and I changed my password while I was logged in. How can I check the code if I’m not able to log in?

    You can access your wp-config.php file through an FTP client like FireFTP or Cyberduck, or through your webhost’s cpanel interface.

    I just set up a new WP site yesterday, got it all designed/configured, and received this message this AM. When I opened my wp-config.php file it did, indeed, have an extra empty line of code at the end. I deleted it with my text editor and now the site is back up.

    Weird, I know. But it worked.

    P.S. Speaking from experience, ALWAYS back up or compress a copy of any file you are going to mess with. Good luck!

    I have downloaded my db file from my host to Localhost and every time that I try to access it I get the error message “error establishing a database connection” However,
    If I access the original “http://localhost/wordpress” I get a perfect WordPress site
    Both DB’s are in the same Htdocs, is this a problem?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.