How to create a six character password in MySQL 5.7

后端 未结 7 879
星月不相逢
星月不相逢 2021-01-31 11:05

I need to create a user with a six character password in new MySQL on my mac. I know that the lowest setting in 5.7 will allows only eight characters. Is there any way to go aro

7条回答
  •  耶瑟儿~
    2021-01-31 11:45

    You are using the password validation plugin. By default it only allows 8 characters and longer passwords. Because it can't check the value of a hash, @RiggsFolly is correct that pre-hashing the password will work.

    However, if you want to change the options, you'll need to set the value of the validate_password_length system variable. You can do this in the configuration file or:

    SET GLOBAL validate_password_length=6;
    

提交回复
热议问题