Database errors sound alarming but usually name their cause. Read the message literally, fix that one thing, and avoid reinstalling the whole site to solve a credentials typo.
Access denied
The username, password or database name in the config file does not match, or the user is not attached to that database. Recheck after any host migration.
Connection refused or host not found
The database server address is wrong, or the database service is down. On managed hosting, confirm the internal host name rather than using localhost.
Too many connections
The site is opening more connections than the plan allows, often from a slow query or a chatty addon. Optimise queries, then raise the limit if the host allows it.
Crashed or corrupted tables
Run a repair on the affected table from the database tool, restore from backup if repair fails, and check disk space - full disks cause corruption.
Frequently asked questions
Can I fix charset issues after import?
Yes, if you exported with the right encoding. Re-import into a clean database with utf8mb4 and test emoji and non-Latin text.
Is it safe to repair tables?
Yes for MyISAM tables. For InnoDB, use the recovery options your database tool provides and take a backup first.
Why did this start after an update?
A new version may use different query syntax or require a newer database engine. Check the release notes.