MySQL Modify Administrator account password

Source: Internet
Author: User

Error message: Error 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:yes)
MySQL Agent error message: Error (HY000): Lost connection to MySQL Server at ' reading authorization packet ', System error:0
Change Password:
Prerequisite: The password of the root account should be known.

Login Root:

Execute the statement;

mysql> Update mysql.user set Password=password (' Letmein ') where user= ' root '

Mysql> FLUSH Privileges
Mysql> exit
Note: The key must be refreshed here.

Many times it is very easy to change the password, but when with other projects jumbled together error, often do not know how to deal with,

Mysql-u root-pletmein-h 127.0.0.1-p 3307 Login unsuccessful

Change to: Mysql-u root-pletmein-h 127.0.0.1-p 3307 or login unsuccessful

Change: Mysql-u root-p-H 127.0.0.1-p 3307 Login Successful

====> concludes that the MySQL password is null

====> then learned to change the password

MySQL Modify Administrator account password

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.