Saturday, 15 September 2018

How to Change Password for a User in MySQL 5.6



MySQL provides UPDATE and other statements which can use to change the password of a MySQL user. This tutorial will describe how to change password of a MySQL user using UPDATE statement.

Execute the following query to update password:

mysql> UPDATE mysql.user SET password=PASSWORD('passowrd') WHERE user='username' AND host='<IP address / hostname>';

Execute the following query to reload privileges:

mysql> FLUSH PRIVILEGES;

It’s done! Now check the access with updated password.

No comments:

Post a Comment