Skip to content

Instantly share code, notes, and snippets.

@waghcwb
Last active January 19, 2017 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save waghcwb/8712457d6ca9abf4d0a925ed6624ec99 to your computer and use it in GitHub Desktop.
Save waghcwb/8712457d6ca9abf4d0a925ed6624ec99 to your computer and use it in GitHub Desktop.
complete uninstall mysql
#!/usr/bin/env bash
set -e
sudo service mysql stop
sudo killall -9 mysql
sudo killall -9 mysqld
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo deluser mysql
sudo delgroup mysql
sudo apt-get purge mysql-*
sudo rm -rf /var/log/mysql /etc/mysql /var/lib/mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment