If you have installed phpMyAdmin in your server, you can easily use the function to create new user and database by checking the checkbox "Create database with same name and grant all privileges". It will set the username of the new user as the same as the database name. But your server may be hacked through phpMyAdmin if you do not upgrade it regularly. You can restrict the access to phpMyAdmin.

The following command is similar to the action done in phpMyAdmin. In case you would like to setup a database quickly or some company policies you cannot install phpMyAdmin or you do not want to set the restriction, you can just copy the following commands by replacing "username" and "password".

-- Create new database user
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';

-- Grant permission to the new user
GRANT USAGE ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password';

-- Create new database (database name is the same as user name)
CREATE DATABASE IF NOT EXISTS `username`;

-- Grant permission for the database to the new user
GRANT ALL PRIVILEGES ON `username`.* TO 'username'@'localhost';