WordPress.org

Forums

[resolved] Error Establishing a Database Connection (9 posts)

  1. royromviel
    Member
    Posted 2 years ago #

    I have a really annoying problem and I cant fix it.

    Here is my case:

    When I have my Permalinks on (like postname only for example) the frontend gives the error: 'Error Establishing a Database Connection'
    When I set permalinks to standard (?p=123 for example), it all works fine.

    I have always access to my admin and I can always access my posts in the admin screens.

    I think the problem started after I deleted my standard admin account for security reasons. After that the problem started...

    I already repaired my database, resetted .htaccess and switching permalinks on and off...

    Who can help me?

    kind regards Roy

  2. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    Check your wp-config file and see if you have filled your DB_NAME, DB_USER, DB_PASSWORD and DB_HOST correctly.

  3. royromviel
    Member
    Posted 2 years ago #

    I have. It has not changed.

    And I have still access to my admin interface

  4. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    Can you post your site URL?

  5. royromviel
    Member
    Posted 2 years ago #

  6. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    I think the site can be infected with malware:
    1. Google lists as suspicious: See HERE.
    2. Here is another report: http://sitecheck.sucuri.net/results/www.trustpayrolling.nl

    These could be the reason for the abnormal behavior.

  7. royromviel
    Member
    Posted 2 years ago #

    Oh, yeah. I solved it already :) That was the whole reason why I deleted the admin account :)

    You get this malware report because the site is still on the blacklist. But there is no malware in the site anymore

    The site worked fine after I cleaned up the files. But now... it wont work with permalinks on and I dont know how...

  8. royromviel
    Member
    Posted 2 years ago #

    Ok... I know what is wrong!

    It was my first wp site, so I am really ashamed right now... But the problem was this:

    I started the site in a subdirectory. Then when the site was complete I moved it to the root. But that seems to went a little bit wrong. Now the backend is using the current config.php in the root while the frontend is using the config.php in the old directory. So when I changed the sql password in the root config file I forgot to change the new password in the old config file...

    The whole problem was unknown to me till now. So I am going to fix this.

    Thanks anyway for ur time and help!

    kind regards Roy

  9. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    You are welcome!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags