MySQL Forums
Forum List  »  Install & Repo

Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Posted by: Patrick Lenon
Date: April 04, 2008 08:16AM

There are many posts regarding this error, and I think most of them are caused by the same confusion I had over the combination of user and host in the user table.

In order to authorize TCP/IP (say, for running MySQL Administrator from a laptop) access by a given user, you must create either:
1) A user/host record in the user table for each host the user logs in from, or
2) A user record with no host, which shows up as "%" in the host column of the user table.

e.g.
create user root@mylaptop identified by myrootpassword ;
or
create user root identified by myrootpassword ;

The base MySQL setup creates root accounts for host=localhost and host=127.0.0.1, but not for external hosts.

Options: ReplyQuote


Subject
Written By
Posted
June 27, 2009 08:29PM
December 16, 2007 02:18AM
December 27, 2007 02:08PM
January 16, 2011 06:51AM
Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
April 04, 2008 08:16AM
August 27, 2009 12:22AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.