crearte a database for a specific user code example
Example 1: how to create new database user
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
Example 2: create mysql user with privileges
GRANT type_of_permission ON database_name.table_name TO ‘username’@'localhost’;