Skip to content

Commit

Permalink
fix(mariadb): use root user
Browse files Browse the repository at this point in the history
fix(mariadb): use root user
  • Loading branch information
tsirysndr committed Aug 18, 2024
1 parent cf66195 commit 63dca35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mariadb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,25 @@ pub fn start(_args: String) -> FnResult<String> {
.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"])?
Expand Down

0 comments on commit 63dca35

Please sign in to comment.