Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

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

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements means the server has the validate_password component installed and it rejected a password that you supplied in clear text. The statement was not run, so nothing changed. Read the policy the server enforces, test candidate passwords against it, and pick one that meets the rules. Do not switch the policy off to get one account created.

What the error means

MySQL's error reference lists 1819 as ER_NOT_VALID_PASSWORD, SQLSTATE HY000, with the message "Your password does not satisfy the current policy requirements".

The validate_password page for MySQL 8.4 says the component "serves to improve security by requiring account passwords and enabling strength testing of potential passwords". For statements that assign a cleartext password, it "checks the password against the current password policy and rejects the password if it is weak (the statement returns an ER_NOT_VALID_PASSWORD error). This applies to the ALTER USER, CREATE USER, and SET PASSWORD statements."

Three levels exist: LOW, MEDIUM and STRONG. The page says "The default is MEDIUM". The variables page gives the tests for each level:

Policy Tests performed
0 or LOW Length
1 or MEDIUM Length; numeric, lowercase/uppercase, and special characters
2 or STRONG Length; numeric, lowercase/uppercase, and special characters; dictionary file

The defaults on the variables page are:

  • validate_password.length: 8, the minimum number of characters.
  • validate_password.mixed_case_count: 1. For a given value, "the password must have that many lowercase characters, and that many uppercase characters", counted when the policy is MEDIUM or stronger.
  • validate_password.number_count: 1 digit, and validate_password.special_char_count: 1 non-alphanumeric character, both for MEDIUM or stronger.
  • validate_password.check_user_name: ON. It "compares passwords to the user name part of the effective user account for the current session and rejects them if they match", independent of the policy level. The page says the names come from USER() and CURRENT_USER() of the current session, so the comparison is with the name of the account running the statement, not the account being created.
  • validate_password.dictionary_file: empty. "By default, this variable has an empty value and dictionary checks are not performed", and the policy must be STRONG for a dictionary file to be used.
  • validate_password.changed_characters_percentage: 0, which "permits all of the characters from the current password to be reused". If it is set higher, a change of a user's own password must alter that share of the characters.

The minimum for validate_password.length is itself a function of the other settings. The page says the value "cannot be set less than" number_count + special_char_count + (2 * mixed_case_count). With the defaults that is 1 + 1 + (2 x 1) = 4, so the default length of 8 is the tighter rule.

Two behaviours explain surprises. Passwords given as hashed values "are not checked because the original password value is not available for checking". And an account created locked still needs a compliant password: the page shows CREATE USER 'juanita'@'localhost' ACCOUNT LOCK; failing with this error.

In MySQL 8.4 the page says "the validate_password plugin was reimplemented as the validate_password component" and that the plugin is deprecated. If the component is not installed, the page says "passwords in statements are not checked", so an error 1819 from a server without it comes from something else.

Likely causes

Cause What you see How to confirm
Password shorter than validate_password.length 1819 on CREATE USER or ALTER USER The password has fewer characters than the variable's value
MEDIUM rules not met: missing digit, upper or lower case letter, or special character 1819 although the length is enough Count each class against mixed_case_count, number_count and special_char_count
Password equals the name of the account you are logged in as 1819 when the password equals your own session user name validate_password.check_user_name is ON, and SELECT USER(), CURRENT_USER(); shows the name
STRONG policy with a dictionary file 1819 for a word that is in the file validate_password.policy is STRONG and validate_password.dictionary_file is not empty
New account created locked, with no password 1819 on CREATE USER ... ACCOUNT LOCK The statement has no compliant IDENTIFIED BY clause
Own password changed to one too similar to the old one 1819 on a self-service change validate_password.changed_characters_percentage is above 0

Prove the cause before changing anything

All of these only read. Run them at the mysql prompt as an account that may.

1. Is the component installed, and what is the policy?

SHOW VARIABLES LIKE 'validate_password%';

The MySQL manual says that with a LIKE clause the statement "displays only rows for those variables with names that match the pattern". The variables are listed only when the component is installed. A good result lists validate_password.policy, validate_password.length and the rest. An empty result means the check comes from somewhere else.

