The syntax to alter a user password is :
SET PASSWORD [FOR user] =
{
PASSWORD('cleartext password')
| OLD_PASSWORD('cleartext password')
| 'encrypted password'
}
SET PASSWORD FOR 'user'@'ip addres' = PASSWORD('text password');
UPDATE mysql.user SET Password=PASSWORD('text password')
WHERE User='user' AND Host='ip address';
FLUSH PRIVILEGES;
GRANT USAGE ON *.* TO 'user'@'ip address' IDENTIFIED BY 'text password';
Very important to know that SET PASSWORD may be recorded in server logs or in a history file such as ~/.mysql_history, which means that clear-text passwords may be read by anyone having read access to that information. So check the permissions on this file.