CentOS 7 To install the Mysql server steps to share _mysql

Source: Internet
Author: User
Tags gpg

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~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.