MySQL username password login not on

Source: Internet
Author: User

Issue 1: Just installed MySQL, set the user name password root, login OK, and then even how can not even on the

Operation Steps:

Input: Mysql-uroot-proot

Tip: ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:yes)

Troubleshooting 1:

    • Direct input to MySQL, connection successful
    • show databases; Only INFORMATION_SCHEMA & Test two sheets
    • Check it out, it's not enough authority.

Troubleshooting 2:

    • Stop Mysql:service mysqld Stop first
    • Safe Mode start Mysqld_safe--skip-grant-tables &
    • Log in mysql:mysql root with root MySQL
    • Use MySQL;
    • Select Host,user,password from User;
    • Find localhost This host does not have user name and password configured, no wonder =

Repair:

    • Update user set password= ' root ', user= ' root ' where host= ' localhost ';
    • Select Host,user,password from user, to confirm that localhost already has the corresponding user name and password
    • Kill Mysqld_safe, launch Mysqld:service mysqld start
    • Login Mysql:mysql-uroot-proot with username and password
    • Bingo, it's a success.

MySQL username password login not on

Related Article

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.