mysql8.0修改密码无效的问题

今天安装了mysql8,但是在修改默认密码的时候发现一直无法成功,下面给出解决的办法。

一直报ERROR 1064 (42000): 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 'password('aa123456')' at line 1;

解决的办法;

导致这些错误出现的原因是mysql的版本问题,我使用的是mysql8.0.11版本,解决该问题使用的语句是:

1:“ ALTER USER 'root'@'localhost' identified by '123456' ; ”

2:flush privileges ;  刷新

https://www.cnblogs.com/laumians-notes/p/9069498.html(这篇文章讲解了详细的安装步骤)。

猜你喜欢

转载自www.cnblogs.com/takemyjavalisfe/p/10637561.html