卸載系統(tǒng)自帶的mariadb
[root@g-1 ~]# rpm -qa | grep -i mariadbmariadb-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
RPM 安裝MySQL
首先去官網(wǎng)下載mysql-5.7.19-1.el7.x86_64.rpm-bundle.tar
網(wǎng)址如下
http://ftp.ntu.edu.tw/MySQL/Downloads/MySQL-5.7/
拷貝到服務(wù)器解壓
[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 報(bào)錯(cuò)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