MySQL login problem

Source: Internet
Author: User

The landing problem of mysql5.7 under 1.CENTOS6

Description of the problem:ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:no)

Workaround: 1. Close Service mysqld Stop

2.--skip-grant-tables start Mysqld_safe--user=mysql--skip-grant-tables

 .- A-16T11: One: -.958205Z Mysqld_safe Logging to '/var/log/mysqld.log'. .- A-16T11: One: -.963470Z Mysqld_safe Logging to '/var/log/mysqld.log'. .- A-16T11: One: ,.009734Z Mysqld_safe Starting mysqld daemon withDatabases from /var/Lib/Mysql

3. Login Command Mysql-uroot

4. Select database: Use MySQL

5. Change Password and host:update user set host= '% ', authentication_string=password (' root ') where user= ' root '

6. Refresh permissions:flush privileges; Note This step don't forget

7. Restart Services: Service mysqld restart;

8. Login: Mysql-uroot-p Root

2. mysql5.7 Password Reset Issue

Problem Description: ERROR 1820 (HY000): Must reset your password using ALTER USER statement before executing this statement.

Problem Resolution: 1. Set Password: Set password = password (' 123456 ');

Error: Error 1819 (HY000): Your password does not satisfy the current policy requirements

The reason is that MySQL5.6.6 increased the password strength verification plugin Validate_password, the relative parameters set the length of the more strict password,

123456 does not conform to MySQL's default password constraint, If you must use this password, please modify the relevant configuration,

Reference: http://blog.csdn.net/zyz511919766/article/details/12752741

2. Set Password never Expires: Alter user ' root ' @ '% ' password expire never;

3. Flush flush privileges;

MySQL login problem

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.