Tag Info

New answers tagged

1

Google's MySQL tools provide support for this: https://code.google.com/p/google-mysql-tools/source/browse/#svn%2Ftrunk%2Fpermissions_lib It's a really complex solution; you have to transform your SQL permissions into a domain-specific Python language, but then it offers flexibility like revoking databases/tables/columns, templating, etc. You run the Python ...


1

I've had to solve this specific problem and realized there's not way to say "all tables except these". What I did to work around this was create an internal database, restricted_tables. It had a couple of simple table schema: CREATE TABLE `tables` ( `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', `TABLE_NAME` varchar(64) NOT NULL DEFAULT '' ) ...


2

For MySQL in addition to the GRANT command, there is also a REVOKE command. However, REVOKE has limitations. If you GRANT ALL ON mydb.* TO 'someuser'@'somehost' you cannot remove one table by running REVOKE ALL ON mydb.mytbl3 TO 'someuser'@'somehost'. This is because REVOKE will only remove rights as they are granted. That is, you could: REVOKE ALL ON ...



Top 50 recent answers are included