修改MySQL的密码报错解决

MySQL版本:mysql-8.0.13-winx64

报错信息:

mysql> set password for root@localhost = 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)

猜你喜欢

转载自blog.csdn.net/xuejiaguniang/article/details/84562048
今日推荐