How can you change the password of a MySQL user?
SET PASSWORD statement is used to change the password of a MySQL user.
SET PASSWORD FOR ‘username’@’hostname’ = PASSWORD(‘password’);
The following statement will set or change the root password.
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456');
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.