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!