Thursday, February 20, 2014

Reset Password MySQL User

Reset Password MySQL User


Sometime we also forgot or miss mysql user password. and here are the way to reset password mysql user. But we need to have mysql root `s password.

If you are also forgot or miss mysql root`s password. 
Here is my previous article:  Recovery MySQL Root Password

HowTo -  Reset password mysql user.

1. Log in as root 
(In this example database server is "localhost", If  mysql server on different server we need to specify with -h option for database host.)
mysql -u root -p
2. Use mysql database and update new password for user "vannak"
use mysql;
UPDATE mysql.user SET Password=PASSWORD('NewPassw0rd') WHERE User='vannak' AND Host='localhost';
FLUSH PRIVILEGES;

Enjoy,
Below screen shoot is the full process HowTo:


No comments:

Post a Comment