Completely remove MySQL from Ubuntu

Time:2021-12-21

Completely remove MySQL from Ubuntu

@(study notes)

sudo -i
service mysql stop
killall -KILL mysql mysqld_safe mysqld
apt-get --yes purge mysql-server mysql-client
apt-get --yes autoremove --purge
apt-get autoclean
deluser --remove-home mysql
delgroup mysql
rm -rf /etc/apparmor.d/abstractions/mysql /etc/apparmor.d/cache/usr.sbin.mysqld /etc/mysql /var/lib/mysql /var/log/mysql* /var/log/upstart/mysql.log* /var/run/mysqld
updatedb
exit
sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt-get autoclean

Reference article:
Article 1
Article 2

Recommended Today

Strong, copy difference

Strong, how is copy different? Practice makes true knowledge! Upper code strong #import “ViewController.h” @interface ViewController () @property (nonatomic,strong)NSString *name; @end @implementation ViewController – (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. Nsmutablestring * string = [[nsmutablestring alloc] initwithstring: @ “Zhang San”]; self.name = string; Nslog (@ “string:% @, address:% […]