LinuxrhelAccessdeniedforuser 'root'

Source: Internet
Author: User
Accessdeniedforuser 'root' @ 'localhost' (usingpassword: YES) today, a mysql database is installed in rhel5.5 using the yum installation method. For more information, see blog. csdn. netxiamizyarticledetails2072525 login mysql-uroot-p1 with root user after installation is complete

Access denied for user 'root' @ 'localhost' (using password: YES) today in rhel5.5 installed a mysql database using the yum Installation Method installation process reference http://blog.csdn.net/xiamizy/article/details/2072525 after installation is complete with the root user login mysql-uroot-p1

Access denied for user 'root' @ 'localhost' (using password: YES)

Today, a mysql database is installed in rhel5.5 using the yum installation method.

Installation Procedure reference http://blog.csdn.net/xiamizy/article/details/2072525

Log on as the root user after installation.

Mysql-uroot-p123456

Access denied for user 'root' @ 'localhost' (using password: YES) is always reported

After searching for a long time, I finally found an error.

This should be the case when you change the password for the root user.

UPDATE mysql. user SET Password = PASSWORD ('000000') where USER = 'root ';

I mistakenly wrote UPDATE mysql. user SET Password = '000000' where USER = 'root ';

I am very depressed.

Then I cannot log on to the database. What should I do?

Start the database in mysqld_safe Mode

# Mysqld_safe -- user = mysql -- skip-grant-tables -- skip-networking &

Use the correct statement

UPDATE mysql. user SET Password = PASSWORD ('000000') where USER = 'root ';

# Quit


Log on to mysql again-uroot-p123456


OK, logon successful
Note that special characters in the password may not succeed. I found that I was not allowed to log on when the password was $. I have not studied how to solve the problem. If anyone knows it, I hope to add it.


Write down this error to help people who encounter the same 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.