Database connection error
Your app can't reach its database: the database is stopped, the address or password is wrong, or a firewall is blocking it. Check them in that order.
"Error establishing a database connection"
WordPress can't reach its database. Usually the database details in wp-config.php are wrong, or the database server is down. Check those two first.
"Too many connections" database error
Every database connection is in use. Usually your app opens connections and doesn't close them, or traffic outgrew the limit. Fix leaks first.
Database timeout
A query or connection took longer than allowed: usually a slow query on a big table, a missing index, locked rows, or an overloaded database.
MySQL error
Read the error number: 1045 is access denied, 2002 means the server isn't reachable, 1040 is too many connections. The MySQL error log says the rest.
Postgres error
Read the message: connection refused, authentication failed, too many connections and statement timeout each point to a different fix.
MongoDB connection error
Usually your server's IP isn't on the database's access list, the connection string or password is wrong, or the cluster is paused. Check the access list first.
More fix guides
Search everything →Not sure what's wrong with yours?
One click checks your site, and your Cloudflare if you connect it, and gives you a report of what's wrong and what to do. Your first report is free.
Run your free report