I assume that you don't need MySQL anymore and you have already taken backup of your important databases. I suggest you to take backup of your important MySQL databases.
Remove MySQL configuration and data. If you have changed database location in your MySQL configuration, you need to replace /var/lib/mysql according to it.
I forgot the MySQL root password and needed to reset.
I tried this, but it didn't work, because it kept saying "can't write logs" or something similar.
My solution was to completely remove MySQL from Ubuntu 13.10 and fresh installation.
I assume that you don't need MySQL anymore and you have already taken backup of your important databases. I suggest you to take backup of your important MySQL databases.
Note: Your all mysql data will be lost.
First make sure that MySQL service is stopped.
Remove MySQL related all packages completely.
Remove MySQL configuration and data. If you have changed database location in your MySQL configuration, you need to replace
/var/lib/mysql
according to it.(Optional) Remove unnecessary packages.
(Optional) Remove apt cache.
all the above solutions are correct but I would try with
This will uninstall all mysql related packages.
This will remove mysql 5.6 from ubuntu 15.04
First you need to stop your mysql server from service.
Then You can use purge command to uninstall
Note: the above based on your package list. I have installed both server and client. This will for your convineient
I don't use Ubuntu much but what I think you should try is what I did.
I first typed this in command line :
sudo apt-get remove --purge mysql-server mysql-client mysql-common
,then followed with this below :
sudo apt-get autoremove
and finally typed this :
sudo apt-get autoclean
.I found that it was removed.
Completly uninstall mysql:
Based on this answer and many others...
I forgot the MySQL root password and needed to reset. I tried this, but it didn't work, because it kept saying "can't write logs" or something similar.
My solution was to completely remove MySQL from Ubuntu 13.10 and fresh installation.
I had to run the last command because Ubuntu sometimes keeps some libs even you try to purge them all.
Now, I use this command to install MySQL server and client:
When I tried
sudo apt-get purge mysql*
it didn't work.Purged mysql5 with:
Then for cleaning up:
Try this, It will fully wipeout out every single file of MySQL from your system: