Mysql 5.7 CENTOS7 Environment installation

Source: Internet
Author: User

Download the installation of red Hat Enterprise Linux 7/oracle Linux 7 (Architecture Independent) at the following URL, RPM package (MYSQL57-COMMUNITY-RELEASE-EL7 -8.NOARCH.RPM)

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


can be directly executed

Yum Install http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm

dependencies resolved==================================================================================== =============================================================================================================== ====== package                                                 Arch                                 Version                                Repository                                                              size========================================================== =============================================================================================================== ================================installing: mysql57-community-release                               noarch                              el7-8                                  /mysql57-community-release-el7-8.noarch                               8.2 ktransaction summary================ =============================================================================================================== ==========================================================================install  1  PACKAGETOTAL SIZE: 8.2 KINSTALLED SIZE: 8.2 KIS THIS OK [Y/D/N]:  y


Installing MySQL server with Yum

yum install mysql-community-serverdependencies resolved======================================== =============================================================================================================== ================================================== package                                                        Arch                                     Version                                        repository                                           size================ =============================================================================================================== ==========================================================================installing:  mysql-community-libs                                          x86_64                                   5.7.14-1.el7                                   mysql57-community                                   2.1 m     replacing  mariadb-libs.x86_64 1:5.5.47-1.el7_2  mysql-community-libs-compat                                   x86_64                                   5.7.14-1.el7                                  mysql57-community                                   2.0 m     replacing   mariadb-libs.x86_64 1:5.5.47-1.el7_2 mysql-community-server                                        x86_64                                   5.7.14-1.el7                                   mysql57-community                                   152 MInstalling for dependencies:  mysql-community-client                                        x86_64                                   5.7.14-1.el7                                  mysql57-community                                    24 M  mysql-community-common                                        x86_64                                   5.7.14-1.el7                                   mysql57-community                                  271  ktransaction summary===================================================================================== =============================================================================================================== =====install  3 packages  (+2 dependent packages) Total download size:  180 mis this ok [y/d/n]: y


MySQL 5.6 or later installed with a random password, in the MySQL log query

Cat/var/log/mysqld.log |grep "A temporary password" [Note] A temporary password is generated for [email protected]: thm34d e873

thm34de873 is the random password for this MySQL 5.7 installation.

Open MySQLServer Service, try to login successfully.

Systemctl start mysqldmysql-u root-p Enter password:thm34de873welcome to the MySQL Monitor. Commands End With; or \g.your MySQL connection ID is 7Server version:5.7.14copyright (c), and Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names trademarks of their respectiveowners. Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.mysql>


MySQL 5.7 requires the initial password to be changed before performing the operation, and the new password is written in single quotation marks.

error 1820  (HY000):  you must set password before executing this  statement 
mysql> SELECT 1; ERROR 1820 (HY000): Must set PASSWORD before executing this statementmysql> set PASSWORD = PASSWORD (' New_password ') ; Query OK, 0 rows affected (0.01 sec) mysql> SELECT 1;+---+| 1 |+---+| 1 |+---+1 row in Set (0.00 sec)

Password has strength requirements, if you want to close, add Validate-password=off in/etc/my.cnf

This article is from the "focus on drilling 100 years" blog, please be sure to keep this source http://titandeng.blog.51cto.com/823817/1841459

Mysql 5.7 CENTOS7 Environment installation

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.