Creating a user
CREATE USER user;
Creating a database
CREATE DATABASE database_name;
Granting privileges
Grants all privileges on database_name to user on the local machine.
GRANT ALL ON database_name.* to 'user'@'localhost' identified by 'aVeryStrongPassword';