MySQL 5.6 Initialization settings for landing

Source: Internet
Author: User

Recent research on MySQL 5.6 version found after installation, using a blank password can not login

The installation process has such a sentence:


A RANDOM PASSWORD have BEEN SET for the MySQL root USER!

You'll find that password in '/root/.mysql_secret '.

You must change this password on your first connect,

No other statement but ' SET PASSWORD ' would be accepted.

See 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 only use the ' SET PASSWORD ' command

The new ' Password expired ' column is added to the user table, which means that 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 Mar 11:13:11 (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) and/or, Oracle, its affiliates. All rights reserved.



Oracle is a registered trademark of the Oracle Corporation and/or its

Affiliates. Other names 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): 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, and other new features await subsequent research!


MySQL 5.6 Initialization settings for landing

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.