Uninstall MySQL under Linux

Source: Internet
Author: User

1. First close or kill the MySQL process

2. Check if the system has MySQL installed in RPM package
1) [[email protected] local]# Rpm-qa | Grep-i MySQL
2) if available, remove the package with the RPM-E command

3. Check if there is a MySQL service
1) [[email protected] local]# Chkconfig--list | Grep-i MySQL
2) if available, delete MySQL service
[[email protected] local]# chkconfig--del MySQL

4. View MySQL Folder
1) [[email protected] local]# Whereis MySQL
2) Delete the folder with the RM-FR command

5. Delete the configuration file
[Email protected] local]# RM-FR/ETC/MY.CNF

--Delete process
[[email protected] etc]#/etc/init.d/mysql stop
Shutting down MySQL .... [OK]

[Email protected] etc]# Rpm-qa | Grep-i MySQL
Mysql-devel-community-5.1.68-1.rhel5
Mysql-server-community-5.1.68-1.rhel5
Mysql-client-community-5.1.68-1.rhel5
[Email protected] etc]# rpm-e Mysql-devel-community-5.1.68-1.rhel5
[Email protected] etc]# rpm-e Mysql-server-community-5.1.68-1.rhel5
[Email protected] etc]# rpm-e Mysql-client-community-5.1.68-1.rhel5

[Email protected] etc]# Chkconfig--list | Grep-i MySQL
[Email protected] etc]#

[[email protected] etc]# Whereis MySQL
MySQL:/usr/lib/mysql
[Email protected] etc]# Rm-fr/usr/lib/mysql
[Email protected] local]# RM-FR/ETC/MY.CNF

Uninstall MySQL under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.