【发布时间】:2020-07-09 04:33:38
【问题描述】:
我的 GitHub Action 配置示例:
jobs:
unit-test:
name: Unit Testing
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: db
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- name: Verify MySQL connection from host
run: mysql --host mysql --port 3306 -uroot -ppassword -e "SHOW DATABASES"
使用 MySQL 5.7 可以正常工作。但在 MySQL 8.0 中显示:
ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded: ...
在 MySQL docker docs 中有一行允许mysql_native_password auth:
command: --default-authentication-plugin=mysql_native_password
如何在 GitHub Actions/service 中允许 mysql_native_password auth 插件?
【问题讨论】:
-
你找到答案了吗? @mvorisek
-
@mdegis 不幸的是,没有,仍在寻找有聪明解决方案的人:)
-
嘿,你解决了这个问题,你是怎么解决这个问题的?
标签: mysql docker github-actions