List:General Discussion« Previous MessageNext Message »
From:Shawn Green Date:April 15 2006 6:21pm
Subject:Re: Show Grants problem
View as plain text  

--- Todd Smith <tmsmith@stripped> wrote:

> Hello
> 	Does anyone know why a user would show up in a select from user
> query but
> not in a show grants command.  What I am trying to say is I tried
> GRANTS FOR 'user1'@'%' and received that there is no such grant
> defined for
> 'user1'... But when I run SELECT * FROM user WHERE User = 'user1' I
> do get
> results.  Could the user have been added using an insert causing the
> GRANTS to fail?
> Any Ideas
> Todd


Users are identified by more than just their login name. Users are a
combination of login AND a "host" specifier.  When you do

SELECT * from user where user = 'user1';

a) how many entries are there
b) what is in the host column for those entries.

For example if the host column shows "" then you have
to use 

SHOW GRANTS FOR 'user1'@'';

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
Show Grants problemTodd Smith13 Apr
  • Re: Show Grants problemShawn Green15 Apr