An issue that most of people are stuck . We will try to keep it simple enough and small steps.
Step 1 : Create your database
CREATE DATABASE my_db;
Step 2: Create your user
create user 'my_user_name'@'%';
Step 3: Grant permissions to this user on the database by the password. So we need to create a password first.
select PASSWORD('your_password');
Step 4: The above command will give you the password you will be setting for this user.
GRANT ALL ON my_db.* TO 'my_user_name'@'%' IDENTIFIED BY PASSWORD 'outcome of SELECT PASSWORD command in step 3' WITH GRANT OPTION;
Above command will allow this user all permissions on the specified db. Remember you need to use your original password to login not the outcome of Step 3, that is just to create allowed hash password.