2016
MariaDBERRORNotableAuthenticationHIGH confidence
Password change not allowed for this user
Production Risk
Low — password change is rejected.
What this means
The current user does not have sufficient privileges to change the password for the specified user account. Changing another user's password requires the CREATE USER privilege or global UPDATE on mysql.*.
Why it happens
- 1Non-privileged user attempting to change another user's password.
- 2Missing CREATE USER or global UPDATE privilege.
How to reproduce
trigger — this will error
trigger — this will error
SET PASSWORD FOR 'other_user'@'%' = PASSWORD('newpass'); -- run as unprivileged userexpected output
ERROR 2016 (HY000): You are not allowed to create a user with GRANT.
Fix 1
Grant the CREATE USER privilege to allow password management
Grant the CREATE USER privilege to allow password management
GRANT CREATE USER ON *.* TO 'admin'@'%';
Why this works
CREATE USER allows the user to modify other accounts' passwords.
Fix 2
Use a sufficiently privileged account to change passwords
Use a sufficiently privileged account to change passwords
-- Connect as root or a DBA account with CREATE USER privilege
Why this works
Privilege-escalated operations require a privileged session.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 2016 ER_PASSWORD_NOT_ALLOWED
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev