MySQL allows the use of wildcards for database names, in order to allow an user to operate only on a subset of databases:
GRANT ALL PRIVILEGES ON `foobar%`.* TO 'user'@'%' IDENTIFIED BY 'somepassword';
Is there a way to do the same for the CREATE grant, to allow (cf. the example above) user
to create only databases whose name starts with foobar
?
Otherwise said: is the CREATE grant global (i.e. an user with this privilege is allowed to create any database, without limitations) or it can be limited in some way?
foobar1
,foobar2
, etc., don't. Bad schema design.