Let MySQL users create databases, but allow access to only their own databases

You can use

GRANT ALL PRIVILEGES ON `testuser\_%` .  * TO 'testuser'@'%';

to grant the user testuser privileges on all databases with names beginning with testuser_.

This allows the testuser to create databases limited to names starting with testuser_

Leave a Comment