Shared MySQL (mysql-5-7) only has mysql_user. The hades app connects as hades_user which doesn't exist. dbinit runs as root, so it can create the user before migrations run. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 lines
417 B
SQL
10 lines
417 B
SQL
-- Database hades_db is automatically created by MySQL Helm chart
|
|
-- This file runs first to ensure proper migration ordering
|
|
|
|
SELECT 'Database migration starting for hades_db' AS message;
|
|
|
|
-- Create hades_user for app connections (shared MySQL only has mysql_user)
|
|
CREATE USER IF NOT EXISTS 'hades_user'@'%' IDENTIFIED BY 'local-hades-pass';
|
|
GRANT ALL PRIVILEGES ON hades_db.* TO 'hades_user'@'%';
|
|
FLUSH PRIVILEGES;
|