I recently studied MySQL 5.6 and found that I cannot log on to MySQL with a blank password after installation.
The installation process includes the following sentence:
A random password has been set for the MySQL root USER!
You will find that password in '/root/. mysql_secret '.
You must change that password on your first connect,
No other statement but 'set password' will be accepted.
See the manual for the semantics of the 'password expired' flag.
Probably, a random password has been generated and can be found in '/root/. mysql_secret '.
You must change the PASSWORD for the first connection and can only use the 'set password' command.
The 'password expired' column is added to the user table, that is, the password expires.
Let's start mysql and then log on
Service mysql start
Mysql-uroot-pvssAWF0O
# The password is recorded in more. mysql_secret.
# The random password set for the root user at Mon Mar 25 11:13:11 2013 (local time): vssAWF0O
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 1
Server version: 5.6.10
Copyright (c) 2000,201 3, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be 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
# Prompt that you must change the password to execute the 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 security of version 5.6 is greatly enhanced. other new features will be available for future research!