Simply change or reset your MySQL root password in Ubuntu by doing the following:
- Stop the MySQL server
sudo service mysql stop
- Start mysqld
sudo mysqld --skip-grant-tables &
- Login to MySQL as root
mysql -u root mysql
- Change ‘{your_new_password}‘ with your new root password
UPDATE user SET Password=PASSWORD('{your_new_password}') WHERE User='root';
FLUSH PRIVILEGES;
exit; - Kill mysqld
sudo pkill mysqld
- Start mysql
sudo service mysql start
- Login to phpmyadmin as root with your new password