卸载系统自带的mariadb
[root@g-1 ~]# rpm -qa | grep -i mariadb
mariadb-libs-5.5.52-1.el7.x86_64
mariadb-5.5.52-1.el7.x86_64
[root@g1 ~]# rpm -e --nodeps mariadb-libs-5.5.52-1.el7.x86_64
[root@g1 ~]# rpm -e --nodeps mariadb-5.5.52-1.el7.x86_64
首先去官网下载
mysql-5.7.19-1.el7.x86_64.rpm-bundle.tar
网址如下
http://ftp.ntu.edu.tw/MySQL/Downloads/MySQL-5.7/
拷贝到服务器解压
[root@g-1 ~]# cd software/
[root@g-1 software]# mkdir mysql
[root@g-1 software]# tar -xf mysql-5.7.19-1.el7.x86_64.rpm-bundle.tar -C mysql
[root@g-1 software]# cd mysql/
[root@g-1 mysql]# ls -ltr
total 578984
-rw-r--r--. 1 7155 31415 25085192 Jun 24 2017 mysql-community-client-5.7.19-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 3778852 Jun 24 2017 mysql-community-devel-5.7.19-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 278292 Jun 24 2017 mysql-community-common-5.7.19-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 46236988 Jun 24 2017 mysql-community-embedded-5.7.19-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 24077820 Jun 24 2017 mysql-community-embedded-compat-5.7.19-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 128296360 Jun 24 2017 mysql-community-embedded-devel-5.7.19-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 2238032 Jun 24 2017 mysql-community-libs-5.7.19-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 2115696 Jun 24 2017 mysql-community-libs-compat-5.7.19-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 55456196 Jun 24 2017 mysql-community-minimal-debuginfo-5.7.19-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 171537176 Jun 24 2017 mysql-community-server-5.7.19-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 15258732 Jun 24 2017 mysql-community-server-minimal-5.7.19-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 118490200 Jun 24 2017 mysql-community-test-5.7.19-1.el7.x86_64.rpm
[root@g12-1 mysql]#
依次安装下面的rpm包
注意
centos 7.4 报错
warning: mysql-community-server-5.7.19-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
libnuma.so.1()(64bit) is needed by mysql-community-server-5.7.19-1.el7.x86_64
libnuma.so.1(libnuma_1.1)(64bit) is needed by mysql-community-server-5.7.19-1.el7.x86_64
libnuma.so.1(libnuma_1.2)(64bit) is needed by mysql-community-server-5.7.19-1.el7.x86_64
在rpm -ivh
mysql-community-server-5.7.19-1.el7.x86_64.rpm
安装yum install -y libnuma
[root@g-1 mysql]# rpm -ivh mysql-community-common-5.7.19-1.el7.x86_64.rpm
[root@g-1 mysql]# rpm -ivh mysql-community-libs-5.7.19-1.el7.x86_64.rpm
按照顺序安装RPM包
[root@g-1 mysql]# rpm -ivh mysql-community-common-5.7.19-1.el7.x86_64.rpm
[root@g-1 mysql]# rpm -ivh mysql-community-libs-5.7.19-1.el7.x86_64.rpm
[root@g-1 mysql]# rpm -ivh mysql-community-client-5.7.19-1.el7.x86_64.rpm
[root@g-1 mysql]# rpm -ivh mysql-community-server-5.7.19-1.el7.x86_64.rpm
[root@g-1 mysql]# rpm -ivh mysql-community-libs-compat-5.7.19-1.el7.x86_64.rpm
声明:本站部分内容及图片来自互联网,转载是出于传递更多信息之目的,内容观点仅代表作者本人,如有任何标注错误或版权侵犯请与我们联系(Email:2595517585@qq.com),我们将及时更正、删除,谢谢。