mysql connect problems
jorn at wcborstel.nl
Thu Dec 9 15:14:53 PST 2004
On Thu, 9 Dec 2004 17:18:38 -0500, John DeStefano wrote
> At a prompt, if I try to connect to mysql using the '-p' option like
> # mysql -u root -p
> ... I can connect.
Which makes sense. Because the -p option is for entering a password. And I
don't think you'll have an empty root password ;)
But if I try to connect without '-p' like this:
> # mysql -u root
> ... I get an error:
> mysqladmin: connect to server at 'localhost' failed
> error: 'Access denied for user: 'root'@'localhost' (Using password:
What you're trying to do now is connecting with an empty password, and thus it
refuses to connect. You always have to imply the -p option unless the password
of your user is empty, but you DON'T want that.
> >From what I can gather, this has to do with setting passwords for
> different aliases or incarnations of the host for a single user
> (root). I've tried every solution I've found for adding additional
> connection settings for root (including more than one method for
> changing the root password). When I log into mysql as root, use the
> mysql database, and run 'select user, password, host from user;' I
> see multiple entries for root for different 'host' values
> ('localhost', the actual host name, and '%').
Well, I have checked it as well, and I have just the root user on localhost
(with a different password then the one on the system though) and two
anonymous users (so no username and no password) for localhost and the FQDM
without any permissions. So I'm not really sure if the % is good or not.
Perhaps you're running a different version then I am (I use 4.1.7).
> I'd appreciate any help at all with this. Thanks very much.
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions