MySQL rejects a new password with error 1819
ERROR 1819 (HY000): Your password does not satisfy the current policy requirementsShort answer
Error 1819 means the validate_password component is installed and your cleartext password broke its policy. The default MEDIUM policy wants at least 8 characters with a digit, lower case, upper case and special character. Read the active values, then choose a password that passes. Lower the policy only on development servers.
Fix it fast
1Find out which cause you have
Show the active policy values.
SHOW VARIABLES LIKE 'validate_password%';2Match what you see, then jump to its fix
- 1
validate_password.policy is MEDIUM (the default) and length is 8 or more.The password is too weak for the MEDIUM policyFix - 2
The password looks strong yet is still rejected, and validate_password.check_user_name is ON.The password contains the account's own user nameFix - 3
You are on a throwaway local database and the policy is stricter than you want.A development server needs a lower policyFix
- 1
What does the error look like?
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
Cause 1 of 3
The password is too weak for the MEDIUM policy
1Check
Test the candidate password without touching any account. A result of 100 means it is strong; a low number tells you it will fail.
SELECT VALIDATE_PASSWORD_STRENGTH('your-candidate-password');2Fix
Use a password with at least 8 characters including a digit, a lower-case, an upper-case and a special character. The same rule applies to CREATE USER, ALTER USER and SET PASSWORD.
ALTER USER 'app_user'@'localhost' IDENTIFIED BY 'Str0ng!Passw0rd-2026';3Verify
The statement returns Query OK.
SELECT user, host FROM mysql.user WHERE user = 'app_user';Confirmed by dev.mysql.com
Cause 2 of 3
The password contains the account's own user name
1Check
This check is on by default. It rejects a password that equals the session user's name, forward or reversed.
SHOW VARIABLES LIKE 'validate_password.check_user_name';2Fix
Pick a password that is not the user name or its reverse.
ALTER USER 'deploy'@'%' IDENTIFIED BY 'Tr1cky!Different-Phrase';3Verify
Repeat the statement. It should now succeed.
SELECT VALIDATE_PASSWORD_STRENGTH('Tr1cky!Different-Phrase');Confirmed by dev.mysql.com
Cause 3 of 3
A development server needs a lower policy
1Check
Read the current policy first. Do not do this on a production server.
SHOW VARIABLES LIKE 'validate_password.policy';2Fix
Lower the policy to LOW (8 characters only) with a global variable. It lasts until the server restarts unless you also put it in the option file.
SET GLOBAL validate_password.policy = 'LOW';
SET GLOBAL validate_password.length = 8;3Verify
Read the variable back.
SHOW VARIABLES LIKE 'validate_password.policy';Confirmed by dev.mysql.com
How do I stop it coming back?
- Generate passwords with a password manager; they pass MEDIUM without effort.
- Keep the production policy at MEDIUM or STRONG, and do not copy a dev override to production.
- Store the real password in a secrets manager, not in the CREATE USER script in git.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- ShopGoAn e-commerce aggregator with a Python scraping engine behind its catalog, past 10K Google Play downloads.
Related fixes
Databases
CREATE USER fails with error 1396
CREATE USER is refused for an account whose user and host already exist (error 1396)
Error 1396 on CREATE USER means an account with that exact user and host already exists, often left from an earlier attempt.
3 causes, each with a fixDatabases
Installing the Airflow MySQL provider fails on pkg-config or mysqlclient
Building the mysqlclient wheel fails during the install
The Airflow MySQL provider depends on mysqlclient, which pip compiles against the MySQL C client library.
2 causes, each with a fixDatabases
A query on Aurora MySQL dies with 'table /rdsdbdata/tmp/#sql... is full'
ERROR 1114 (HY000): The table '/rdsdbdata/tmp/#sqlfd_1586_2' is full
In Aurora MySQL 3, internal temporary tables share one pool, and when that pool and the memory-mapped overflow file are used up, a reader instance ends the query with error 1114.
3 causes, each with a fixDatabases
Azure Database for MySQL refuses a connection that does not use SSL
ERROR 3159 (HY000): Connections using insecure transport are prohibited while --require_secure_transport=ON.
Azure Database for MySQL Flexible Server requires encrypted connections by default (require_secure_transport = ON, TLS 1.2).
4 causes, each with a fixDatabases
Compiling a C or C++ program that includes mysql.h fails
undefined reference to `mysql_init'
The compiler only finds mysql.h when the MySQL client development files are installed and their folder is on the include path.
3 causes, each with a fixDatabases
DBeaver fails to resolve Maven dependencies when downloading a database driver
A driver library does not download automatically
DBeaver downloads driver jars from a Maven repository.
3 causes, each with a fix