Following, these steps will help you reset password for root account in MySQL 5.5.9 (not for 5.4 before). 
       Step 1:  Log on as Administator and Stop mysqld (MySQL service) by use Task Manager 
       Step 2:  Create a text file, containing
  UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES; . 
 Note that you must instead 'MyNewPass' by your new password. UPDATE and FLUSH each on a single line. Assume you save it at C:\mysql-init.txt  
       Step 3:  cd to mysql\bin and run command:  mysqld --init-file=C:\\mysql-init.txt --console . Now, you can open mysql and type mysql -u root -p and type your new password. 
Wish you success!
Không có nhận xét nào:
Đăng nhận xét