centos6.5_x64 install MySQL-5.6.17, in the case of the MySQL service has been started, a password error error 2002 (HY000)

Source: Internet
Author: User
Tags mysql login

1, modify the MySQL configuration file, so that MySQL login to skip password verification

Skip-grant-tables

2. Restart MySQL Service

Service MySQL Restart

3. Go to MySQL and change the password in the user table

[Root] #mysql-u rootmysql> show Databases;mysql> Use mysql;mysqlset Password=password ('root'where'root'; MySQL>exit

4, restore the MySQL configuration file, the code line just added skip-grant-tables delete or use # comment out

5. After restarting MySQL, enter MySQL again, using the password you just modified

Mysql-u Root-proot

6. Set the password for the database again

Mysql> SET Password=password ('root');

7. After re-entering the MySQL database, if you can view the database, complete the password reset

Done ~

centos6.5_x64 install MySQL-5.6.17, in the case of the MySQL service has been started, a password error error 2002 (HY000)

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.