1. 程式人生 > >修改MySQL的密碼報錯解決

修改MySQL的密碼報錯解決

 

MySQL版本:mysql-8.0.13-winx64

報錯資訊:

mysql> set password for [email protected] = password(`123456`);
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

 解決辦法:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
Query OK, 0 rows affected (0.07 sec)