How to create a six character password in MySQL 5.7

后端 未结 7 786
星月不相逢
星月不相逢 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:46

    It's possible to entirely disable the password "plugin" that seems overly strict by running the following: uninstall plugin validate_password

    Should you need it again you can turn it back on via: INSTALL PLUGIN validate_password SONAME 'validate_password.so'

    Optionally, you could disable it, set your password and re-enable it:

    uninstall plugin validate_password;
    CREATE USER 'newsier'@'localhost' IDENTIFIED BY 'special';
    INSTALL PLUGIN validate_password SONAME 'validate_password.so';
    

    Further reading:

    • https://dev.mysql.com/doc/refman/5.7/en/server-plugin-loading.html
    • https://dev.mysql.com/doc/refman/5.7/en/validate-password-plugin-installation.html

提交回复
热议问题