Problems encountered during operation of the mysql5.7

Source: Internet
Author: User

The mysql5.7 installed last week (which is different from the previous version)
Get ready for work today (practice exercise)
Open the virtual machine, start MySQL (because my virtual machine is loaded with 5.6 version, in the 5.7 when the time spent a lot of effort, finally turned to the great God installed, and so the process of research, in writing to share)
I wrote a startup script here, execute it (the statement is very long, the script is easy to execute)
So that MySQL will start up.
Mysql-u root-p, enter the password, smooth landing
Let's see what the library is.
show databases;
Then the error is:
mysql> show databases;
ERROR 1820 (HY000): Must reset your password using ALTER USER statement before executing this statement.
Baidu, try to change the password (this method works):
Alter user ' root ' @ ' localhost ' identified by ' Youpassword ';
After execution, check again: show databases is OK:
mysql> show databases;
| Database |
| Information_schema |
| MySQL |
| Performance_schema |
| SYS |
| topsec |
5 rows in Set (0.07 sec)
No problem.
After resetting the password, did not re-change the password, resulting in subsequent login error, restart MySQL error, Mysqld_safe has been restarted, the process of mysqld killed, and then the MySQL process killed, in the restart on the good (personal negligence, because my virtual machine installed two MySQL, So more trouble)
Log in to MySQL and change the password:
Update user set Authentication_string=password (' 123456 ') where user= ' root ';
mysql5.7 's password field is not password, but authentication_string
And then reboot is OK.

Problems encountered during operation of the mysql5.7

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: 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.