You have an error in your SQL syntax; check the manual thatcorresponds to your

Error:

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 '('123
456') where user='root'' at line 1

I have seen many methods: 

change Password:

Method 1: Doesn't work

 set password for 用户名@localhost=password('新密码');

Method 2: invalid

set password =password('你的密码');
flush privileges;

Method 3: Works! ! !

       ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';

Guess you like

Origin blog.csdn.net/qq_41722524/article/details/122752134