Your password does not satisfy the current policy requirements

后端 未结 19 2620
眼角桃花
眼角桃花 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:15

    This error message has nothing to do with the stored password in your table. It also occures if you type (on SQL console)

    "select password('123456789')"

    or if

    "select password('A123456789')"

    or if

    "select password('A!123456789')"

    If you type

    "select password('A!a123456789')"

    then it will work. Just use big + small letters, special chars and numbers to create your password.

    You can disable these checks in my.cnf, but then you will have a security risk!

    in [mysqld] add:

    validate_password_policy=LOW
    validate_password_special_char_count=0
    validate_password_length=0
    validate_password_mixed_case_count=0
    validate_password_number_count=0
    

提交回复
热议问题