Your password does not satisfy the current policy requirements

后端 未结 19 2515
眼角桃花
眼角桃花 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条回答
  • 2020-12-12 09:35

    For MySql 8 you can use 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;
    
    0 讨论(0)
提交回复
热议问题