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
修改密码时使用:mysql> update user set password=password("123456") 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 '("123456") where user='root'
update user set password=password("123456' at line 1,经查询是因为mysql版本问题导致。
使用下面代码:

浙公网安备 33010602011771号