List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:August 16 2005 11:51am
Subject:Re: Why can't I revoke usage from user?
View as plain text  
Hi there,

> > >
> > > 'USAGE' means that user doesn't have any privileges. Use
> > 'DROP USER'.
> > > See:
> > >   http://dev.mysql.com/doc/mysql/en/drop-user.html
> >
> > I disagree here.
> >
> > "drop user" will drop the user, revoking "usage" can be
> > something different.
>
> You can't actually revoke USAGE, without dropping the user.
>
> > If, for example, you do "grant usage on dbname.*" this is
> > different from then "just" a user without "usage" granted to
> > that database.
>
> USAGE is a global level privilege, whilst you can "GRANT USAGE ON test.*
> ..", it's actually ignored.

I thought that on a database level, it created a record in "db" with all
"N" for each privilege?

Either way: rather stupid statement then. Why doesn't it raise an
error if it's invalid/ignored? Guess it's another MySQL Gotcha??

This, however, works in MySQL 5 (latest) and creates a row in "db":

grant usage on test.* to `foo`@`localhost` with grant option

All privileges "N" except "grant_priv". Which is useless as well, in this
case, correct?

> > Besides, having a user without privileges might be useful as well :-)
>
> Exactly what USAGE is for.. ;)

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

Thread
Why can't I revoke usage from user?Gu Lei16 Aug
  • Re: Why can't I revoke usage from user?Gleb Paharenko16 Aug
  • Re: Why can't I revoke usage from user?Martijn Tonies16 Aug
  • Re: Why can't I revoke usage from user?Martijn Tonies16 Aug
    • RE: Why can't I revoke usage from user?Mark Leith16 Aug
      • Re: Why can't I revoke usage from user?Martijn Tonies16 Aug