搜索类似的问题,得到的答案类似于下面

mysql>SET PASSWORD FOR
'root'@'localhost' = OLD_PASSWORD('newpassword');

但是这些方法试了之后都是会提示语法的错误,如下:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'odl_password('123456')' at line 1

为此东找西找,发现了一个适用的方法:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码';
FLUSH PRIVILEGES;

这样之后 ,客户端就突然连接上了服务器

解锁用户

ALTER USER 'furrywall'@'localhost' ACCOUNT UNLOCK;


共勉

相关文章:

  • 2021-08-04
  • 2021-06-04
  • 2022-01-19
  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-17
  • 2021-08-23
  • 2021-06-12
  • 2021-07-19
相关资源
相似解决方案