# create the databases
CREATE DATABASE IF NOT EXISTS `nextcloud`;
CREATE DATABASE IF NOT EXISTS `bookstack`;
CREATE DATABASE IF NOT EXISTS `kimai`;

# create users and privileges
CREATE USER 'nextcloud'@'%' IDENTIFIED BY 'jX9hKI2POvt1VrjVbBs4';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'%';

CREATE USER 'bookstack'@'%' IDENTIFIED BY 'sdfl39302klsdjf';
GRANT ALL PRIVILEGES ON bookstack.* TO 'bookstack'@'%';

CREATE USER 'kimai'@'%' IDENTIFIED BY 'xXW5dnQoMpAmdXrQgUgU';
GRANT ALL PRIVILEGES ON kimai.* TO 'kimai'@'%';
