I want to create a new user in MySQL with the syntax:
create user 'demo'@'localhost' identified by 'password';
But it returns an error:
Your password does not satisfy the current policy requirements.
I have tried many passwords but they don't work. How can I fix this?
For MySQL 8 you can use the following script:
SET GLOBAL validate_password.LENGTH = 4;
SET GLOBAL validate_password.policy = 0;
SET GLOBAL validate_password.mixed_case_count = 0;
SET GLOBAL validate_password.number_count = 0;
SET GLOBAL validate_password.special_char_count = 0;
SET GLOBAL validate_password.check_user_name = 0;
ALTER USER 'user'@'localhost' IDENTIFIED BY 'pass';
FLUSH PRIVILEGES;