Altaro

  Home | Troubleshooting |  Quick Setup  |  Cisco How to  |  MS-MVP  |  Wireless  |  Forums   | Site Map | Services  | About Us | Chicagotech MVP  | Search                          

Clearapps network inventory
software.

 

How to reset MySQL password in Windows


1. Open the my.ini from c:\Program Files\MySQL\my.ini with notepad.

2. Add skip-grant-tables to the under the [mysqld] section

3. Save the file and restart the MySQL service. This has disabled the grant tables so you should be able to log into mysql without any password.

 

4. To reset mysql password, run command prompt.

5. Log into MySQL with the MySQL command-line utility from c:\Program Files\MySQL\bin. No user or password parameters are required since grant tables have been disabled.

6.Execute the following statement:

UPDATE mysql.user SET PASSWORD = PASSWORD('MyPassword') WHERE user = ‘root’ and host=’localhost’;

 

Here are the result of example to set root as password.

C:\xampp\mysql\bin>mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.5.8 MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> mysql -u root
-> UPDATE user SET Password = PASSWORD('root') WHERE User = 'root'
mysql>

7. Remove “skip-grant-tables’ from the my.ini file and restart the MySQL service.

 

  

 



Post your questions, comments, feedbacks and suggestions

Contact a consultant

Related Topics


 

 


 

 

Hit Counter   This web is provided "AS IS" with no warranties.
Copyright © 2002-2013 ChicagoTech.net, All rights reserved. Unauthorized reproduction forbidden.