1. First enter DOS and open a cmd
c:\>sc stop mysql
2. Enter the directory
cd C:\xampp\mysql\bin
Explanation C:\xampp\ The mysql\bin path should be changed to your own path, the same below.
C:\xampp\mysql\bin> mysqld --defaults-file="C:\xampp\mysql\bin\my.ini" --console --skip-grant-tables
3. Then reopen a cmd and enter the directory
cd C:\xampp\mysql\bin
4. Finally enter the following commands in sequence:
C:\xampp\mysql\bin>mysql -uroot mysql mysql>UPDATE user SET Password=PASSWORD('123456') where USER='root'; mysql>FLUSH PRIVILEGES; mysql>quit C:\xampp\mysql\bin>mysqladmin shutdown
5. Then restart MySQL normally Just service. Username root, password 123456.
Recommended related articles and tutorials: phpmyadmin tutorial
The above is the detailed content of What should I do if I forget my phpmyadmin login password?. For more information, please follow other related articles on the PHP Chinese website!