Error in Suse Access denied for user & #39; & #39; @ & #39; localhost & #39; to & amp;, susedenied

Source: Internet
Author: User

An error occurred in Suse: Access denied for user ''@ 'localhost' to &, susedenied

I haven't used MySQL for a long time. The last time I installed Banq's forum system, when MySQL Administrator is used, the system prompts mysql error number 1045 access denied for user 'admin' @ 'localhost' (using password: YES). It seems that the password is correct, the user name is wrong. I finally found that I had made the error. The user name should be root. Alas!

At the same time, I found other people's information and sent it together for the next use.

Access denied for user'' @ 'localhost' to database

I installed Mysql 10.2 With Yast2 on the built-in CD in Suse Linux 5.0. After installation, I entered mysql and mysql on the terminal.

Start successfully, exit, and enter mysqladmin-u root password XXXXX. the following error occurs: mysqladmin: connect to server at 'localhost' failed.

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

If you enter mysql first, and then enter use mysql, the following error occurs: Access denied for user ''@ 'localhost' to database 'mysql'

Also, you can enter mysql. An error occurs when you enter mysql-u root:

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

The reason is:

An error occurred while updating the ROOT password yesterday.

Update user set password = '000000' where user = "root" // This is an error. The password is not 123456.

Set password = password ('000000') where user = "root"

Procedure:

Close mysql:

# Service mysqld stop

Then:

# Mysqld_safe -- skip-grant-tables

Start mysql:

# Service mysqld start

Mysql-u root

Mysql> use mysql

Mysql> UPDATE user SET Password = PASSWORD ('xxx') WHERE user = 'root ';

Mysql> flush privileges;

Mysql> \ q

That's it. I hope those abve cocould do a little favor for you!

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.