update db helper

This commit is contained in:
2026-03-19 14:52:24 -07:00
parent 901e5b29b6
commit 854b7a2338
2 changed files with 10 additions and 35 deletions

View File

@@ -1,12 +1,15 @@
-- create databases
CREATE DATABASE IF NOT EXISTS `gitea`;
CREATE DATABASE IF NOT EXISTS `flask`;
CREATE DATABASE IF NOT EXISTS `nextcloud`;
-- create root user and grant rights
CREATE USER 'gitea'@'gitea.backnet' IDENTIFIED BY 'giteap';
CREATE USER 'flasku'@'backend.backnet' IDENTIFIED BY 'flaskp';
CREATE USER IF NOT EXISTS 'gitea'@'gitea.backnet' IDENTIFIED BY 'giteap';
CREATE USER IF NOT EXISTS 'flasku'@'backend.backnet' IDENTIFIED BY 'flaskp';
CREATE USER IF NOT EXISTS 'nextcloud'@'nextcloud.backnet' IDENTIFIED BY 'nextcloudp';
--CREATE USER 'gitea'@'localhost' IDENTIFIED BY 'gitea';
--GRANT ALL ON `gitea` TO 'gitea'@'localhost';
GRANT ALL ON gitea.* TO 'gitea'@'gitea.backnet';
GRANT ALL ON flask.* TO 'flasku'@'backend.backnet';
GRANT ALL ON nextcloud.* TO 'nextcloud'@'nextcloud.backnet';