CentOS7 installing MySQL Server

Source: Internet
Author: User

The default yum source for CentOS 7 is mariadb, not our usual MySQL.

This article will show you how to install MySQL through yum.

    1. First download the Yum source rpm package

Specific address in:

http://repo.mysql.com/

You can choose the version you want.

What I have downloaded is:

wget http://repo.mysql.com/mysql57-community-release-el7.rpm

    1. Installing RPM files

Install the Yum source from MySQL by command:

RPM-IVH mysql57-community-release-el7.rpm

You can see the associated repo file in/ETC/YUM.REPOS.D:

[[email protected] yum.repos.d]# ls

Centos-base.repo Centos-debuginfo.repo Centos-media.repo Centos-vault.repo Mysql-community-source.repo

Centos-cr.repo Centos-fasttrack.repo Centos-sources.repo Mysql-community.repo Openlogic.repo

[Email protected] yum.repos.d]#

    1. Yum install MySQL

Install with the Yum command:

Yum Install-y mysql-server

    1. Start MySQL

Start:

Systemctl Start mysqld

View:

Systemctl Status Mysqld

Set boot up:

Systemctl Enable Mysqld

View by Netstat:

[Email protected] yum.repos.d]# NETSTAT-TUNLP

Active Internet connections (only servers)

Proto recv-q send-q Local address Foreign address State Pid/program Name

TCP 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd

TCP 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 808/dnsmasq

TCP 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 807/sshd

TCP 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 909/master

TCP6 0 0::: 111:::* LISTEN 1/systemd

TCP6 0 0::: $:::* LISTEN 1526/httpd

TCP6 0 0::: +:::* LISTEN 808/DNSMASQ

TCP6 0 0::: $:::* LISTEN 807/sshd

TCP6 0 0:: 1:25:::* LISTEN 909/master

TCP6 0 0::: 3306:::* LISTEN 24276/mysqld

UDP 0 0 127.0.0.1:323 0.0.0.0:* 498/chronyd

UDP 0 0 0.0.0.0:617 0.0.0.0:* 12738/rpcbind

UDP 0 0 0.0.0.0:40620 0.0.0.0:* 757/dhclient

UDP 0 0 0.0.0.0:53 0.0.0.0:* 808/dnsmasq

UDP 0 0 0.0.0.0:68 0.0.0.0:* 757/dhclient

UDP 0 0 0.0.0.0:111 0.0.0.0:* 12738/rpcbind

UDP6 0 0:: 1:323:::* 498/chronyd

UDP6 0 0::: 617:::* 12738/rpcbind

UDP6 0 0::: 40419:::* 757/dhclient

UDP6 0 0::: +:::* 808/dnsmasq

UDP6 0 0::: 111:::* 12738/rpcbind

You can see Port 3306.

CentOS7 installing MySQL Server

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.