PyMySQL Operational Error 1045, ACCESS DENIED (PASSWORD: YES) when MYSQL_ROOT_PASSWORD is supplied. #909
Unanswered
Nsandomeno
asked this question in
Q&A
Replies: 1 comment 2 replies
-
What disqualifies this as an issue? @methane |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
PyMySQL fails to connect to MySQL Docker Container. Inside the MySQL Docker Container, the logs produce an
mbind: Operation not permitted.
message while the backend repeatedly attempts to connect to the MySQL container but produces the error message:ERROR:__main__:(pymysql.err.OperationalError) (1045, "Access denied for user 'root'@'172.18.0.8' (using password: YES)")
To Reproduce
mysql+pymysql
and the dependency pymysql is being brought in with the extra dependency:pymysql[rsa]
.The connection url is completed with:
mysql+pymysql://root:the correct password I promise@db/app
Where
db
is the name of the service in the docker-compose.yml file that builds the MySQL (I get a connection refused error if I use 0.0.0.0 127.0.0.1 or localhost:) andapp
is the name of the databased created, validated by the logs.mbind: Operation not permitted
message.The
db
docker-compose.yml service code:The
db
docker-compose.override (for some local dev additions):Expected behavior
A connection.
Environment
Beta Was this translation helpful? Give feedback.
All reactions