Pages

Friday, March 25, 2011

How to reset MySQL password for XAMPP ( Lost password Mysql)

1. Go to your xampp\mysql\bin\ folder
  • Edit my.ini and insert skip-grant-tables below [mysqld]
  • Restart MySQL
2. Set new password for your root user by running
D:\xampp\mysql\bin
# mysql.exe -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.41 Source distribution

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

mysql> UPDATE mysql.user SET Password=PASSWORD('123456') WHERE User='root'
-> ;
Query OK, 1 row affected (0.03 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql>


3. Go to step1
to your xampp\mysql\bin\ folder
  • Edit my.ini and Delete skip-grant-tables below [mysqld]
4. Restart Mysql.




No comments: