Recent research on MySQL 5.6 version found after installation, using a blank password can not login
The installation process has such a sentence:
A RANDOM PASSWORD have BEEN SET for the MySQL root USER!
You'll find that password in '/root/.mysql_secret '.
You must change this password on your first connect,
No other statement but ' SET PASSWORD ' would be accepted.
See the Manual for the semantics of the ' password expired ' flag.
Probably means that a random password has been generated that can be in '/root/.mysql_secret '. Found in
The first connection must change the password and only use the ' SET PASSWORD ' command
The new ' Password expired ' column is added to the user table, which means that the password expires
Let's start MySQL and log in.
Service MySQL Start
mysql-uroot-pvssawf0o
#密码是在 more. Mysql_secret inside record
# The random password set for the root user at Mon Mar 11:13:11 (local time): vssawf0o
Warning:using a password on the command line interface can is insecure.
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 1
Server version:5.6.10
Copyright (c) and/or, Oracle, its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
mysql> Select 1;
ERROR 1820 (HY000): Must SET PASSWORD before executing this statement
#提示必须现更改密码才能执行语句
Mysql> set Password=password (' password2013 ');
Query OK, 0 rows Affected (0.00 sec)
Mysql> Select 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in Set (0.03 sec)
Mysql>
The 5.6 version of security has greatly enhanced, and other new features await subsequent research!
MySQL 5.6 Initialization settings for landing