MySQL Login error Access denied for user solution

Source: Internet
Author: User
Tags mysql login

Test example, I login to my local MySQL database in phpMyAdmin, the default username password is root,root but I try to enter root, the password is www.111cn.net the following error reminder.

The following illustration shows a reminder that #1045 cannot log on to the MySQL server

Okay, I'm going to use mysqladmin to connect to the MySQL database, too. Enter the wrong password

Mysqladmin:connect to server at ' localhost ' failed

Error: ' Access denied for user ' root ' localhost ' (using Password:yes) '

This is the password and the user name is not the reason, we just enter the normal username password can be logged in, if you have server management permissions, and you do not remember the password we can try to crack oh, provide a Windows cracked MySQL password example.

The code is as follows Copy Code

>service mysqld Stop

>mysqld_safe--skip-grant-tables &

Enter MYSQL-UROOT-P Carriage Entry

>use MySQL;

> Update user Set Password=password ("Www.111cn.net") where user= "root"; #更改密码为 Newpass

> Flush Privileges; #更新权限 > Quit #退出

>service mysqld Restart

>mysql-uroot-pnewpass #新密码进入

So your new password is www.111cn.net, we try to log in again will remind the login to succeed.

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.