• Resolved rmegson

    (@rmegson)


    Hi
    I’ve been trying to investigate this issue for a few months on and off. I have no idea why it started and have tried lots of suggestions to try and fix it.

    I have several word press websites running locally on my laptop for testing purposes. A couple of months a go, whilst working happily on one of the websites, my local host suddenly states “error establishing a database connection” and dies.

    I’ll try and give as much detail as possible:
    – Windows 7
    – Xxamp 1.7.2
    – WordPress 3.6 for all websites

    I’ve added security passwords to Xxamp and PHPMyAdmin after one posted advised i should. I have updated the wp-config files in the website to reflect this.

    I’ve checked the database names in wp-config files and they are correct.

    A typical scenario is…

    1) I access http://localhost/website and it loads
    2) I access http://localhost/website/wp-login.php and I can log in
    3) I click around in the dashboard, visit the site and all is OK.
    4) I log out and visit another localhost website and all of a sudden the “Error establishing a database connection” and it drops off.
    5) I can log into Xxamp but can’t get into PHPMyAdmin anymore

    Or another scenario…
    1) Logged into local website and all seems fine
    2) I need to take a backup of the database as WP needs updating, so I log into Xxamp, all seems fine
    3) Then I try and get into PHPMyAdmin and I get “Cannot start session without errors, please check errors given in your PHP…”
    4) Then I try and click around on the website again and this goes as well “Object not found”

    It might be worth mention that I can sometimes log into PHPMyAdmin, it seems totally intermittent. Am i doing something to trigger the error? Have i installed something which is interfering?

    I’m completely flummoxed. Help anyone please

    Many thanks in advance

  • The topic ‘Localhost connections keeps failing / losing connection to DB’ is closed to new replies.