Create a database

create database <BD_NAME>;

Create users

http://dev.mysql.com/doc/refman/5.1/en/adding-users.html

Grant privileges

Creates new user and grants all privileges on a database to it.

grant all on <DATABASE>.* to <USER> identified by '<PASSWORD>';