A recent study of MySQL 5.6 version found that after installation, the use of a blank password can not log
In the process of installation there is such a sentence:
A RANDOM PASSWORD has BEEN SET for the MySQL root USER!
You'll find this password in '/root/.mysql_secret '.
You must the password on your
No other statement but ' SET PASSWORD ' would be accepted.
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 use the ' SET PASSWORD ' command only
The ' Password expired ' column is added to the user table, which means 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-11:13:11 2013 (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), 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark the Oracle Corporation and/or its
Affiliates. Names may 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): You 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 the rest of the new features awaiting follow-up research!
This article is from the "Shadow Knight" blog, please be sure to keep this source http://andylhz2009.blog.51cto.com/728703/1161923