Forgetting your phpMyAdmin password is a frustrating situation that many users may encounter. But don't worry, in this article you will learn step by step how to recover your password. Here is a detailed roadmap to guide you.
If you forgot your phpMyAdmin username and password, you can first try some methods to remember your password:
If the methods you used to remember your password did not work, you can follow these steps to reset your phpMyAdmin password:
mysql -u root -p
USE mysql; UPDATE user SET authentication_string=PASSWORD('new_password') WHERE User='phpmyadmin_username'; FLUSH PRIVILEGES;
sudo service mysql restart
Knowing the MySQL root password is important to gain access to phpMyAdmin. If you do not know the root password or want to change it, follow these steps:
sudo mysqld_safe --skip-grant-tables &
mysql -u root
FLUSH PRIVILEGES; SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_root_password');
If the above steps did not work, you can try the alternative methods:
config.inc.php
To avoid forgetting your phpMyAdmin password and increase its security, you can follow these tips: