Apparently, quite a number of people are looking into my humble website trying to find out how to change a password of an existing user. Doing this is easy in Oracle with a ALTER USER command. In MySQL, it is different in such a way that you need to update a table. Here’s the command.
SET password = PASSWORD('mynewpassword')
WHERE user = 'kwatog';
An alternative (and apparently official one) is by using the syntax below.
SET PASSWORD [FOR user] =
| OLD_PASSWORD('some password')
| 'encrypted password'
SET PASSWORD 'kwatog'@'localhost = PASSWORD('mynewpassword')
Still can’t believe? Go head to the official documentation of MySQL at the following URL.