1. Stop the mysql service:
/etc/init.d/mysql stop
2. Skip verification and start MySQL
/usr/local/mysql/bin/mysqld_safe –-skip-grant-tables >/dev/null 2>&1 &
3. Prepare to reset a new password
/usr/local/mysql/bin/mysql -u root mysql
4. Reset new password
update user set authentication_string = Password('新密码') where User = 'root';
5. Update permissions
flush privileges;
6. Exit
exit;
7. Restart MYSQL
killall mysqld /etc/init.d/mysql start
Related Recommended article tutorials: phpmyadmin tutorial
The above is the detailed content of How to reset phpmyadmin password if you forget it. For more information, please follow other related articles on the PHP Chinese website!