MySQL 5.6 login initialization settings

Source: Internet
Author: User

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!

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.