List:MySQL on Win32« Previous MessageNext Message »
From:Peter Goggin Date:July 5 2002 5:43am
Subject:Re: Table privileges
View as plain text  
I have a table for which I want a particular user to be able to insert a
complete row, but only be able to select two columns.

I granted the follwoing:
GRANT INSERT
           ON stamps.customers
           TO reguser@'%'
           IDENTIFIED BY 'regpassword';
GRANT SELECT (customer_id, user_name)
           ON stamps.customers
           TO reguser@'%';


If I log on as the user and select customer_id, user_name from customers
then the query works.
i.e
select customer_id, user_name from customers;

returns the two fields for every row in the table.
If I qualify the query
select customer_id, user_name from customers where user_name = 'username';
the query fails with Error 1142 Select command denied to users
'reguser@localhost' for table 'customers'

What else do I need to grant to make this work?



Regards

Peter Goggin

Thread
ScriptsPeter Goggin14 May
  • Re: ScriptsPaul DuBois14 May
  • Re: ScriptsPeter Goggin14 May
    • Re: ScriptsPaul DuBois14 May
  • Re: Table privilegesPeter Goggin5 Jul
  • Re: Table privilegesRajeev Rumale5 Jul