Home > Back-end >  MySQL database is saying the password does not meet the required policy yet it should
MySQL database is saying the password does not meet the required policy yet it should

Time:08-02

So this is my sql im trying to run (if i can get it to work ill change the password)

CREATE USER 'foxxything'@'192.168.100.%';
SET PASSWORD FOR 'foxxything'@'192.168.100.%' = '32$jV8klN2nGp2BmLuUb';
GRANT SELECT, INSERT, UPDATE, DELETE ON `foxxything`.* TO 'foxxything'@'192.168.100.%';
REVOKE REFERENCES, CREATE, DROP, ALTER, INDEX, TRIGGER ON `foxxything`.* FROM 'foxxything'@'192.168.100.%';
FLUSH PRIVILEGES;

here are the password policy's

validate_password.dictionary_file   
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

and yet it errors like this.

Your password does not satisfy the current policy requirementsYour password does not satisfy the current policy requirements

so i dont understand, any help would be a huge help!

CodePudding user response:

It's throwing that error on the first sql statement when you create the user. Creating the user that way sets the password to nothing which is a violation of the validate_password settings.

Instead specify the password when creating the user with the IDENTIFIED BY clause:

CREATE USER 'foxxything'@'192.168.100.%' IDENTIFIED BY '32$jV8klN2nGp2BmLuUb';
  • Related