has been used Rhel 6.3 and 6.4, the system disk with the MySQL server, configuration good yum source, direct yum install mysql-server can install MySQL server end, recently used CentOS 7.1, found that the system disk did not provide mysql-server RPM package, in the online search for a half-day, and finally the official MySQL website to find the answer.
Simply add the following file Mysql-community.repo files under the/etc/yum.repos.d/directory, which reads as follows:
# Enable to use MySQL 5.6
[mysql56-community]
name=mysql 5.6 Community Server
baseurl=http:// repo.mysql.com/yum/mysql-5.6-community/el/5/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki /rpm-gpg/rpm-gpg-key-mysql
The above corresponds to version 5.6.
The contents of the 5.7 version are as follows:
# Note:mysql 5.7 is currently in development. For use at your own risk.
# Please read with Sub pages:https://dev.mysql.com/doc/relnotes/mysql/5.7/en/
[MYSQL57-COMMUNITY-DMR]
name =mysql 5.7 Community Server Development Milestone release
baseurl=http://repo.mysql.com/yum/mysql-5.7-community /el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-mysql
Finally executes yum install Mysql-community-server can.
I used the 5.6 version of the content, during the installation process, reported the following error:
GPG Key retrieval failed: [Errno] curl#37-"couldn ' t open file/etc/pki/rpm-gpg/rpm-gpg-key-mysql"
Obviously, there is no local rpm-gpg-key-mysql file, so the above Mysql-community.repo made a few changes, the revised contents are as follows:
[Mysql56-community]
Name=mysql 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/5/$basearch/
Enabled=1
gpgcheck=0
Re-execute the Yum install mysql-community-server command and install ok~