mysql5.7版本修改密码和 之前的版本不同,这里记录一下;
use mysql;
#
SHOW VARIABLES LIKE 'validate_password%';
#设置密码验证策略为low
set global validate_password_policy=LOW;
#5.7以后密码改成authentication_string字符串了
update mysql.user set authentication_string=password('lNsk8mIXTOrpmJ8n') where user='root' and Host = '%';
#重要
flush privileges;