Linux修改MySQL密码报错1064You have an error in your SQL syntax; check the manual that corresponds to your

Linux修改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 ''root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456'' at line 1

解决

更改修改密码格式即可:

alter user 'root'@'localhost' identified by '123456';

你可能感兴趣的:(Linux,sql,mysql,sql,数据库)