Login initialization settings in MySQL 5.6

Source: Internet
Author: User
Tags command line local time log

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

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.