MySQL Forums
Forum List  »  PHP

Re: Error nr. 1045 - Access denied [MySQL Administrator on Linux]
Posted by: Martin Wirth
Date: December 28, 2008 02:58AM

If MySQL is installed and running on a Linux localhost then this problem may occur even if the username and passwords are set, spelled correctly, and mysqladmin flush-privileges has been run to force MySQL to refresh the privilege table.

I found that MySQL Administrator->User Administration likes to default the user host to ANY, which shows up as @% below the listing in User Accounts. Right click to Add Host and select Local host. This allows the user to connect from localhost to localhost.

You might also check to ensure that there's a "127.0.0.1 localhost" (without quotes) line in your /etc/hosts file. If there is not then localhost may not resolve and you'll need to use the IP address in lieu of that. Of course, if you can sudo then you can add the line. It's probably there already.

MySQL on Linux can be rather strict with security, which is good because you can tighten it up for a production application.

Options: ReplyQuote


Subject
Written By
Posted
October 17, 2006 11:45PM
October 18, 2006 09:46AM
November 14, 2006 01:38PM
Re: Error nr. 1045 - Access denied [MySQL Administrator on Linux]
December 28, 2008 02:58AM


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.