Error 1064 in MySQL password change

MySQL must know P203 to change the password

mysql> SET password for ben=password('123456');

Error will be reported during operation

ERROR 1064 (42000): You have an error inyour SQL syntax; check the manual that

corresponds to your MySQL server versionfor the right syntax to use near ‘passw

ord(‘123456′)’ at line 1

The reason is that after MySQL 5.7.6, the password property has been cancelled (select password is used)

(the “123” experiment informs that an error is reported), and the statement to modify the user’s password has changed


Correct statement:

mysql> alter user ben identified by'123456';

Query OK, 0 rows affected (0.15 sec)


reference material:

(maybe there are other solutions, just share the mistakes in learning and my solutions. If there are mistakes in the above statements, please criticize and correct them. Thank you.)

Read More: