Error establishing a database connection(Help.........)

Check your database name, username and password in wp-config.php and see if everything matches with your server.
 
I randomly get this error on digital Ocean. Reboot server and see if it works
 
Check your database name, username and password in wp-config.php and see if everything matches with your server.
I did but still the same problem...... any other way?
 
I'm assuming this is wordpress?

Did you backup and restore the MySQL database?

If you did, you probably need to update your database setting in the Wordpress config file. see this

There are better ways of moving a wordpress install though. If your Cpanel has softaculous installed, you can do a backup and restore from there. see this
 
you didn't use that migration plugin did you? :D
 
I'm assuming this is wordpress?

Did you backup and restore the MySQL database?

If you did, you probably need to update your database setting in the Wordpress config file. see this

There are better ways of moving a wordpress install though. If your Cpanel has softaculous installed, you can do a backup and restore from there. see this

Yeah this is Wordpress
Thanks for your recommendations. I will try now
Advance thanks
 
It is because of not having enough ram. Add a swap partition and the problem will be solved.
 
Press the restart button on your pc, that will reset that ram on your site and let you log in.
 
I did but still the same problem...... any other way?

Are you absolutely sure? Sometimes database names or tables are prefixed on some hosts... or there might be a blank space hidding somewhere.

Otherwise some other members here posted some possible solutions as well.
 
Hi guys
I was migrating my site to another hosting. but something wrong i did. i've been trying to fix it but from tomorrow new new problems are comin.
now its showing Error establishing a database connection.
If anyone could help to fix it off I will be pleased.


Error establishing a database connection => The error clearly states that it cannot establish a database connection which means your MySQL details might be incorrect.

Configure your Wordpress and change the MySQL details. Make sure they are the correct username and password.
 
I randomly get this error on digital Ocean. Reboot server and see if it works
I had this happen on a DO droplet before and I was so shook. I did the reboot as a last-ditch effort and after restarting it was as if there was there was never an error. If you are using DO I suggest taking a snapshot of your droplet because you never know if you are going to be so lucky. Plus its only a few cents every month.
 
Error establishing a database connection => The error clearly states that it cannot establish a database connection which means your MySQL details might be incorrect.

Configure your Wordpress and change the MySQL details. Make sure they are the correct username and password.
THIS. Check this. If you're still unable to fix it, send me a message.
 
It is because of not having enough ram. Add a swap partition and the problem will be solved.
Again...

Op, do this and your problem will be solved. I have faced similar issues before, and only adding the swap partition helped.

Why this happens is because the mysql's buffer gets out of control and becomes more than your available RAM. So your MySQL server stops. If you add a swap partition, the extra data will use that partition instead of getting out of bound. It will be a littlebit slower, but the server will never stop.

If you wanna do chit chat, carry on lol.
 
Again...

Op, do this and your problem will be solved. I have faced similar issues before, and only adding the swap partition helped.

If you wanna do chit chat, carry on lol.
could you please tell me the procedure. so I can do easily please
 
Back
Top