Resetting Mysql Root Password
Kill the running mysql process sudo service mysql stop Start mysql in safe mode and skip grant tables sudo mysqld_safe --skip-grant-tables --skip-networking & Log in with root mysql -u root Initial privilege flush flush privileges; Use mysql database use mysql; Set a new mysql root password update user set authentication_string=PASSWORD("newPassword") where user='root'; Final privilege flush flush privileges; Exit mysql exit; Stop mysql service sudo /etc/init.d/mysql stop Start mysql service sudo /etc/init.d/mysql start Log in to database to test it mysql -u root -p