Skip to content

Commit

Permalink
Remove Sudo from mysql
Browse files Browse the repository at this point in the history
Co-authored-by: Håvard Gjøby Thom <[email protected]>
  • Loading branch information
MickLesk and havardthom authored Nov 21, 2024
1 parent 92c95e8 commit 4863baa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install/kimai-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;"
{
Expand Down

0 comments on commit 4863baa

Please sign in to comment.