Closed gwanryo closed 2 years ago
Hi, and thanks for creating an issue.
Oh, I'll try to investigate it later. Would you mind if I use your repo to validate my fixes?
@s3rius Not at all. First commit in my repo will be useful.
This issue is related with connection problem from local machine to internal docker. https://stackoverflow.com/a/24326540
Ok. I found the root cause.
Sorry, why it took so long to find it out.
I fixed it by changing some variables in docker container. This problem was caused because before running tests it creates database. But since in github actions I used variable MYSQL_USER
and MYSQL_PASSWORD
, instead of MYSQL_ROOT_USER
and MYSQL_ROOT_PASSWORD
it couldn't create test database.
Also I forgot to add MYSQL_AUTHENTICATION_PLUGIN: "mysql_native_password"
. These steps will fix your repo's builds.
Also I've created a pull request to fix your problem.
Thanks for your help! I'll close this issue.
I created new FastAPI project with below command, and push it to my own repository to check github action working properly.
But, github action keep throws same error in pytest stage.
E pymysql.err.OperationalError: (1044, "Access denied for user 'test'@'%' to database 'mysql'")
I think it's related with 'localhost' problem, but not sure.