I have many tables with the same table structure. I want to create a user which can access one table in all of those databases. We are adding new databases frequently, so a wildcard would be preferred. Is something like this possible?

GRANT SELECT ON *.commonTable TO 'user'@'localhost';

1 Answer 1



From the documentation it doesn't appear that you can. you can do databaseName.*, but not *.tableName.

But if you're deploying multiple databases, perhaps in your deployment process you can create a line to have that user account get created. This also allows you to set passwords per database per user.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .