MySQL queries 2 create user and db
Create:
CREATE USER 'USER_LOGIN'@'%' IDENTIFIED BY 'USER_PASSWORD';
GRANT USAGE ON * . * TO 'USER_LOGIN'@'%' IDENTIFIED BY 'USER_PASSWORD' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
CREATE DATABASE IF NOT EXISTS `USER_LOGIN` ;
GRANT ALL PRIVILEGES ON `USER_LOGIN` . * TO 'USER_LOGIN'@'%';
ALTER DATABASE `USER_LOGIN` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
Delete:
DROP USER 'USER_LOGIN'@'%';
DROP DATABASE IF EXISTS `USER_LOGIN` ;