Skip to content

Commit

Permalink
Merge branch 'main' into 3647-device-sync-then-update
Browse files Browse the repository at this point in the history
  • Loading branch information
esurface committed Dec 12, 2023
2 parents 0f02c0c + a81e12b commit cdf2bfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ git checkout -b v3.30.1 v3.30.1
docker rmi tangerine/tangerine:<previous_version>
```

# What's new

## v3.30.0

__New Features__
Expand Down
6 changes: 3 additions & 3 deletions mysql-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ else
echo "You have no config.sh. Copy config.defaults.sh to config.sh, change the passwords and try again." && exit 1;
fi

USER_EXISTS=$(docker exec mysql mysql -u root -p"$T_MYSQL_PASSWORD" -sse "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = '$T_MYSQL_USER')")
USER_EXISTS=$(docker exec $T_MYSQL_CONTAINER_NAME mysql -u root -p"$T_MYSQL_PASSWORD" -sse "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = '$T_MYSQL_USER')")

if [ "$USER_EXISTS" = 1 ]; then
echo "MySQL user is already set up."
else
echo "Setting up mysql user..."
CMD="docker exec mysql mysql -u root -p'$T_MYSQL_PASSWORD' -e \"CREATE USER '$T_MYSQL_USER'@'%' IDENTIFIED WITH mysql_native_password BY '$T_MYSQL_PASSWORD';\""
CMD="docker exec $T_MYSQL_CONTAINER_NAME mysql -u root -p'$T_MYSQL_PASSWORD' -e \"CREATE USER '$T_MYSQL_USER'@'%' IDENTIFIED WITH mysql_native_password BY '$T_MYSQL_PASSWORD';\""
eval ${CMD}
CMD="docker exec mysql mysql -u root -p'$T_MYSQL_PASSWORD' -e \"GRANT ALL PRIVILEGES ON \"*.*\" TO '$T_MYSQL_USER'@'%' WITH GRANT OPTION;\""
CMD="docker exec $T_MYSQL_CONTAINER_NAME mysql -u root -p'$T_MYSQL_PASSWORD' -e \"GRANT ALL PRIVILEGES ON \"*.*\" TO '$T_MYSQL_USER'@'%' WITH GRANT OPTION;\""
eval ${CMD}
fi

0 comments on commit cdf2bfc

Please sign in to comment.