错误,用户 'root'@'localhost' 的访问被拒绝(使用密码:YES) 我正在尝试在 Github Actions 中使用 mysql 服务,但没有成功。我收到以下错误
用户'root'@'localhost'的访问被拒绝(使用密码:YES)
我的工作如下:
test:
name: Test
needs: install
services:
mysql:
image: mysql:8.0
ports:
- '8888:3306'
env:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: '10.x'
- run: mysql --port 8888 -u root -prootpass -e 'CREATE DATABASE IF NOT EXISTS test;'
我似乎无法让它工作。任何帮助表示赞赏。可以在此处找到我的测试设置存储库的拉取请求:https ://github.com/morsby/medmcq/pull/399