How to install mysqlserver_MySQL in CentOS7

Source: Internet
Author: User
Previously, RHEL6.3 and 6.4 were used. The system disk contains mysqlserver. After configuring the yum source, you can directly install the mysql server on the yuminstallmysql-server. recently, CentOS7.1 was used, I found that the system disk does not provide the mysql-server RPM Package. I collected the files from the Internet that used to use RHEL 6.3 and 6.4. The system disk contains the mysql server. After configuring the yum source, you can directly install mysql-server in yum install mysql-server to install the mysql server. recently, CentOS 7.1 was used and it was found that the system disk did not provide the mysql-server RPM Package. I searched for it online for a long time, finally, find the answer on the official mysql website.

Just add the following file mysql-community.repo file in the/etc/yum. repos. d/directory with the following content:

# Enable to use MySQL 5.6[mysql56-community]name=MySQL 5.6 Community Serverbaseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/5/$basearch/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql 

The above version is 5.6.

The content of version 5.7 is 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 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

Run yum install mysql-community-server.

I am using version 5.6. during installation, the following error is reported:

GPG key retrieval failed: [Errno 14] curl #37-"Couldn't open file/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql"

Apparently, there is no RPM-GPG-KEY-mysql file locally, so I made some modifications to the above mysql-community.repo. the modified 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

Run the yum install mysql-community-server command again to install OK ~

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.