删除 mysql 服务器

删除 mysql 服务器
root:~# sudo apt-get --purge remove mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 cryptsetup : Depends: plymouth but it is not going to be installed
              Recommends: kbd but it is not going to be installed
              Recommends: console-setup but it is not going to be installed
 dmsetup : Depends: util-linux (> 2.16) but it is not going to be installed
           Depends: udev (> 141-2) but it is not going to be installed
 e2fsprogs : PreDepends: util-linux (>= 2.15~rc1-1) but it is not going to be installed
 initramfs-tools : Depends: udev (>= 147~-5) but it is not going to be installed
                   Depends: util-linux (> 2.15~rc1) but it is not going to be installed
 libpam-systemd : Depends: systemd-services (= 204-5ubuntu20.9) but it is not going to be installed
 libsolid4 : Depends: udev but it is not going to be installed
             Recommends: upower but it is not going to be installed
 mountall : Depends: udev but it is not going to be installed
            Depends: plymouth but it is not going to be installed
 udisks2 : Depends: udev but it is not going to be installed
           Recommends: policykit-1 but it is not going to be installed

答案1

首先删除创建的用户
sudo deluser mysql sudo delgroup mysql 然后停止mysql的进程 sudo service mysql stop #or mysqld 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 autocleansudo deluser mysql sudo rm -rf /var/lib/mysql sudo apt-get purge mysql-server-core-5.5 sudo apt-get purge mysql-client-core-5.5

相关内容