I am getting a MySQL connection error. What does it mean?
The four most common MySQL errors and what they mean.
"Access denied for user" means the username or password is wrong; credentials are case-sensitive, so reset them from the Databases page rather than retyping from memory.
"Can't connect to MySQL server" or "Connection refused" usually means the wrong host. Always use 127.0.0.1 as the hostname, never your server's public IP, and confirm you are using port 3306.
"Unknown database" means the database name is wrong or mistyped; names are case-sensitive and usually carry a prefix like s1_, visible on the Databases page.
If you are connecting from a game addon (such as MySQLoo for DarkRP) and see a "module not loaded" style error, confirm the correct addon is installed and check the console for load errors; also confirm the module build matches your server OS, since a Windows build will not work on a Linux server.
After changing credentials, a full restart is needed, not just a config reload.
Didn't fix it? Ask in Discord.
Ask in our Discord - we help with hosting questions whether or not you host with us.
Related articles
- How do I create and manage a panel database?
Panel Features
- How do I connect DarkRP itself to a MySQL database?
GMod Panel