From 63dca3519432f63113cbfc737b767a64a197d395 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Sun, 18 Aug 2024 12:52:47 +0000 Subject: [PATCH] fix(mariadb): use root user fix(mariadb): use root user --- mariadb/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mariadb/src/lib.rs b/mariadb/src/lib.rs index 0bfe4b0..5b3bd76 100644 --- a/mariadb/src/lib.rs +++ b/mariadb/src/lib.rs @@ -40,25 +40,25 @@ pub fn start(_args: String) -> FnResult { .with_exec(vec![ "mysql", "-u", - "`whoami`", + "root", "--socket=$MYSQL_HOME/mysql.socket -e \"CREATE DATABASE IF NOT EXISTS $MARIADB_DATABASE;\"", ])? .with_exec(vec![ "mysql", "-u", - "`whoami`", + "root", "--socket=$MYSQL_HOME/mysql.socket -e \"CREATE USER IF NOT EXISTS '$MARIADB_USER'@'localhost' IDENTIFIED BY '$MARIADB_PASSWORD';\"", ])? .with_exec(vec![ "mysql", "-u", - "`whoami`", + "root", "--socket=$MYSQL_HOME/mysql.socket -e \"GRANT ALL PRIVILEGES ON $MARIADB_DATABASE.* TO '$MARIADB_USER'@'localhost';\"", ])? .with_exec(vec![ "mysql", "-u", - "`whoami`", + "root", "--socket=$MYSQL_HOME/mysql.socket -e \"FLUSH PRIVILEGES;\"", ])? .with_exec(vec!["overmind", "status"])?