SUSE error has occurred access denied for user & #39;& #39;@& #39;localhost& #39; to&

Source: Internet
Author: User

Long time no practical MySQL, last due to install the BANQ forum system. When I went in with MySQL administrator I actually prompted MySQL error number 1045 Access denied for user ' admin ' @ ' localhost ' (using Password:yes) It seems that the password is right, username is wrong. Finally found himself actually made a few mistakes, username should be root, alas!

Find someone else's information at the same time. Sent up together. For 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. Exit, and then enter mysqladmin-u root password XXXXX. Error occurred: Mysqladmin:connect to server at ' localhost ' failed

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

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

And also. Lose MySQL can, lose mysql-u root is wrong:

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

The reason is:

An error occurred while updating Rootpassword 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"

Detailed operation steps:

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!

Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

SUSE error has occurred access denied for user & #39;& #39;@& #39;localhost& #39; 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.