1.檢視是否安裝mysql
rpm -qa | grep -i mysql
2.關閉mysql服務
service mysql status 檢視執行狀態
service mysql stop 停止執行
service mysql status 檢視執行狀態是否停止
3.解除安裝mysql的相關元件,ev後面的內容就是步驟一所查到的內容
rpm -ev mysql-devel-5.6.23-1.linux_glibc2.5
有時候需要按順序刪除,有時候會報以下錯誤
error: failed dependencies:
libmysqlclient.so.18()(64bit) is needed by (installed) postfix-2:2.10.1-6.el7.x86_64
libmysqlclient.so.18(libmysqlclient_18)(64bit) is needed by (installed) postfix-2:2.10.1-6.el7.x86_64
這時候就要用下面的辦法刪除
rpm -e --noscripts ***********
4.收集mysql對應的資料夾資訊
find / -name mysql
若果有,都要刪掉
rm -rf **********
還需要刪除乙個配置檔案 my.conf
5.刪除mysql使用者和使用者組
[root@izuf6147skj2ic0e6i0599z ~]# more /etc/passwd | grep mysql
mysql:x:27:27:mysql server:/var/lib/mysql:/bin/bash
[root@izuf6147skj2ic0e6i0599z ~]# find / -name mysql
[root@izuf6147skj2ic0e6i0599z ~]# more /etc/shadow | grep mysq
mysql:!!:17324::::::
[root@izuf6147skj2ic0e6i0599z ~]# more /etc/group | grep mysql
mysql:x:27:
[root@izuf6147skj2ic0e6i0599z ~]# userdel mysql
[root@izuf6147skj2ic0e6i0599z ~]# groupdel mysql
groupdel: group 'mysql' does not exist
6.確認是否刪除
rpm -qa | grep -i mysql
linux 下完全解除安裝mysql
rpm包安裝方式的mysql解除安裝 1關閉mysql服務 root server bin service mysql stop shutting down mysql.success root server bin service mysql status error mysql is not r...
centos下完全解除安裝mysql
yum方式安裝的mysql 1 yum remove mysql mysql server mysql libs compat mysql51 2 rm rf var lib mysql 3 rm etc my.cnf 檢視是否還有mysql軟體 rpm qa grep mysql 如果存在的話,繼...
centos下完全解除安裝mysql
yum方式安裝的mysql 1 yum remove mysql mysql server mysql libs compat mysql51 2 rm rf var lib mysql 3 rm etc my.cnf 檢視是否還有mysql軟體 rpm qa grep mysql 如果存在的話,繼...