Incident Response

MySQL ERROR 1819: Your password does not satisfy the current policy requirements

The validate_password component rejected a cleartext password. What the default MEDIUM policy checks, how to test a password before you use it, why lowering the policy is usually the wrong fix, and how this breaks automation on large fleets.

· 10 min read · AG Data Team

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

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

  1. 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.
  2. Let MySQL generate one. IDENTIFIED BY RANDOM PASSWORD returns 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;
  3. Do not create accounts without a password. With the component active, CREATE USER requires a password that satisfies the policy, even with ACCOUNT LOCK, because unlocking the account later would otherwise make it accessible without one.
  4. 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

On large fleets

On one server 1819 is a two-minute fix. Across dozens of servers and automated pipelines it becomes a consistency problem.

-- 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%';

Key takeaways

MySQL Errors Security Passwords
Work with us

Password policy blocking deployments?

We set up MySQL account and password policies that pass audits, fit your automation and secret management, and roll out consistently across every server.

Get in touch More from the blog