Created
February 3, 2022 17:24
-
-
Save thesuhu/2859b245fd05a0ac45e5af6a4a144671 to your computer and use it in GitHub Desktop.
Uninstall or Remove MySQL from Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure MySQL is not running | |
sudo systemctl stop mysql | |
# Then purge all of the MySQL packages | |
sudo apt purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-* | |
# Then delete all of the MySQL files | |
sudo rm -rf /etc/mysql /var/lib/mysql /var/log/mysql | |
# Finally clean all packages that are not needed: | |
# List item | |
sudo apt autoremove | |
sudo apt autoclean | |
# Remove history if needed | |
rm ~/.mysql_history |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment