[Solved Perfectly] MySQL ERROR 1064 (42000): You have an error in your SQL syntax;

The perfect solution to error 1064

1064 error code appears when setting the root account password in MySQL


at first, I thought the user name and password could not be the same, so I changed it to 123456

and found it still couldn’t.

Solution

Enter as follows:

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

By ‘…’ is followed by the new password.


Read More: