Use Yum to configure the MySQL source and install Mysql_linux under CentOS 7

Source: Internet
Author: User
Tags mysql in

CentOS7 default database is MARIADB, configuration and so on is not accustomed to, so decided to change to MySQL, but CentOS7 yum source in the default seems to be no MySQL. To solve this problem, we first download the MySQL repo source.

1. Because there is no MySQL in the CentOS yum source, you need to download yum repo profile on MySQL's official website.

wget http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm

2. Install Yum repo file

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

When the execution is complete, two repo files are generated in the/etc/yum.repos.d/directory Mysql-community.repo Mysql-community-source.repo

3. Then update the Yum cache

Yum Clean all
yum Makecache

4. Install MySQL

Yum Install mysql-community-client.x86_64 mysql-community-common.x86_64 mysql-community-devel.x86_64 Mysql-community-libs.x86_64 mysql-community-server.x86_64

Or

RPM Install Mysql-server

5. Start MySQL

Service mysqld Start

6. View the initial password

grep ' temporary password '/var/log/mysqld.log

Get the following content:

2016-10-28t10:36:32.369073z 1 [note] A temporary password are generated for root@localhost:5oazqgpiat!p

7. Login with initial password

Mysql-u root-p//Enter, then enter the initial password found in the previous step

8. Change the initial password

ALTER USER ' root ' @ ' localhost ' identified by ' mynewpass4! ';
MySQL now requires a higher password strength, including uppercase and lowercase letters, numbers, and special characters

At this point, the Mysql-server installation is complete

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.