MySQL SET PASSWORD Statement Syntax
The syntax for the MySQL SET PASSWORD statement to change an arbitrary user's password is as follows:
SET PASSWORD FOR 'user'@'host' = PASSWORD('newpassword');
To change your own password, the syntax is:
SET PASSWORD = PASSWORD('newpassword');
That is, to change another user's password, you will need to specify their username and hostname exactly as it is in the User and Host columns in the mysql.user table.