Resolve MySQL ERROR 1045 (28000): Access denied for user

Source: Internet
Author: User
Tags phpmyadmin

In Ubuntu server 12.04, after installing MySQL, use the command login MySQL unexpectedly error, mysql error 1045 (28000): Access denied for user ' root ' @ ' localhost '( Using Password:yse), this error is very depressed, after careful analysis, know that the error and password, may be the password in the configuration of the time of the MySQL exception, so we do not have the correct password, know the problem, immediately think of a solution, That is to reset a password by the following method

1. First turn off MySQL and set the password

#sudo/etc/init.d/mysql stop #sudo mysqld_safe--user=mysql--skip-grant-tables--skip-networking & #sudo mysql-u Root MySQL mysql> UPDATE user SET Password=password (' pas ') where user= ' root '; mysql> FLUSH privileges; Mysql> quit

2. Restart MySQL and try to log in

#sudo/etc/init.d/mysql restart #sudo mysql-uroot-p Enter password: #输入密码, the following shows that the login is OK mysql>

Mysql Error 1045 (28000): Access denied for user ' root ' @ ' localhost '(using Password:yse) This error only prompts phpMyAdmin when using (28000), at the same time, phpMyAdmin will also prompt password error, set by the above method can be used to log in with the new password phpmyadmin


Resolve MySQL ERROR 1045 (28000): Access denied for user

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.