Configuring the Yum Source
Download the Yum source RPM installation package on the MySQL website: http://dev.mysql.com/downloads/repo/yum/
#下载mysql源安装包
# wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
# install MySQL source
yum localinstall mysql57-community-release-el7-
8.noarch.rpm
Check that the MySQL source is installed successfully
# Yum Repolist enabled | grep "Mysql.*-community.*"
See indicates successful installation
Install MySQL
# yum Install Mysql-community-server
Start the MySQL service
# Systemctl Start mysqld
View the status of MySQL
# SYSTEMCTL Status Mysqld
See indicates successful start
Boot up
# Systemctl Enable Mysqld
# Systemctl Daemon-reload
Modify the root local login password Change password policy
mysql5.7 The password security check plug-in (Validate_password) is installed by default, and the default password-checking policy requires that the password must contain: uppercase and lowercase letters, numbers, and special symbols, and not less than 8 bits in length.
Reference: MySQL official website password Policy detailed description: Http://dev.mysql.com/doc/refman/5.7/en/validate-password-options-variables.html#sysvar_ Validate_password_policy
Add validate_password_policy configuration in/etc/my.cnf file, specify password policy
The test environment can not require a password policy, add the following configuration in the My.cnf file to disable:
Validate_password = Off
Restarting the MySQL service causes the configuration to take effect:
# systemctl Restart Mysqld
Root default password
After the MySQL installation is complete, a default password is generated for root in the/var/log/mysqld.log file.
Find the root default password in the following way and log in to MySQL
# grep ' Temporary password '/var/log/mysqld.log
# mysql-u Root-p
Enter Password:
Add Telnet user
By default, only the root account is allowed to log on locally, if you want to connect to MySQL on another machine, you must either modify the root to allow remote connections, or add an account that allows remote connections
Modify root allows remote
Mysql> GRANT All privileges on * * to ' root ' @ '% ' identified by ' 123456 ';
mysql> flush Privileges;
Configure default encoding to UTF8
Modify the/ETC/MY.CNF configuration file to add the encoding configuration
Character_set_server=utf8
init_connect= ' SET NAMES UTF8 '
Restarting the MySQL service
# systemctl Restart Mysqld
YUM CentOS 7 64-bit under mysql5.7 installation configuration