mysql -p [--user=<username>] [--host=<hostname>] [--port=<port>]
enter the following
create database <dbname>;
CREATE USER '<username>'@'localhost' IDENTIFIED BY '<password>';
grant CREATE,INSERT,DELETE,UPDATE,SELECT on <dbname>.* to <username>@localhost;
flush privileges;
exit;