Mysql8.0+版本修改密码时,使用Mysql5.6语句:set password for root@localhost = password('pwd');
会报错:
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(`pwd`)' at line 1
需使用:set password for root@localhost = 'pwd' 语句,可正常解决。