Install mysql basic yum and mysql basic yum

Source: Internet
Author: User
Tags aliyun

Install mysql basic yum and mysql basic yum

2017-04-

I. experiment environment

Centos7_x64

Because mariadb is used to replace mysql in centos7 yum source by default, We have to configure the yum source first. Of course, mariadb and mysql are fully compatible, and all commands are common.

Ii. Install mysql1. configure yum source in yum

Here I chose the aliyun source, and the speed is fine. If mariadb is installed, you can directly use yum install mariadb-server to install the client and server.

Backup

1 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

Download the new CentOS-Base.repo to/etc/yum. repos. d/

1 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

To install mysql, We need to download a mysql repo as follows:

Go to this URL: http://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/ find the mysql57-community-release-el7-10.noarch.rpm and download it.

1 [root@sharestore download]# wget http://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql57-community-release-el7-10.noarch.rpm
1 [root@sharestore download]# rpm -ivh mysql57-community-release-el7-10.noarch.rpm 

After installing this package, you will get the yum repo source for both mysql:/etc/yum. repos. d/mysql-community.repo,/etc/yum. repos. d/mysql-community-source.repo.

2. Install mysql

1 [root@sharestore download]# yum install mysql-community-server

The following four packages are installed:

1 (1/4): mysql-community-common-5.7.18-1.el7.x86_64.rpm    | 271 kB   00:01     2 (2/4): mysql-community-libs-5.7.18-1.el7.x86_64.rpm      | 2.1 MB   00:05     3 (3/4): mysql-community-client-5.7.18-1.el7.x86_64.rpm    |  24 MB   08:51     4 (4/4): mysql-community-server-5.7.18-1.el7.x86_64.rpm    | 162 MB   52:30     

 

 

 

 

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.