1)After start booting : Ctrl + Alt + F1 --> Recovery Mode
2)To reboot from terminal : sudo reboot
2)To reboot from terminal : sudo reboot
/usr/bin/mysqld_safe --skip-grant-tables &
You have to run above using root (sudo -i)
3> It shows mysql daemon started with databases in /var/lib/mysql
Since server is running with --skip-grant-tables flag, means you can access the database without password
Now write the command :
mysql --user=root mysql
Enter your root password
4> Now since we have to update our password in User table. Therefore
We provide command :
Update user set Password=PASSWORD("Your New Password") Where User='root';5> Flush Privileges :
Means clear and reload the priviledges.
So command will be
flush privileges; More about flush option click here
6> Exit Mysql
7>Now You have to stop the Daemon Mysql server
It is a two step process :
Firstly bring the Background process to Foreground
Command used for this is :
fg
Kill the Foreground process
Ctrl + c [But sometimes Ctrl +z]
8>Now start the mysql
sudo /etc/init.d/mysql start
9>Now go to mysql
mysql --user=root --pass=newpassword