Fwd: Access denied for user 'root'@'localhost' in mysql

2009-06-03 Thread Bernard Fay
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  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 
> 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~
>>
>
>


Fwd: Access denied for user 'root'@'localhost' in mysql

2009-06-03 Thread Bernard Fay
`

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 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~
>


Fwd: Access denied for user 'root'@'localhost' in mysql

2009-06-03 Thread Bernard Fay
-- Forwarded message --
From: Bernard Fay 
Date: Wed, Jun 3, 2009 at 5:00 PM
Subject: Re: Access denied for user 'root'@'localhost' in mysql
To: paul.le...@quadensemble.co.uk


Thanks for your reply, Paul.

Yes, I tried without the -p switch and it didn't work.

Also, I just found that in mysql.user there is no host:localhost and
user:root but I have host:beryllium and user:root; beryllium being my
hostname.

Maybe we have something here.

Bern


On Wed, Jun 3, 2009 at 4:45 PM, Paul Lewis wrote:

> On 03/06/09 20:58:45, Bernard Fay wrote:
>
>> 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 wonder if there is a password defined before you set the root password in
> mysql yourself? I think not. Try connecting without th -p switch.
>
>
>> Any idea or clues about how to solve this issue?
>>
>> Thanks,
>> Bernard
>>
>>
> Otherwise, have a look here.
>
> http://dev.mysql.com/doc/refman/5.1/en/connection-access.html
>
>
>
> --
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.orgwith a
> subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
>
>