These are the basic steps to easily create a database and assign a user to it from the command line in Linux or Windows:
mysql -u root -p
Enter password:
CREATE DATABASE my_database;
CREATE USER 'database_user'@'localhost' IDENTIFIED BY 'user_password';
GRANT USAGE on *.* to database_user@localhost identified by 'user_password';
GRANT ALL PRIVILEGES on my_database.* to database_user@localhost ;
FLUSH PRIVILEGES;
That's about it :)