Two methods for uninstalling MySQL under CentOS

Source: Internet
Author: User
Tags localhost mysql
1. uninstall the source code installation method: go to the source code directory. if you can run makeuninstall, you can uninstall it. If not, delete it directly. If the directory is./configure -- prefix, use the rm-rf directory name to delete the directory --------------------------------------------------------- [root @ localhost ~]. # Cd

I. how to uninstall the source code installation:
To the source code directory. if you can run make uninstall, you can uninstall it. If not, delete it directly.
If yes./configure -- prefix specifies the directory to be deleted with the rm-rf directory name

-------------------------------------------------------------
[Root @ localhost ~] # Cd/usr/local/src/mysql-5.1.45
[Root @ localhost mysql-5.1.45] # make uninstall
[Root @ localhost mysql-5.1.45] # cd ..
[Root @ localhost src] # rm-rf mysql-5.1.45.
[Root @ localhost src] # cd ..
[Root @ localhost local] # ls
Bin etc games include lib libexec mysql sbin share src web
[Root @ localhost local] # rm-rf mysql/
[Root @ localhost local] # ls
Bin etc games include lib libexec sbin share src web
[Root @ localhost local] #

-------------------------------------------------------------

II. how to uninstall the rpm installation:

Command to check whether mysql is installed
Rpm-qa | grep mysql
Run the rpm-e mysq-* command to uninstall it one by one.
If
Error: Failed dependencies:
Libmysqlclient. so.10 is needed by (installed) libdbi-dbd-mysql-0.6.5-10.RHEL4.1.i386
Libmysqlclient. so.10 is needed by (installed) MySQL-python-1.0.0-1.RHEL4.1.i386
Libmysqlclient. so.10 is needed by (installed) MyODBC-2.50.39-21.RHEL4.1.i386
Libmysqlclient. so.10 is needed by (installed) qt-MySQL-3.3.3-9.3.i386
Mysqlclient10 is needed by (installed) MySQL-python-1.0.0-1.RHEL4.1.i386
Mysqlclient10 = 3.23.58-4. RHEL4.1 is needed by (installed) mysqlclient10-devel-3.23.58-4.RHEL4.1.i386
Use the -- nodeps parameter, for example:
Rpm-e mysqlclient10-devel-3.23.58-4.RHEL4.1 -- nodeps
Rpm-e mysqlclient10-3.23.58-4.RHEL4.1 -- nodeps

Related Article

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.