《MYSQL教程Linux下卸载系统自带的MySQL数据库(步骤)》要点:
本文介绍了MYSQL教程Linux下卸载系统自带的MySQL数据库(步骤),希望对您有用。如果有疑问,可以联系我们。
redhat Enterprise 5 自带一个mysql的版本,将其卸载,步骤如下:
a. 查找已安装的myslq 版本:
MYSQL学习
出现:
MYSQL学习
卸载命令:
MYSQL学习
卸载后/var/lib/mysql中的数据及/etc/my.cnf不会删除,如果确定没用后就手工删除
MYSQL学习
或参考:系统 CentOS4.3
安装方法
#yum -y install mysql-server
mysql版本
mysql-server.i386-4.1.20-1.RHEL4.1MYSQL学习
删除方法:
MYSQL学习
然后,再输入命令:
MYSQL学习
[root@jbxue mysql]$ sudo yum -y remove mysql-5.0.45-7.el5
Password:
Loading "security" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.0.45-7.el5 set to be erased
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: dovecot
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: mysql-server
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: mysql-connector-odbc
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: libdbi-dbd-mysql
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: dovecot
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: mysql-server
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: mysql-connector-odbc
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: libdbi-dbd-mysql
--> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: mysql-connector-odbc
--> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: mysql-server
--> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: MySQL-python
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) for package: mysql-connector-odbc
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) for package: mysql-server
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) for package: MySQL-python
--> Processing Dependency: mysql for package: libdbi-dbd-mysql
--> Processing Dependency: mysql = 5.0.45-7.el5 for package: mysql-server
--> Processing Dependency: mysql for package: MySQL-python
---> Package mysql.i386 0:5.0.45-7.el5 set to be erased
--> Running transaction check
---> Package mysql-server.x86_64 0:5.0.45-7.el5 set to be erased
---> Package MySQL-python.x86_64 0:1.2.1-1 set to be erased
---> Package libdbi-dbd-mysql.x86_64 0:0.8.1a-1.2.2 set to be erased
---> Package perl-DBD-MySQL.x86_64 0:3.0007-1.fc6 set to be erased
---> Package mysql-connector-odbc.x86_64 0:3.51.12-2.2 set to be erased
---> Package dovecot.x86_64 0:1.0.7-2.el5 set to be erased
--> Finished Dependency ResolutionMYSQL学习
Dependencies ResolvedMYSQL学习
=============================================================================
Package Arch Version Repository Size
=============================================================================
Removing:
mysql x86_64 5.0.45-7.el5 installed 7.5 M
mysql i386 5.0.45-7.el5 installed 7.3 M
Removing for dependencies:
MySQL-python x86_64 1.2.1-1 installed 288 k
dovecot x86_64 1.0.7-2.el5 installed 3.7 M
libdbi-dbd-mysql x86_64 0.8.1a-1.2.2 installed 55 k
mysql-connector-odbc x86_64 3.51.12-2.2 installed 420 k
mysql-server x86_64 5.0.45-7.el5 installed 22 M
perl-DBD-MySQL x86_64 3.0007-1.fc6 installed 328 kMYSQL学习
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 0 Package(s)
Remove 8 Package(s) MYSQL学习
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : mysql-server ######################### [1/8]
warning: /var/log/mysqld.log saved as /var/log/mysqld.log.rpmsave
Erasing : MySQL-python ######################### [2/8]
Erasing : mysql ######################### [3/8]
Erasing : libdbi-dbd-mysql ######################### [4/8]
Erasing : perl-DBD-MySQL ######################### [5/8]
Erasing : mysql-connector-odbc ######################### [6/8]
Erasing : dovecot ######################### [7/8]
Erasing : mysql ######################### [8/8]MYSQL学习
Removed: mysql.x86_64 0:5.0.45-7.el5 mysql.i386 0:5.0.45-7.el5
Dependency Removed: MySQL-python.x86_64 0:1.2.1-1 dovecot.x86_64 0:1.0.7-2.el5 libdbi-dbd-mysql.x86_64 0:0.8.1a-1.2.2 mysql-connector-odbc.x86_64 0:3.51.12-2.2 mysql-server.x86_64 0:5.0.45-7.el5 perl-DBD-MySQL.x86_64 0:3.0007-1.fc6
Complete!
MYSQL学习
到此,Linux下自带的mysql已经完全卸载,此时,再输入:
MYSQL学习
显示系统已经没有mysql服务;
MYSQL学习
欢迎参与《MYSQL教程Linux下卸载系统自带的MySQL数据库(步骤)》讨论,分享您的想法,维易PHP学院为您提供专业教程。