删除卸载Linux自带的MySQL
由于redhat Enterprise 5 中自带一个mysql的版本,如果在安装linux前未选择mysql的安装此步就可跳过,因为我当时安装了现在将其卸载 ,步骤如下:
a. 查找已安装的myslq 版本:
#rpm -qa | grep mysql (注意大小写,如果mysql 不行就换MySQL)
出现:
[ysong@sva_rec mysql]$ rpm -qa | grep mysql
mysql-5.0.45-7.el5
libdbi-dbd-mysql-0.8.1a-1.2.2
mysql-5.0.45-7.el5
mysql-server-5.0.45-7.el5
mysql-connector-odbc-3.51.12-2.2
卸载后/var/lib/mysql中的数据及/etc/my.cnf不会删除,如果确定没用后就手工删除
rm -f /etc/my.cnf
rm -rf /var/lib/mysql
后,在输入命令:
[ysong@sva_rec 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
相关新闻>>
- 发表评论
-
- 最新评论 更多>>