To reset the Mysql Password on a Windows Server
1) Open Command prompt run >> cmd.
2) Go to mysql\bin directory.
3) Start Mysql with skip grant table option
Quote:
mysqld-nt --skip-grant-tables
This command will run as background process and you need to open a new command prompt to change the password.
4) Go to mysql\bin directory.
5) Login to mysql using "mysql -uroot"
6) flush privileges;
7) UPDATE user SET password=password("your root password") WHERE user="root"; #to reset password
8) GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'password' WITH GRANT OPTION; # grant all privilege
9) flush privileges;
10) \q
Now kill the mysql process which is running in background and restart MySQL service.
|