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
今天IT扫描服务器发现我的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
mysql版本:8.0.26
首先登陆mysql
执行:
SET PASSWORD FOR root = 'NEWPASSWORD';
如果版本比较老尝试一下这个命令:
SET PASSWORD FOR 'root' = PASSWORD('NEWPASSWORD');