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.
It probably means that a random password has been generated in '/root /. mysql_secret '. you can only use the 'set password' command to add the 'password expired' column in the user table, that is, when the password expires, we start mysql and log on to service mysql start mysql-uroot-pvssAWF0O # The password is in more. record in mysql_secret # The random password set for the root user at Mon Mar 25 11:13:11 2013 (local time): vssAWF0OWarning: Using a password on the command line interface can be insecure. welcome to the MySQL m Onitor. 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 itsaffiliates. other names may be trademarks of their respectiveowners. type 'help; 'or' \ H' for help. type '\ C' to clear the current input statement. mysql> select 1; ERROR 18 20 (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) the security of mysql> 5.6 is greatly enhanced. other new features are waiting for future research!
This article is from the "Shadow Knight" blog, please be sure to keep this source http://andylhz2009.blog.51cto.com/728703/1161923