Skip to content

Commit

Permalink
update grant privileges
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer committed Jan 18, 2025
1 parent cd4e191 commit 5c50f06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/golang-test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ jobs:
docker run -d \
-e MYSQL_ROOT_PASSWORD=netbird \
-e MYSQL_DATABASE=netbird \
-e MYSQL_ROOT_HOST=% \
-p 3306:3306 \
--name my-mysql \
mlsmaycon/warmed-mysql:8
Expand All @@ -230,9 +231,10 @@ jobs:
run: |
for i in {1..10}; do
if docker exec my-mysql mysqladmin -uroot -pnetbird ping &>/dev/null; then
# Connect via socket (no -h, no -P)
docker exec my-mysql \
mysql -h127.0.0.1 -P3306 -uroot -pnetbird -e \
"GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'netbird' WITH GRANT OPTION; FLUSH PRIVILEGES;"
mysql -uroot -pnetbird \
-e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'netbird' WITH GRANT OPTION; FLUSH PRIVILEGES;"
break
fi
echo "Waiting for MySQL..."
Expand Down

0 comments on commit 5c50f06

Please sign in to comment.