2. Test a candidate password.

SELECT VALIDATE_PASSWORD_STRENGTH('a-test-password-of-the-same-pattern');

The page says the function "takes a password argument and returns an integer from 0 (weak) to 100 (strong)". Its examples return 25 for weak, 50 for lessweak$_@123 and 100 for N0Tweak$_@123!. Use a test string with the same pattern as your real password and not the real one, because a statement you type can be kept in the client's history and in server logs.

3. Read the exact statement that failed. Which statement is it (CREATE USER, ALTER USER, SET PASSWORD), what user name is it for, and does it give the password in clear text or as a hash?

4. Compare the password with the table above. For MEDIUM and the defaults, the password needs at least 8 characters, one uppercase letter, one lowercase letter, one digit and one non-alphanumeric character, and must not be the user name of the session running the statement.

Fix

The fix is a compliant password. The server settings do not change.

First save the list of existing accounts, so you can tell afterwards that only the intended one was added:

mysql -e "SELECT User, Host FROM mysql.user" > ~/mysql-users-before.2026-12-01.txt

The client page says -e will "Execute the statement and quit". Add the options for your login to this command.

Risk: the next statement creates a new database account with a password. The account can log in as soon as it is created, so give it a password you can keep secret, and grant it only what it needs.

At the mysql prompt, create the account with a password that meets the rules. The statement form is the one on the CREATE USER page; the account and password here are placeholders:

CREATE USER 'appuser'@'localhost' IDENTIFIED BY '<a password that meets the policy>';

If the same error comes back, go to step 2 above with a new candidate. The CREATE USER page says an account "when first created has no privileges and the default role NONE", so privileges are a separate step.

To undo it: show the account first, to be sure it is the one you created, then drop it. The DROP USER page says the statement "removes one or more MySQL accounts and their privileges" and "does not automatically close any open user sessions".

SHOW CREATE USER 'appuser'@'localhost';
DROP USER 'appuser'@'localhost';

Then compare SELECT User, Host FROM mysql.user; with the saved list. The two should match.

The same password rules apply when ALTER USER or SET PASSWORD changes an existing account. Save that account's SHOW CREATE USER output first, because the statement shown here only creates a new account and its back-out is a drop.

Lowering the policy or uninstalling the component is a separate decision for the owner of the server. It weakens every account and is not a fix for one rejected password.

Example (illustrative): On db01 (MySQL 8.4, defaults), CREATE USER 'appuser'@'localhost' IDENTIFIED BY 'summer2026'; fails with error 1819. SHOW VARIABLES LIKE 'validate_password%'; shows policy MEDIUM and length 8. The password has 10 characters, so the length is fine, but it has no uppercase letter and no special character. A password of the form Summer#2026 (do not use this one) has 11 characters, one uppercase letter, lowercase letters, a digit and a #, and it is not the name of the account running the statement, so it meets MEDIUM. The engineer picks a new password of that pattern, and the CREATE USER statement then succeeds.

Confirm the fix

  1. The CREATE USER or ALTER USER statement ends without error.
  2. SELECT User, Host FROM mysql.user; shows the new account, and only that one.
  3. A login with the new account and password works.
  4. SHOW VARIABLES LIKE 'validate_password%'; shows the same values as before: the policy was not changed.

What to watch afterwards

  • Scripts and tools that create accounts with generated passwords: they must produce passwords that meet the server's rules, including digits and special characters.
  • Passwords sent as hashes bypass the check. The page says hashed values are not checked; an account created that way may not meet the policy you intended.
  • Moves between servers: a different policy on the new server turns a working script into an error 1819.

Risks and limits

  • These commands have not been run or lab-tested.
  • The pages are for MySQL 8.4 and the component. Version 8.0 and earlier versions use the older plugin, with other variable names.
  • The pages do not map VALIDATE_PASSWORD_STRENGTH() scores to the three policy levels, so a high score alone does not prove a password passes.
  • A password typed into a statement can be stored in the client's history file and may appear in server logs, depending on logging settings.

Sources