Centos7 Yum install MySQL

Source: Internet
Author: User

One view version
Cat/etc/redhat-release

Two-install Yum source
RPM-IVH https://repo.mysql.com//mysql57-community-release-el7-9.noarch.rpm
Note: 1 If the above connection is invalid, please open the following connection, replace the download connection according to the system version
2 default installation version 5.7, if you want to install version 5.6, modify/etc/yum.repos.d/mysql-community.repo
3 Change the enabled=1 of the 5.7 source to enabled=0. Then change the 5.6 source enabled=0 to Enabled=1.

Three-install MySQL
Yum Install Mysql-community-server

Four service start-up
Systemctl Start mysqld
Systemctl Enable Mysqld

Five modify the root local login password
Mysqladmin-u root-p oldpass Password "Newpass"
Note: 1 after the MySQL installation is complete, a default password is generated for root in the/var/log/mysqld.log file
2 grep ' temporary password '/var/log/mysqld.log find root default password
3 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. Otherwise it will prompt error 1819 (HY000): Your password does not satisfy the current policy requirements error

Centos7 Yum install MySQL

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.