修改mysql密码时遇见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(‘123456’)’ at line 1报错
如下图:
意思是:您的SQL语法有错误;请查看MySQL服务器版本对应的手册,在第1行的“password(‘123456’)”附近使用正确的语法。
用这个就可以了:ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
已经成功了