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