> GRANT usage on samp.* to 'permtest'@'localhost' identified by 'password';
> GRANT insert, update, delete on samp.secrettable to 
> 'permtest'@'localhost';
> GRANT select, insert, update, delete on samp.Account to 
> 'permtest'@'localhost';
> 

This worked much better for me, though it's not a perfect solution (see below)

> This worked for me on 4.1.1a-alpha-nt-log. By explicitly denying access at 
> the database level, the only tables I could see in my test database were 
> the ones I specifically granted myself right to (even though there were 
> others in the database). 

In my case I was able to see all the tables but could not select any data from 
the restricted table (mysql-server 4.0.18-5 from debian testing)

> 
> I was blocked from running a SELECT query against secrettable. I could 
> INSERT values but not DELETE them. I reason that this is because DELETE 
> ... WHERE ... requires a SELECT to be run on the table to identify the 
> rows to get rid of. The error I got when trying to delete was:
> 
> ERROR 1143 (42000): SELECT command denied to user: 'permtest'@'localhost' 
> for column 'col1' in table 'secrettable'
> 

Yes, this is the problem I ran into when trying to update any records in that 
table.  So it appears to be insert only.

> Let us know if this works or what errors you get.
> 

Thanks for all your help.  This may be the best solution available.  Would it 
be possible to get it posted to a faq or mentioned in the docs?  I imagine 
it's a situation that may come up frequently for users.  

Also, if you have any ideas on how one might perform updates on specific 
entries in that table without select privileges I'd be glad to hear them. 
(though it sounds like it may be impossible)

Thanks again,

Todd

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to