Install MySQL on CentOS 7 Linux

http://repo.mysql.com/

 

[root@localhost server]# rpm -qa | grep mysql
[root@localhost server]# rpm -e --nodeps mysql
[root@localhost server]# rpm -e --nodeps pcp-pmda-mysql-3.10.6- 2.el7.x86_64
[root@localhost server]# wget http://repo.mysql.com/mysql-community-release-el7.rpm
--2016-06-03 16:17:54--  http:// repo.mysql.com/mysql-community-release-el7.rpm
is resolving host repo.mysql.com (repo.mysql.com)... 23.59.168.96
is connecting to repo.mysql.com (repo.mysql.com) |23.59.168.96|:80... connected.
HTTP request made, waiting for response... 200 OK
Length: 8896 (8.7K) [application/x-redhat-package-manager]
Saving to: "mysql-community-release-el7.rpm"

100%[================================================ ==========================>] 8,896 --.-K/s time 0s     

2016-06-03 16:17:54 (126 MB/s) - Saved "mysql-community-release-el7.rpm" [8896/8896])

[root@localhost server]# rpm -ivh mysql-community-release-el7.rpm
warning: mysql-community-release-el7.rpm: header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
in preparation... # ################################ [100%]
Upgrading/installing...
   1:mysql-community-release -el7-7 ################################# [100%]

[root@localhost server]# yum install mysql-server
Package Architecture Version Source Size
=================================== ===================================================== ===============================
Installing:
 mysql-community-client x86_64 5.6.31-2.el7 mysql56-community 19 M
      replace mariadb.x86_64 1:5.5.47-1.el7_2
 mysql-community-devel x86_64 5.6.31-2.el7 mysql56-community 3.4 M
      replace mariadb-devel.x86_64 1:5.5.47-1.el7_2
 mysql- community-libs x86_64 5.6.31-2.el7 mysql56-community 2.0 M
      Replace mariadb-libs.x86_64 1:5.5.47-1.el7_2
 mysql-community-server x86_64 5.6.31-2.el7 mysql56-community 59 M
installed for dependencies:
 mysql-community-common x86_64 5.6.31-2. el7 mysql56-community 256k

Transaction Summary
=================================================== ===================================================== ===============
Install 4 packages (+1 dependent packages)

Total downloads: 84 M
Is this ok [y/d/N]:

Total 358 kB/s | 84 MB 00:03:59 Retrieving key     from
file :///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Import GPG key 0x5072E1F5:
 User ID: "MySQL Release Engineering < [email protected] > "
 fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5
 package: mysql-community-release-el7-7.noarch (installed)
 from: /etc/pki/rpm-gpg /RPM-GPG-KEY-mysql
continue? [y/N]:
Installed:
  mysql-community-client.x86_64 0:5.6.31-2.el7 mysql-community-devel.x86_64 0:5.6.31-2.el7           
  mysql-community-libs.x86_64 0: 5.6.31-2.el7 mysql-community-server.x86_64 0:5.6.31-2.el7          

Installed as a dependency:
  mysql-community-common.x86_64 0:5.6.31-2.el7                                                                   

替代:
  mariadb.x86_64 1:5.5.47-1.el7_2   mariadb-devel.x86_64 1:5.5.47-1.el7_2   mariadb-libs.x86_64 1:5.5.47-1.el7_2 

complete!

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326604612&siteId=291194637