Resetting forgotten phpmyadmin password

Simply change or reset your MySQL root password in Ubuntu by doing the following:

  1. Stop the MySQL serversudo service mysql stop
  2. Start mysqldsudo mysqld --skip-grant-tables &
  3. Login to MySQL as rootmysql -u root mysql
  4. Change ‘{your_new_password}‘ with your new root passwordUPDATE user SET Password=PASSWORD('{your_new_password}') WHERE User='root';
    FLUSH PRIVILEGES;
    exit;
  5. Kill mysqldsudo pkill mysqld
  6. Start mysqlsudo service mysql start
  7. Login to phpmyadmin as root with your new password