Unable To login or View website due to database error (3 posts)

  1. larahaslam
    Posted 2 years ago #

    Yesterday I was able to log into the website no problem at all. Today if I try to view the website which is in a subdirectory http://www.solarbright.com.au/skylights I just get this error message "Error establishing a database connection". The site is set to automatically update and I suspect it may have something to do with an update done last night. I have viewed and worked my way through all the suggestions here https://codex.wordpress.org/Login_Trouble - but none of them have worked. I am still getting the same error. I have viewed the files on the server and everything is there. I have double checked everything suggested in the Login Trouble document.

    Can anyone help, I have no idea what has happened as everything was working fine yesterday & if I have disabled both the theme & the plugins and it still doesn't work, I'm not sure what else could be causing the error.

    Thank you in advance for your time.

  2. JumboClicks
    Posted 2 years ago #

    when you get a database connection error it is basically that

    I would check your wp-config.php file and make sure the settings are correct

    you can try this test script
    set the dbhost user pass

    $link = mysql_connect('db_host', 'db_username', 'db_password');
    if (!$link)
    die('Could not connect the database: ' . mysql_error());
    echo 'Database Connected successfully';
  3. Jose Castaneda
    Posted 2 years ago #

    It sounds to me like the database name may not be correct. I would ask your hosting company to look into it. :)

Topic Closed

This topic has been closed to new replies.

About this Topic