I have many mariaDB
databases that has same prefix. Such as
apple1
apple2
apple3
....
apple5000
apple5001
banana1
banana2
...
banana100
And I want create new user USER
who can SELECT
databases has apple
prefix.
So I grant SELECT
to new user USER
using multiple command below to.
GRANT SELECT ON `apple1` TO 'USER'@'%';
GRANT SELECT ON `apple2` TO 'USER'@'%';
GRANT SELECT ON `apple3` TO 'USER'@'%';
...
GRANT SELECT ON `apple5001` TO 'USER'@'%';
Is there any solution grant to multiple databases has specify prefix using one command like wildcard(%
) of LIKE
statement?