Windows MySQL Tip: 1045 Access denied for user ' root ' @ ' localhost ' using password Yes

Source: Internet
Author: User

Early in the morning open the Navicat Lite for MySQL client, prompting 1045 Access denied for user ' root ' @ ' localhost ' using password yes, too much power , online search A lot of information, the final problem to be resolved, the following will be a detailed solution to share the process to everyone, hope to meet the same problem compatriots, less detours:


1, open dos into MySQL under the bin directory: I: C:\Program files\mysql\mysql server5.1\bin
2. Stop MySQL service, net stop MySQL
3, in C:\Program files\mysql\mysql server5.1\bin back input:mysqld--defaults-file= "C:\Program files\mysql\ MySQL Server 5.1\my.ini "--console--skip-grant-tables
Specific operations such as:


4. Reopen a DOS window and enter it after C:\Program files\mysql\mysql server5.1\bin: Mysql-root

-P
5, prompt to enter the password, enter the password after enter, enter mysql>
6. Enter under Mysql>:
Mysql>update ssh setpassword=password (' NewPassword ') where user= ' root '
Mysql>flush privileges;
Mysql>quit
Where SSH is the name of the database, instead of its own, if there are multiple databases can be more than one update operation.

The exact operation is as follows:

Windows MySQL Tip: 1045 Access denied for user ' root ' @ ' localhost ' using password Yes

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.