As part of a script I am trying to count the number of tables that exist in a particular MySql schema.
Using my own user I am using the query
SELECT COUNT(*) FROM information_schema.tables
WHERE table_schema = dbName
However I'd like the user running this script to have as few permissions as possible, specifically I don't want them to have any select privileges on any of the tables belonging to the schema
Is it possible to assign a grant which would allow a user to count the number of tables without having any access to the tables themselves?