I need to grant a user UPDATE and SELECT to two specific column in a db using MYSQL
I used the below command to do this
GRANT SELECT (title,new_title,catagory,description,runtime), UPDATE (title,new_title,catagory,description,runtime) ON database.table1 TO 'user1'@'%' IDENTIFIED BY 'xxx';
FLUSH PRIVILEGES
However when I try to view the table/fields using Sequal Pro I get the following error
MySQL said: SHOW command denied to user 'suer1'@'host.x.x.x' for table 'table1'
I can see the DB in the database list along with the one table I have granted access to, but I can't read any of the data from it.. Would anyone know how I can fix this error and only view/edit the tables/column I want..?
Your grant will actually work, if you select the specific columns in question:
SELECT title, new_title, catagory, description, runtime FROM table1
However, a more general query like this will fail with SELECT command denied to user:
SELECT * FROM table1
I believe this may be an issue with the way Sequal Pro tries to get information about the table. It says MySQL said: SHOW command denied to user, but despite that the following works:
SHOW COLUMNS FROM table;
I'm not sure which SHOW command is failing for Sequal Pro.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With