Add --protocol tcp #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MySQL Service Connect | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
unit-test: | |
name: Unit Testing | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:8.0 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=test -e MYSQL_PASSWORD=test -e MYSQL_DATABASE=e2e-tests --entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password" | |
steps: | |
- name: Verify MySQL connection from host | |
run: mysql --protocol tcp --host localhost --port 3306 -uroot -ppassword -e "SHOW DATABASES" |