SET PASSWORD = PASSWORD('newpassword');
我访问了 sequel pro 网站,并在打开应用程序时尝试在新查询中运行命令,但出现了语法错误。之后,我决定尝试终端路由。我已通过终端登录 sql,并尝试运行UPDATE mysql.user SET authentication_string=PASSWORD('newpassword') WHERE User='root';
,UPDATE mysql.user SET password=password('newpassword') 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 '('newpassword') WHERE User='root'' at line 1
我相信我拥有最新版本 8.0.17。