Uninstall MySQL – How to Remove MySQL from Your System
MySQLsoftware-uninstall
I installed MySQL using sudo apt-get. Now I need to remove it from my system.
How can I do that?
Best Answer
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.
Best Answer
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.