请问这句SQL哪里有问题呢?

mysql> UPDATE mysql.user SET password = password('123') WHERE user = 'root'; 
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 '('123') WHERE user = 'root'' at line 1

mySql 8.0.19

阅读 1.3k
1 个回答

这个命令在mysql 8版本以上不起作用了,使用下面命令
alter user'root'@'localhost'identified by'newpassword';

mysql 8 set password

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题