DROP DATABASE IF EXISTS migrate;
CREATE DATABASE IF NOT EXISTS migrate;
DROP DATABASE IF EXISTS migrate_01;
CREATE DATABASE IF NOT EXISTS migrate_01;
DROP DATABASE IF EXISTS migrate_02;
CREATE DATABASE IF NOT EXISTS migrate_02;
DROP DATABASE IF EXISTS migrate_03;
CREATE DATABASE IF NOT EXISTS migrate_03;
DROP DATABASE IF EXISTS migrate_04;
CREATE DATABASE IF NOT EXISTS migrate_04;
DROP DATABASE IF EXISTS migrate_05;
CREATE DATABASE IF NOT EXISTS migrate_05;
DROP DATABASE IF EXISTS migrate_06;
CREATE DATABASE IF NOT EXISTS migrate_06;
DROP DATABASE IF EXISTS migrate_07;
CREATE DATABASE IF NOT EXISTS migrate_07;
DROP DATABASE IF EXISTS migrate_08;
CREATE DATABASE IF NOT EXISTS migrate_08;
CREATE USER IF NOT EXISTS migrate@'%' IDENTIFIED BY 'migrate';
GRANT ALL PRIVILEGES ON migrate.* TO migrate@'%';
GRANT ALL PRIVILEGES ON migrate_01.* TO migrate@'%';
GRANT ALL PRIVILEGES ON migrate_02.* TO migrate@'%';
GRANT ALL PRIVILEGES ON migrate_03.* TO migrate@'%';
GRANT ALL PRIVILEGES ON migrate_04.* TO migrate@'%';
GRANT ALL PRIVILEGES ON migrate_05.* TO migrate@'%';
GRANT ALL PRIVILEGES ON migrate_06.* TO migrate@'%';
GRANT ALL PRIVILEGES ON migrate_07.* TO migrate@'%';
GRANT ALL PRIVILEGES ON migrate_08.* TO migrate@'%';

FLUSH PRIVILEGES;
