Linux how to completely uninstall MySQL database

Source: Internet
Author: User

Under the Linux development, MySQL database is often used, for beginners, in Linux How to load MySQL database, may be more painful, here is a brief introduction, how to uninstall mSQL database.

A) Check the system for MySQL installed in RPM package

[Plain] view plaincopy

    1. [Email protected] ~]# Rpm-qa | Grep-i MySQL

    2. Mysql-server-5.1.49-1.glibc23

    3. Mysql-client-5.1.49-1.glibc23

Uninstalling Mysql-server-5.1.49-1.glibc23 and Mysql-client-5.1.49-1.glibc23

[Plain] view plaincopy

    1. [Email protected] ~]# rpm-e mysql-client-5.1.49-1.glibc23

    2. [Email protected] ~]# rpm-e mysql-server-5.1.49-1.glibc23

b) See if there is a MySQL service

[Plain] view plaincopy

    1. [Email protected] ~]# Chkconfig--list | Grep-i MySQL

    2. MySQL 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Delete MySQL Service

[Plain] view plaincopy

    1. [[email protected] ~]# chkconfig--del MySQL

c) Delete the distributed MySQL folder

[Plain] view plaincopy

    1. [[email protected] ~]# Whereis MySQL

    2. MySQL:/usr/lib/mysql/usr/share/mysql

Delete separately

[Plain] view plaincopy

    1. [Email protected] lib]# rm-rf/usr/lib/mysql/

    2. [Email protected] lib]# Rm-rf/usr/share/mysql


With these steps, MySQL should have been completely uninstalled.


Linux how to completely uninstall MySQL database

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.