That error only means one thing: database connection detials are wrong. See Editing wp-config.php « WordPress Codex
If that error appeared without you doing anything, ask your host if the database server is running OK.
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 localhost. 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?
@patel198829@yahoo.com: As per the Forum Welcome, please post your own topic.
Thanks Folks for your replies. The information that you have provided helped. We are currently working with our web host to resolve the problem. Hope to be back up and running soon.
Thanks Again
Tom
Hi Tom,
I have the same issue. I did create password for user in phpmysql database. but, I forgot to add password in wp-config file. Check this one. hope it helps.
Thanks,
Karthikeyan Palaniswamy
[Signature moderated]
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
@kpalaniswamy,
Regardless of how similar your symptom may be, you should create your own thread out of courtesy.
Thanks again everyone for you feedback. Come to find out after talking to our host that they had added/switched servers and had failed to point our site and others to the new server. Everything is back to normal now.
Thanks again for your help
Tom
Hi
wordpress giving database connection error….help
@hammad100 – if you need help, please start a new thread – this one is outdated and already marked resolved, so it’s not a good place to get help. See this: http://codex.wordpress.org/Forum_Welcome#Where_To_Post
You can start a new thread here:
http://wordpress.org/support/forum/how-to-and-troubleshooting#postform