How to install MySQL server in CentOS 7

Source: Internet
Author: User
Tags gpg

Previously used Rhel 6.3 and 6.4, the system disk with MySQL server, after the configuration of Yum source, direct yum install mysql-server can be installed MySQL server side, the recent use of CentOS 7.1, found that the system disk does not provide mysql-server RPM package, on the internet for half a day, and finally found the answer on the official MySQL website.

Simply add the following file Mysql-community.repo file under the/etc/yum.repos.d/directory, as follows:

The above corresponds to the 5.6 version.

The contents of version 5.7 are as follows:

# Note:mysql 5.7 is currently in development. For use at your own risk.#. 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 releasebaseurl=http://repo.mysql.com/yum/ mysql-5.7-community/el/6/$basearch/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-mysql

Finally execute the Yum install Mysql-community-server.

I am using 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 Rpm-gpg-key-mysql file locally, so the above Mysql-community.repo made a few changes, the revised content is as follows:

[Mysql56-community]name=mysql 5.6 Community serverbaseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/5/$ Basearch/enabled=1gpgcheck=0

Re-execute the Yum install mysql-community-server command, install ok~

How to install MySQL server in CentOS 7

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.