The easiest way to install MySQL5.7 Yum!

Source: Internet
Author: User

Yum install MySQL5.7 The simplest way! Text first step to install CentOS slightly

CentOS version is 6.5

Second step to install the Yum repository list

To install MySQL using Yum, to use the Yum repository in MySQL, first download the warehouse for your system from the official website

https://dev.mysql.com/downloads/repo/yum/

I downloaded the mysql57-community-release-el6-11.noarch.rpm.

Installationyum localinstall mysql-community-release-el6-5.noarch.rpm

Step three install MySQL

Yum Install Mysql-community-server

Fourth step to start MySQL

sudo service mysqld start

The fifth step is to set the root user password

View initial Password

grep "Password"/var/log/mysqld.log

2017-06-11T20:14:59.383788Z 1 [Note] A temporary password is generated for [email protected]: e.Vsb5=28=.v

The password is: E. Vsb5=28=.v

SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' 14130220 '); Set a password for the root account

If there is an error error 1819 (HY000): Your password does not satisfy the current policy requirements

Setting a password is too simple

set global validate_password_policy=0; // 默认1 即必须含有1个数字、小写或大写字母、特殊字符set global validate_password_length=4; // 默认8 即密码长度
Sixth step MySQL remote connection authorization

GRANT all privileges on . To ' myuser ' @ '% ' identified by ' MyPassword ' with GRANT OPTION;

Note: ' MyUser ', ' mypassword ' need to be replaced with the actual user name and password.

The seventh step is to add the following configuration: (fix Chinese garbled)

Vim/etc/my.cnf

[mysql]default-character-set=utf8[mysqld]character_set_server=utf8

Restart

Service mysqld Restart

The easiest way to install MySQL5.7 Yum!

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.