Skip to content

Commit

Permalink
Correct grant for mariadb
Browse files Browse the repository at this point in the history
  • Loading branch information
gagan0123 committed Dec 24, 2021
1 parent 81ec5cf commit 2632851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion create_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ USERNAME=${DB}_$USER_SUFFIX
DBPASS=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 30 | head -n 1)
mysql -e "CREATE DATABASE $DBNAME"
mysql -e "CREATE USER $USERNAME@localhost identified by '$DBPASS'"
mysql -e "GRANT ALL ON $DBNAME.* TO $USERNAME@localhost"
mysql -e "GRANT ALL ON $DBNAME.* TO $USERNAME@localhost identified by '$DBPASS'"
echo "Database Created"
echo "DB: $DBNAME"
echo "USER: $USERNAME"
Expand Down

0 comments on commit 2632851

Please sign in to comment.