Altrea wrote::!:
Creating databases is a global permission, so the user who should be able to create a database cannot have database specific permissions only.
I have learned something new today.
In fact it IS possible, to grant database specific permissions to a user INCLUDING creating databases.
- Code: Select all
GRANT ALL PRIVILEGES ON `testuser\_%` . * TO 'testuser'@'%';
This will grant the user the permission to create new databases starting with testuser_
If the user tries to create databases not starting with testuser_ it will get denied by error #1044.