Removing mysql from ubuntu

Below are the steps to remove mysql from ubuntu (it also works when you do not have the mysql root password)

The commands worked fine with Ubuntu LTS 12.0.4 and and mysql 5.5

sudo service mysql stop  #or mysqld
sudo killall -9 mysql
sudo killall -9 mysqld
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo deluser mysql
sudo rm -rf /var/lib/mysql
sudo apt-get purge mysql-server-core-5.5
sudo apt-get purge mysql-client-core-5.5

Have a great day!

Ref: StackOverflow