From 4863baad05b4c29d4bee78dd26b334ea37b0c852 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 21 Nov 2024 09:11:25 +0100 Subject: [PATCH] Remove Sudo from mysql MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> --- install/kimai-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/kimai-install.sh b/install/kimai-install.sh index 1cc29a53..a4db1821 100644 --- a/install/kimai-install.sh +++ b/install/kimai-install.sh @@ -33,7 +33,7 @@ DB_NAME=kimai_db DB_USER=kimai DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) MYSQL_VERSION=$(mysql --version | grep -oP 'Distrib \K[0-9]+\.[0-9]+\.[0-9]+') -sudo mysql -u root -e "CREATE DATABASE $DB_NAME;" +mysql -u root -e "CREATE DATABASE $DB_NAME;" mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" {