fix: use CREATE OR REPLACE USER so DB password always matches .env on reinstall

This commit is contained in:
NixReaper
2026-04-05 11:54:40 -05:00
parent 54af40a26f
commit 5f42fe1ef0
+1 -1
View File
@@ -217,7 +217,7 @@ mariadb -u root <<SQL
CREATE DATABASE IF NOT EXISTS \`${NIXPANEL_DB_NAME}\`
CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER IF NOT EXISTS '${NIXPANEL_DB_USER}'@'localhost'
CREATE OR REPLACE USER '${NIXPANEL_DB_USER}'@'localhost'
IDENTIFIED BY '${NIXPANEL_DB_PASS}';
GRANT ALL PRIVILEGES ON \`${NIXPANEL_DB_NAME}\`.* TO '${NIXPANEL_DB_USER}'@'localhost';