How do I turn off the mysql password validation?

后端 未结 13 1265
傲寒
傲寒 2021-01-29 17:34

It seems that I may have inadvertently loaded the password validation plugin in MySQL 5.7. This plugin seems to force all passwords to comply to certain rules.

I would l

13条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-29 17:52

    If you want to make exceptions, you can apply the following "hack". It requires a user with DELETE and INSERT privilege for mysql.plugin system table.

    uninstall plugin validate_password;
    SET PASSWORD FOR 'app' = PASSWORD('abcd');
    INSTALL PLUGIN validate_password SONAME 'validate_password.so';
    

    Bland security disclaimer: Consider, why you are making your password shorter or easier and perhaps consider replacing it with one that is more complex. However, I understand the "it's 3AM and just needs to work" moments, just make sure you don't build a system of hacks, lest you yourself be hacked

提交回复
热议问题