au.net.causal.maven.plugins.boxdb.db.mysql8-create-database.sql Maven / Gradle / Ivy
CREATE DATABASE IF NOT EXISTS ${box.databaseName} CHARACTER SET '${box.databaseEncoding}' COLLATE '${box.databaseCollation}';
CREATE USER IF NOT EXISTS '${box.databaseUser}'@'%' IDENTIFIED BY '${box.databasePassword}';
SET PASSWORD FOR '${box.databaseUser}'@'%' = '${box.databasePassword}';
GRANT USAGE ON *.* TO '${box.databaseUser}'@'%';
CREATE USER IF NOT EXISTS '${box.databaseUser}'@'localhost' IDENTIFIED BY '${box.databasePassword}';
SET PASSWORD FOR '${box.databaseUser}'@'localhost' = '${box.databasePassword}';
GRANT USAGE ON *.* TO '${box.databaseUser}'@'localhost';
GRANT ALL PRIVILEGES ON ${box.databaseName}.* TO '${box.databaseUser}'@'%';
GRANT ALL PRIVILEGES ON ${box.databaseName}.* TO '${box.databaseUser}'@'localhost';
ALTER USER '${box.databaseUser}'@'%' IDENTIFIED WITH mysql_native_password BY '${box.databasePassword}';
ALTER USER '${box.databaseUser}'@'localhost' IDENTIFIED WITH mysql_native_password BY '${box.databasePassword}';