MySQL ERROR 1819: Your password does not satisfy the current policy requirements means the server's password validation component checked a password you set with CREATE USER, ALTER USER or SET PASSWORD and found it too weak. The account is not created or changed. Nothing is wrong with the server; the password simply fails a rule you may not know is active.
mysql> CREATE USER 'app'@'%' IDENTIFIED BY 'Secret123';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
The server error reference lists it as ER_NOT_VALID_PASSWORD, SQLSTATE HY000. It comes from the validate_password component, which is not always installed. That is why the same statement works on one server and fails on another: the MySQL Yum repository and Oracle RPM packages install and enable it on first start, while other installations may not have it at all.
What the default policy checks
With the component installed, the policy is controlled by a handful of system variables:
SHOW VARIABLES LIKE 'validate_password%';
-- defaults with the component installed
-- validate_password.changed_characters_percentage 0
-- validate_password.check_user_name ON
-- validate_password.dictionary_file (empty)
-- validate_password.length 8
-- validate_password.mixed_case_count 1
-- validate_password.number_count 1
-- validate_password.policy MEDIUM
-- validate_password.special_char_count 1
- LOW (0) checks only the length.
- MEDIUM (1), the default, also requires at least one digit, one lowercase and one uppercase letter, and one special character, with the default counts of 1.
- STRONG (2) adds a dictionary check: substrings of four or more characters must not match words in
validate_password.dictionary_file. The file is empty by default, so no dictionary check happens until you set one. - check_user_name, independent of the policy, rejects a password that matches the user name of the current session's account.
So Secret123 fails under MEDIUM because it has no special character, even though it is nine characters long. One detail surprises people: validate_password.length cannot go below number_count + special_char_count + 2 * mixed_case_count. With the defaults that is 4; if you set a lower value, MySQL raises it and writes a warning to the error log.
Test before you set
VALIDATE_PASSWORD_STRENGTH() returns a score from 0 to 100 without touching any account. A password that passes the MEDIUM policy scores 75 or more, one that passes STRONG scores 100.
SELECT VALIDATE_PASSWORD_STRENGTH('Secret123') AS no_special, -- 50: passes LOW only
VALIDATE_PASSWORD_STRENGTH('Secret#123') AS with_special; -- 100: no dictionary file is set
This is the quickest way to check a password generator or a template in your deployment tooling before it fails halfway through a rollout.
Fixing it the right way
- Use a stronger password. In almost every case this is the fix. Passwords for applications belong in a secret manager anyway, so their length costs nothing.
- Let MySQL generate one.
IDENTIFIED BY RANDOM PASSWORDreturns a generated password in the result set, 20 characters long by default (generated_random_password_length). In our experience these passwords pass the default policy.-- let the server generate a password that satisfies the policy CREATE USER 'app'@'%' IDENTIFIED BY RANDOM PASSWORD; - Do not create accounts without a password. With the component active,
CREATE USERrequires a password that satisfies the policy, even withACCOUNT LOCK, because unlocking the account later would otherwise make it accessible without one. - Change the policy only as a deliberate decision. If your security standard asks for long passphrases rather than character classes, LOW with a higher minimum length is a legitimate choice. Make it server-wide and persistent, not a quick toggle to get one statement through.
-- relax the policy deliberately, for the whole server SET PERSIST validate_password.policy = LOW; SET PERSIST validate_password.length = 14;
Uninstalling the component is not a fix. UNINSTALL COMPONENT 'file://component_validate_password' makes the error disappear, along with every protection against weak passwords on that server. Auditors will notice the next time they compare servers.
Related errors and edge cases
- ERROR 4165. If
validate_password.changed_characters_percentageis set (0 by default), a user changing their own password must change at least that share of characters. Too similar a new password produces a different error, not 1819. - Hashed passwords are not checked.
IDENTIFIED WITH ... AS 'hash'skips validation, because the original password is not available. This is why restoring accounts fromSHOW CREATE USERoutput works under any policy. - External authentication is out of scope. The checks apply only to plugins that store credentials inside MySQL. Accounts that authenticate against LDAP or similar follow that system's rules.
- Plugin and component names differ. The old plugin uses variables such as
validate_password_policy, the component usesvalidate_password.policy. The installation guide notes that upgrades from 8.3 to 8.4 with Yum or RPM packages leave the plugin in place, so scripts that set one name can silently miss the other. - Login problems are a different story. 1819 is about setting a password. If the account exists but cannot log in, see ERROR 1045 Access denied or, for root on Linux packages, ERROR 1698.
On large fleets
On one server 1819 is a two-minute fix. Across dozens of servers and automated pipelines it becomes a consistency problem.
- Inventory the policy. Collect
mysql.component, the plugin list and thevalidate_password%variables from every server. In our experience mixed fleets, where some servers came from vendor packages and some from containers or managed services, are where 1819 shows up only in production.
-- is the component installed, and from where is it loaded?
SELECT * FROM mysql.component;
-- the old plugin, if an upgrade left it in place
SELECT PLUGIN_NAME, PLUGIN_STATUS
FROM information_schema.PLUGINS
WHERE PLUGIN_NAME LIKE 'validate%';
- Make automation fail early. Run
VALIDATE_PASSWORD_STRENGTH()on generated passwords in the pipeline, or generate them with the policy in mind, so a deployment does not stop after half the servers have the new account. - Replication. The manual notes that
CREATE USERandALTER USERare rewritten so that passwords do not appear literally in the binary log. In our experience replicas therefore apply these statements without re-checking the password, so the policy that matters is the one on the server where you run the statement. - Persist settings. Use
SET PERSISTor the configuration file. A plainSET GLOBALis lost on restart, and the server quietly returns to its previous policy. - Rotate without lockouts. When tightening the policy, existing passwords stay valid; only new and changed ones are checked. Plan rotations so applications pick up the new secret before the old one is replaced. MySQL's dual password feature (dual password support,
RETAIN CURRENT PASSWORD) helps here.
Key takeaways
- ERROR 1819 means validate_password rejected a cleartext password in
CREATE USER,ALTER USERorSET PASSWORD. - The default MEDIUM policy needs 8 characters with a digit, lowercase, uppercase and a special character.
- Test with
VALIDATE_PASSWORD_STRENGTH(), or useIDENTIFIED BY RANDOM PASSWORD. - Hashed passwords skip the check; too-similar password changes fail with 4165, not 1819.
- Across many servers, inventory the component, plugin and variables, persist the policy and validate passwords in the pipeline.