Change MySql Password

Somehow I ended up having MySql installed by XAMPP with super long password, and I want just to change it back to root.

I have searched a lot on the StackOverflow and Google, none of them work, until I saw reset root password with wrong mysql config. The first comment works!

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)


-------The end of this article  Thank you for your reading-------