False alarm!!!

I forgot to remove the skip-grant-tables and restart mysql.

When I try to login with mysql -u "r...@beryllium -p", I receive the
following:
ERROR 1045 (28000): Access denied for user 'r...@beryllium'@'localhost'
(using password: YES)

I guess I should add r...@localhost in mysql.user...

Bern


On Wed, Jun 3, 2009 at 7:48 PM, Bernard Fay <x...@videotron.ca> wrote:

> As fas as I understand it, there is no need to say "update mysql.user set
> ..."  because we have to say "use mysql" first.
> So the update command should know the table user is part of mysql.  Right?
>
> I really believe the problem comes from the fact there is know
> r...@localhost in mysql.user.  I have only r...@beryllium and
> debian-sys-ma...@localhost.
>
> I update the password of r...@beryllium and I can login with mysql -u
> r...@beryllium -p .
>
> Is it a normal situation or I should have r...@localhost?
>
> Thanks for the help
> Bern
>
>
>
> On Wed, Jun 3, 2009 at 5:13 PM, Stackpole, Chris 
> <cstackp...@barbnet.com>wrote:
>
>>  *>From:* Bernard Fay [mailto:bernard....@gmail.com]
>> >*Sent:* Wednesday, June 03, 2009 2:59 PM
>> >*Subject:* Access denied for user 'root'@'localhost' in mysql
>>
>> >
>>
>> >Hi,
>> >
>> >I installed MySQL in Lenny.
>> >When I try to login in with mysql -u root -p, I receive :
>> >
>> >ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
>> password: YES)
>> >
>> >I tried to reset the password of root by adding skip-grant-tables in
>> my.cnf then restart mysql.
>> >I could login in with mysql -u root then I ran the following commands:
>> >
>> >mysql> update user set password=password('password') where user='root';
>> >mysql> flush privileges;
>> >
>> >I removed skip-grant-tables from my.cnf and restarted mysqld.  I still
>> have:
>> >ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
>> password: YES)
>> >
>> >Any idea or clues about how to solve this issue?
>> >
>> >Thanks,
>> >Bernard
>>
>> Two methods on the same topic.
>>
>> 1) What database are you using when you login? If I remember correctly (it
>> has been a while)
>>
>> you need to declare the user table like “update mysql.user set….” And not
>> just “update user set…”
>> That may be the problem if it is trying to update the wrong
>> table/database.
>>
>>
>>
>> 2) Maybe this is one of those multiple-ways-of-completing-the-same-task
>> kind of scenarios but I reset passwords like so:
>> SET PASSWORD FOR r...@localhost=password('MyNewPassword');
>>
>> I don’t seem to have problems with it.
>>
>>
>>
>> Other then the password reset, your methods seem right to me as long as
>> you are on the localhost.
>>
>>
>>
>> Hope this helps.
>>
>>
>>
>> Have fun!
>>
>> ~Stack~
>>
>
>

Reply via email to