Wrong database credentials or privileges (Access denied for user)
- Platforms
- Paper · Purpur · Velocity · single server
- Verified
- Verified
- Confidence
- Confidence 95%
What it looks like in the log
Any one of these lines is enough. The agent matches them locally, on your server.
logs/latest.log
[WARN] Access denied for user '
Symptoms
- A plugin cannot connect to MySQL/MariaDB: “Access denied for user '<user>'@'<host>'”
Cause
The database server rejected the login: wrong username/password, the user is not allowed to log in from this server's address, or it has no privileges on the specified database.
Possible causes
- Wrong password or username in the plugin config (including after the password was changed in the hosting panel)
- The user was created for a different host ('user'@'localhost' instead of 'user'@'%' or the server's IP)
- The user has no GRANT on the required database (error “… to database '…'”)
How to fixLow risk
- Check the username and password in the plugin config (e.g.
data.username/data.passwordinplugins/LuckPerms/config.yml) — compare them locally; do not send the password to chats or third-party services. - In MySQL/MariaDB, check which host the user may log in from:
SELECT user, host FROM mysql.user;— the host in the error (after the@) must match the user's entry. - For a “to database” error, grant privileges:
GRANT ALL PRIVILEGES ON <db>.* TO '<user>'@'<host>';. - If the password contains special characters and is set in the JDBC URL, escape it or move it into a separate config parameter.
- Restart the server or reload the plugin.
Translated from the Russian original; log lines are quoted verbatim.