How do I turn off the mysql password validation?

后端 未结 13 1397
傲寒
傲寒 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 18:02

    On some installations, you cannot execute this command until you have reset the root password. You cannot reset the root password, until you execute this command. Classic Catch-22.

    One solution not mention by other responders is to temporarily disable the plugin via mysql configuration. In any my.cnf, in the [mysqld] section, add:

    skip-validate_password=1
    

    and restart the server. Change the password, and set the value back to 0, and restart again.

提交回复
热议问题