Unix Technical Forum

User name stops working until flush privileges is run

This is a discussion on User name stops working until flush privileges is run within the MySQL General forum forums, part of the MySQL category; --> Hi, I have a MySql database running on version 5.0.27 which every few days for no reason I can ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 06:08 AM
Richard Cooper
 
Posts: n/a
Default User name stops working until flush privileges is run

Hi,

I have a MySql database running on version 5.0.27 which every few
days for no reason I can fathom stops letting me log in.

mysql -u username dbname -p
Enter password:
ERROR 1045 (28000): Access denied for user
'username'@'localhost' (using password: YES)

When I log in as root and run 'FLUSH PRIVILEGES' everything starts
working again. I've looked at the doc for 'FLUSH PRIVILEGES' but I
still can't work out what's going. Does anyone have any idea what
would make a previously working username stop working until FLUSH
PRIVILEGES is called? I'm not doing any direct manipulation of the
user table. Everything goes through 'create user', 'grant', 'set
password', etc so it seems that 'flush privileges' should be redundant.

Thanks,

- Richard
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 06:08 AM
Mathieu Bruneau
 
Posts: n/a
Default Re: User name stops working until flush privileges is run

Richard Cooper a écrit :
> Hi,
>
> I have a MySql database running on version 5.0.27 which every few days
> for no reason I can fathom stops letting me log in.
>
> mysql -u username dbname -p
> Enter password:
> ERROR 1045 (28000): Access denied for user 'username'@'localhost'
> (using password: YES)
>
> When I log in as root and run 'FLUSH PRIVILEGES' everything starts
> working again. I've looked at the doc for 'FLUSH PRIVILEGES' but I still
> can't work out what's going. Does anyone have any idea what would make a
> previously working username stop working until FLUSH PRIVILEGES is
> called? I'm not doing any direct manipulation of the user table.
> Everything goes through 'create user', 'grant', 'set password', etc so
> it seems that 'flush privileges' should be redundant.
>
> Thanks,
>
> - Richard
> >

>

I have experienced similar issue. Looks like something is "corrupting"
the in-memory privileges table. Thus forcing the run of the flush
privileges command to rebuild it. I never came around to submit a bug or
investigate a reproducable case however.

But now that i'm thinking about it, I think it's when I use the revoke
command. Maybe other people had a similar experience ?

As a workaround, I always play it safe and use the flush privileges
after changing privileges !

--
Mathieu Bruneau
aka ROunofF

===
GPG keys available @ http://rounoff.darktech.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:25 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com