reset root password with wrong mysql config

I'd suggest to forget the bat file and do it manually:

  • Go to your xampp\mysql\bin\ folder
  • Edit my.ini and insert skip-grant-tables below [mysqld]
  • Restart MySQL
  • Set new password for your root user by running UPDATE mysql.user SET Password=PASSWORD('new_password') WHERE User='root' in phpMyAdmin in the mysql database (or just leave it like this if MySQL cannot be accessed from remote hosts)

Here is a great link

In short goto

http://localhost/security/

and there you can reset the password. It is web interface rather than you have to look for a file somewhere.


I face the same problem & simply update the password with below SQL query With HeidiSQL (Free mySQL editor).

UPDATE mysql.user SET Password=PASSWORD('your_password') WHERE User='root'

Then, stop mysql from xampp control panel & start it again.