-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit-databases.sql
More file actions
17 lines (14 loc) · 946 Bytes
/
init-databases.sql
File metadata and controls
17 lines (14 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- Init script to create all required databases for Gratheon services
-- This runs once when MySQL container is first initialized
CREATE DATABASE IF NOT EXISTS `user-cycle` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE DATABASE IF NOT EXISTS `swarm-api` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE DATABASE IF NOT EXISTS `image-splitter` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE DATABASE IF NOT EXISTS `logs` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE DATABASE IF NOT EXISTS `telemetry-api` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-- Grant all privileges on all databases to the 'test' user
GRANT ALL PRIVILEGES ON `user-cycle`.* TO 'test'@'%';
GRANT ALL PRIVILEGES ON `swarm-api`.* TO 'test'@'%';
GRANT ALL PRIVILEGES ON `image-splitter`.* TO 'test'@'%';
GRANT ALL PRIVILEGES ON `logs`.* TO 'test'@'%';
GRANT ALL PRIVILEGES ON `telemetry-api`.* TO 'test'@'%';
FLUSH PRIVILEGES;