mysql - grant create AND all privileges on user own database

Solution 1:

It's possible to grant privileges to any database which name is match some mask. Usually I do this for each new user:

GRANT ALL PRIVILEGES ON `userdbname\_%`.* TO `username`@localhost IDENTIFIED BY 'userpass';

After this command user will have all privileges to any database which name match "userdbname_SOMETHING". He also will be able to create any amount of databases at any time which name match this mask.