Your password does not satisfy the current policy requirements

后端 未结 19 2657
眼角桃花
眼角桃花 2020-12-12 08:33

I want to create a new user in mysql with syntax:

create user \'demo\'@\'localhost\' identified by \'password\';

But it returns an error: <

19条回答
  •  旧时难觅i
    2020-12-12 09:19

    The problem is that your password wont match the password validation rules. You can simple follow below steps to solve your problem.

    You can simply see password validation configuration matrix by typing below code.

    mysql-> SHOW VARIABLES LIKE 'validate_password%';
    

    Then in your matrix you can find below variables with corresponding values and in there you have to check validate_password_length , validate_password_number_count and validate_password_policy.

    Check the values used for those variables. Make sure your validate_password_length should not be greater than 6. You can set that to 6 by using below code.

    SET GLOBAL validate_password_length = 6;
    

    And after that you need to set validate_password_number_count to 0. Do it by using below code.

    SET GLOBAL validate_password_number_count = 0;
    

    Finally you have to set you validate_password_policy to low. Having that as Medium or High wont allow your less secure passwords. Set that to low by below code.

    SET GLOBAL validate_password_policy=LOW;
    

提交回复
热议问题