当前位置: 首页 > 工具软件 > MySQL Client > 使用案例 >

yum mysql 安装client_centos6 只安装mysql client(安装包安装和yum安装mysql)

谷弘致
2023-12-01

方法一下载安装:

1、在/home创建mysql目录,下载如下四个软件包

http://mirrors.sohu.com/mysql/MySQL-5.7/

wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-client-5.7.18-1.el6.x86_64.rpm

wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-common-5.7.18-1.el6.x86_64.rpm

wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-libs-5.7.18-1.el6.x86_64.rpm

wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-server-5.7.18-1.el6.x86_64.rpm

2、检查mysql rpm相关的包是否安装并去除

[root@centos-6 mysql]# rpm -qa | grep -i mysql

mysql-libs-5.1.73-8.el6_8.x86_64

[root@centos-6 mysql]# rpm -e mysql-libs-5.1.73-8.el6_8.x86_64

error: Failed dependencies:

libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-8.el6.x86_64

libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-8.el6.x86_64

mysql-libs is needed by (installed) postfix-2:2.6.6-8.el6.x86_64

[root@centos-6 mysql]#

将依赖包一并删除

[root@centos-6 mysql]# yum remove -y mysql-libs

再次查询是否删除干净

[root@centos-6 mysql]# rpm -qa | grep -i mysql

[root@centos-6 mysql]#

3、同时安装这三个rpm包

rpm -ivh mysql-community-client-5.7.18-1.el6.x86_64.rpm mysql-community-common-5.7.18-1.el6.x86_64.rpm mysql-community-libs-5.7.18-1.el6.x86_64.rpm

方法二yum安装:

首先要到MySQL yum库的下载页面http://dev.mysql.com/downloads/repo/yum/

下载:mysql57-community-release-el7-11.noarch.rpm

安装:rpm -Uvh mysql57-community-release-el7-9.noarch.rpm

yum安装server:

yum install mysql-community-server

yum安装client:

yum install mysql-community-client

http://blog.csdn.net/Holmofy/article/details/69364800

 类似资料: