Error establishing a database connection

Gitgitau

Member
Jan 25, 2021
112
14
18
Guys, since I moved to VPS hosting my woo-commerce website has been throwing this error every frequently then goes back to normal after a refresh. Could someone help me diagnose the problem and a possible solution? My site is not that busy too, less than a hundred visitors a day.

errordb.JPG
 

tuton012

Strive for progress, not perfection
Babiato Lover
Trusted Uploader
May 23, 2019
1,607
2,060
120
Near You
are you sure you have the right username and password? do you have any caching plugins?
it could be your website database down, check the error log
 

beyondbox

New member
Mar 30, 2021
5
1
3
Just open your Root and run this command, and you are absolutely good to go. The Mysql gets stopped, It happens due to overload on the server even for a smaller period of time. you just have to restart it with the command mentioned below. Recommend you to go for a higher memory server.

sudo systemctl start mysql
 

coeur51

Member
Nov 5, 2018
39
33
18
Hello,

If you have just changed your host, you have to wait 24/48 hours for the DNS to propagate
 

Gitgitau

Member
Jan 25, 2021
112
14
18
are you sure you have the right username and password? do you have any caching plugins?
it could be your website database down, check the error log
Database credentials are fine. The problem goes away after a refresh. I am using WP Rocket Cache plugin.
 

Gitgitau

Member
Jan 25, 2021
112
14
18
Just open your Root and run this command, and you are absolutely good to go. The Mysql gets stopped, It happens due to overload on the server even for a smaller period of time. you just have to restart it with the command mentioned below. Recommend you to go for a higher memory server.

sudo systemctl start mysql
Is this something I have to be doing regularly?
 

Gitgitau

Member
Jan 25, 2021
112
14
18
Probably yes, or else upgrade to a Higher Memory Server, because I used to get the same error when I was using a 1 Gb ram server on Digital Ocean.
That could explain. I also have a 1Gb ram VPS plan with Hostinger.
 

Forum statistics

Threads
69,228
Messages
908,456
Members
237,092
Latest member
Azakami

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu