Error establishing a database connection
-
Help Please! I had WP up and running on my local server using MAMP. No problems whatsoever until I had to reinstall Windows (major malfunction). Windows 10 is now reinstalled and everything is working great, except, when I reinstalled WP and the Server, I keep getting the ‘Error establishing a database connection’ message. I have triple checked my config file and all the credentials are correct. The database I was using was imported back into MyPHPAdmin. I am unable to connect with the database and thus login into my WP site to see my Dashboard.
Just in the last couple days, after launching my local Server (MAMP), and clicking on the ‘Open WebStart page’ and then clicking on ‘My Website’ I am now presented with this message:
The virtual host was set up successfully.
If you can see this page, your new virtual host was set up successfully. Now, web content can be added and this placeholder page1 should be replaced or deleted.
Server name: localhost
Document root: D:/MAMP/htdocsIf I type http://localhost:8888/wp-login.php or http://localhost:8888/wp-admin in the address bar, I keep getting the ‘Error establishing a database connection’ message. Apache port is 8888.
Also, If I reinstall WP and set up the wp-config-sample.php file, I am able to insert the database, username, password, etc, but still keep ending up with the ‘Error establishing a database connection’ message.
I would be grateful if someone could assist me in getting my site up and running once again on my PC so that I could finish and finally upload it to my hosting Server.
Thank You!!
-
Hi @franks909!
Sorry to hear you have troubles with your website. It sounds like your site is not hosted on WordPress.com. You are using the open source WordPress.org software.The best way is to reach out to WordPress.org forum (which is a different community) over at https://wordpress.org/support/forums/
You can read more about the differences between WordPress.org and WordPress.com here: https://wordpress.com/support/com-vs-org/
I hope this helps!
- The topic ‘Error establishing a database connection’ is closed to new replies.