Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Dec 2004 00:15:10 +0100
From:      "Jorn Argelo" <jorn@wcborstel.nl>
To:        John DeStefano <john.destefano@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: mysql connect problems
Message-ID:  <20041209230429.M81198@wcborstel.nl>
In-Reply-To: <f2160e0d041209141883a59af@mail.gmail.com>
References:  <f2160e0d041209141883a59af@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 9 Dec 2004 17:18:38 -0500, John DeStefano wrote

[snip]
> 
> At a prompt, if I try to connect to mysql using the '-p' option like 
> this:
> # 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: 
> NO)'
> 

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.
> 
> ~John
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041209230429.M81198>