YUM CentOS 7 64-bit under mysql5.7 installation configuration

Source: Internet
Author: User
Tags yum repolist

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

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.