CREATE DATABASE DATABASE_NAME;

CREATE USER 'DATABASE_NAME'@'%' IDENTIFIED BY 'DATABASE_PASSWORD';
CREATE USER 'DATABASE_NAME'@'localhost' IDENTIFIED BY 'DATABASE_PASSWORD';

GRANT ALL PRIVILEGES ON DATABASE_NAME.* TO 'DATABASE_NAME'@'%';

GRANT ALL PRIVILEGES ON DATABASE_NAME.* TO 'DATABASE_NAME'@'localhost';

FLUSH PRIVILEGES;