• So, I suppose this could be filed under different categories. My apologies if you think it should be listed somewhere else rather than here.

    The superuser was somehow locked out of the wordpress site. I’m not sure if it was hacked or what happened. I checked the files with my GoDaddy hosting account and confirmed the username and password in the display settings. Everything I was typing in was correct, but the site would not allow me to login. It would also not send me an email to change my password.

    Googled some ways to try to gain access again and found example 1 and example 2. Followed the directions for going through phpMyAdmin. I saw someone suggest it on this forum to another user.

    As the second example stated, I used a MD5 generator.

    Both ways have not worked.

    I did not access any other areas of the phpMyAdmin. After I hit “go” and tried to navigate to the log on screen in a different window, I was greeted with:
    “Error establishing a database connection”

    When I tried to access my website (stardust-ent.com) I was shown: “Error establishing a database connection”

    Any help is greatly appreciated. I’m totally confused with what to do at this point.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    You are getting this error because WordPress is unable to establish a database connection. It could be that your database login credentials are wrong or have been changed by mistake. If you changed your database user password, then you will need to change this WP-Config as well.

    Navigate to WP-Config file in your WordPress website through FTP or from cPanel.Locate following details:

    1
    define('DB_NAME', 'database-name');
    2
    define('DB_USER', 'database-username');
    3
    define('DB_PASSWORD', 'database-password');
    4
    define('DB_HOST', 'localhost');

    Enter the correct working database details here and save the file.

    Remember your DB_Host value might not always be localhost. Depending on the host, it will be different.

    Thanks,

    Thread Starter stardustent

    (@stardustent)

    Hi, thanks so much for your reply!

    I checked all of the details in the wp-config file and changed the phpMyAdmin password back to what was reflected in that file but using MD5 in the dropdown. However, I’m still getting the same response:

    “Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at StardustV2.db.4630528.hostedresource.com. This could mean your host’s database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?
    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.”

    Thread Starter stardustent

    (@stardustent)

    Update: This issue still has not been resolved. My hosting details still say that everything is up and running correctly–which clearly isn’t the case.

    Somehow the wiring to the database got messed up BUT all of the details in the config file real exactly as the details provided in my hosting say.

    Moderator t-p

    (@t-p)

    Update: My hosting details still say that everything is up and running correctly–which clearly isn’t the case.

    – As @accuwebhosting indicated you’re getting this error because WP is unable to establish a database connection.

    – Your host may not admit, there is likely problem with the database server/account

    – There are also many threads on this topic on these forums: https://www.ads-software.com/search/Error+establishing+a+database+connection?forums=1

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘It's a mess–locked out & database error’ is closed to new replies.