Some time we face issues related to mysql installation. But even after purging and reinstalling does not solve problem because some of the mysql configuration remains in the system. This post is related to remove mysql from linux and its configuration as well.
- Uninstall mysql package
- Remove mysql directory
- Install mysql package again
sudo apt-get remove mysql mysql-server
You can find mysql directory path entry for mysql directory in my.cnf with attribute datadir.
mv /var/lib/mysql /var/lib/mysql_bkp
sudo apt-get install mysql mysql-server