CREATE database `databaseName` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

GRANT ALL PRIVILEGES ON `databaseName`.* TO 'test'@'localhost';

FLUSH PRIVILEGES;