Installation of MySQL 5.7 in CentOS

Source: Internet
Author: User

To prevent licensing mode from starting

Edit/ETC/MY.CNF and add the following:

Linux Environment: VI/ETC/MY.CNF

Add the following two lines to the [MySQL (and PHP collocation best combination) d] Configuration segment:

User=mysql

Skip-grant-tables

Save to exit Edit.

Restart Mysqld.

Service mysqld Restart

Use MySQL password-free connection, change password and password expiration flag;

[[email protected] ~]# Mysqlwelcome toThe MySQL Monitor. CommandsEnd  with;or\g.your MySQL Connection ID is 3Server Version:5.7. -MySQL Community Server (GPL) Copyright (c) -, ., Oracleand/orits affiliates. Allrights reserved. Oracle isA registered trademark ofOracle Corporationand/oritsaffiliates. Names may trademarks oftheir respectiveowners. Type'Help ;' or '\h'  forHelp. Type'\c'  toClear the Currentinput Statement.mysql> Select User(); MySQL>show databases;+--------------------+| Database           |+--------------------+|Information_schema||Mysql||Performance_schema||Sys|+--------------------+4Rowsinch Set(0.00sec) MySQL> Select User();+--------+| User()|+--------+|[Email protected]|+--------+1Rowinch Set(0.00sec) MySQL>UPDATEMysql.User SETAuthentication_string=PASSWORD ('[Email protected]!'), password_expired='N' where USER='Root'; Query OK,1Rows affected,0Warning (0.00sec) MySQL> ExitBye

Normal connection:

[Email protected] ~]# mysql-u root-penter password:welcome to the MySQL monitor.  Commands End With; or \g.your MySQL connection ID is 3Server version:5.7.16 mysql Community Server (GPL) Copyright (c), 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>

  

Installation of MySQL 5.7 in CentOS

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.