How to completely delete MySQL for clean install

Solution 1:

I found a solution at: https://stackoverflow.com/questions/25244606/completely-remove-mysql-ubuntu-14-04-lts/28113482#28113482

sudo rm -rf /var/lib/mysql/mysql
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mysql-server

During the reinstallation I was prompted for a (new) password. During the unsuccessful prior reinstallation I let it empty, and mysql kept the old forgotten password of the previous installation, which I thought was empty.