sed -n '6p' /var/log/mysqld.log
mysql>set global validate_password_policy=0;
mysql>set global validate_password_length=4;
mysql> ALTER USER USER() IDENTIFIED BY 'password';
或者用
mysql_secure_installation
进行安全设置
sudo service mysql stop
sudo nano /etc/my.cnf
在[mysqld]
下面添加 skip-grant-tables
sudo service mysql start
mysql>update mysql.user set authentication_string=password('newpassword') where user=‘root';
mysql>flush privileges;
mysql>quit;
skip-grant-tables
sudo service mysql restart
重新登录后执行从方法一第二部开始的所有操作步骤
“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill
标 题:解决 MySQL 5.7 中 Your password does not satisfy the current policy requirements. 问题