mysql 1045 错误

按照网上提示修改mysql密码

mysql -uroot -pXXXX
  use mysql;
  update user set authentication_string=('afafa') where user='root' and host='localhost';
  flush privileges;

结果重启服务后发现新旧密码后登录不了

最终不输入密码直接进去提示设置密码了




明明好了现在又出现这个问题了。。


win10设置显示隐藏文件,进入ProgramData目录下找到my.ini文件。

原文地址:https://www.cnblogs.com/tabCtrlShift/p/9590743.html