Skip to content

Commit

Permalink
Merge pull request #112 from kiloutyg/110-permission-issue-on-sql-script
Browse files Browse the repository at this point in the history
added a check in the sql command to manage the case where the user cr…
  • Loading branch information
kiloutyg authored Sep 5, 2024
2 parents 9d8ff14 + b45cb32 commit 26568a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion env_create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ EOL

# Create the create-power-bi-ronlyuser.sql file
cat > create-power-bi-ronlyuser.sql <<EOL
CREATE USER 'powerbi'@'%' IDENTIFIED BY 'powerbi';
CREATE USER IF NOT EXISTS 'powerbi'@'%' IDENTIFIED BY 'powerbi';
GRANT SELECT ON ${MYSQL_DATABASE}.* TO 'powerbi'@'%';
FLUSH PRIVILEGES;
EOL
Expand Down
2 changes: 1 addition & 1 deletion env_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ set +a

# Create the create-power-bi-ronlyuser.sql file
cat > create-power-bi-ronlyuser.sql <<EOL
CREATE USER 'powerbi'@'%' IDENTIFIED BY 'powerbi';
CREATE USER IF NOT EXISTS 'powerbi'@'%' IDENTIFIED BY 'powerbi';
GRANT SELECT ON ${MYSQL_DATABASE}.* TO 'powerbi'@'%';
FLUSH PRIVILEGES;
EOL
Expand Down

0 comments on commit 26568a4

Please sign in to comment.