Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
I have a multi-tenant application that has one database for each tenant. These thousands of databases are distributed across multiple servers. I have a user who I want to apply table level SELECT,INSERT,UPDATE,DELETE on 6 tables in every database. We frequently add databases and move them between servers for maintenance tasks so maintaining these permissions for each database on each server becomes a significant maintenance task.
I tried these, among others, and received the corresponding errors:
[mysql] GRANT SELECT,INSERT,UPDATE,DELETE ON `%`.table TO 'user'@'host';
|
ERROR 1146 (42S02): Table '%.table' doesn't exist
|
[mysql] GRANT SELECT,INSERT,UPDATE,DELETE ON *.table TO 'user'@'host';
|
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'table TO 'user'@'host'' at line 1
|
I also asked around the community and searched for existing bugs and feature requests in both mysql and mariadb bug tools and couldn't find a solution or bug report. I've been told that this would require scripting out the maintenance of the account as it is not supported.
I was going to mark this Priority:Minor, but ended up with Major because there isn't an easy work around that I have been able to figure out for my use case. If that isn't appropriate please correct.