mysql 5.7 修改密码

  mysql 5.7 ,user表就没有password 这个字段了。

update user set password=password('12345678') where user='root' and host='localhost'; 

这样当然就改不了密码了。

update user set authentication_string=password('12345678') where user='root' and Host = 'localhost';
flush privileges;

尴尬。

原文地址:https://www.cnblogs.com/Springmoon-venn/p/7500621.html