How to reset the MySQL root password on Ubuntu Linux

By | July 1, 2013

mysql


sudo /etc/init.d/mysql stop
sudo mysqld --skip-grant-tables &
UPDATE user SET Password=PASSWORD('NEWPASSWORDHERE') WHERE User='root'; FLUSH PRIVILEGES; exit;
sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql start