• 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 https://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.www.ads-software.com/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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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

    <?php
    $link = mysql_connect('db_host', 'db_username', 'db_password');
    if (!$link)
    {
    die('Could not connect the database: ' . mysql_error());
    }
    echo 'Database Connected successfully';
    mysql_close($link);
    ?>
    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unable To login or View website due to database error’ is closed to new replies.