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.

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

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.