Error in SuSE access denied for user ' @ ' localhost ' to&

Source: Internet
Author: User

Long time no use of MySQL, last because of the BANQ forum system, in the MySQL administrator in the time unexpectedly prompted MySQL error number 1045 Access denied for user ' admin ' @ ' LocalHost ' (using Password:yes) error, it seems that the password is right, the user name is wrong, and finally found himself to have made a mistake, the user name should be root, alas!

At the same time find someone else's information, together sent up, for the next use.

Access denied for user "@ ' localhost ' to database

I installed MySQL 5.0 in Yast2 with my own CD under SuSE Linux 10.2, and after installing MySQL in the terminal, MySQL

Successfully started, exited, and then entered mysqladmin-u root password XXXXX, error: Mysqladmin:connect to server at ' localhost ' failed

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

If you enter MySQL first and enter use MySQL after successful startup, the following error occurs: Access denied for user "@ ' localhost ' to database ' MySQL '

Also, to lose MySQL can, lose mysql-u root error:

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 = ' 123456 ' where user = ' root '//This is wrong, the password is not actually 123456

Should be update user set password = password (' 123456 ') where user = "root"

Specific procedures:

Turn off MySQL:

# Service Mysqld Stop

And 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 above could do a little favor for you!

Error in SuSE access denied for user ' @ ' localhost ' to&

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.