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 global-db:3306. This could mean your host’s database server is down

Hi:

I have live website and it gives me this error:

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 global-db:3306 . This could mean your host’s database server is down.

what should I do?

Sounds like the global-db did not start in the proper order. If the website comes up before the db, you will see this error. Most times a quick restart of the global-db will solve this issue.

Try:

sudo ee service restart global-db 

There can be many other issues that prevent the db container from starting or to restart frequently, which causes disruptions. But start here.