I know this is self explanatory but why can't I connect to my database? I have a live website that I wanted to update by first doing development in my local computer. I exported the db to my local pc then imported it to phpmyadmin. When I try to access the site thru localhost/sitename, the error Error establishing a database connection keeps popping up.
I have tried every tutorial and forums out there but still the error persists. I have checked the credentials from wp-config.php and it was the same(same db name, username, password). Is there other contents should I change property?
Thanks in advance!
I know this is self explanatory but why can't I connect to my database? I have a live website that I wanted to update by first doing development in my local computer. I exported the db to my local pc then imported it to phpmyadmin. When I try to access the site thru localhost/sitename, the error Error establishing a database connection keeps popping up.
I have tried every tutorial and forums out there but still the error persists. I have checked the credentials from wp-config.php and it was the same(same db name, username, password). Is there other contents should I change property?
Thanks in advance!
I had this issue some days ago with a multisite, loading a live dump to local development. After some debugging I noticed, that the error message wasn't right.
The database was connected, but the path in the database to the sites was wrong.
You can check table <your-prefix>_site
and <your-prefix>_blogs
if columns domain
and path
are correct.
That solved my problem, as the error message told something else.