Answer the question
In order to leave comments, you need to log in
Why not connect to mysql from docker?
Good afternoon!
There is a droplet, a docker is running on it, the ip-address will be indicated by host-ip
.
There is a second droplet on which mysql is running, its ip address will be indicated by mysql-ip
.
If I execute from the host mysql -u user -p -h {mysql-ip}
, then I connect successfully.
If I do the same from the docker container, I get
ERROR 1045 (28000): Access denied for user 'user'@'host-ip' (using password: YES)
[email protected]:/var/log/mysql# netstat -na | grep 3306
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 {mysql-ip}:3306 {host-ip}:58492 TIME_WAIT
tcp 0 0 {mysql-ip}:3306 {host-ip}:54170 ESTABLISHED
TIME_WAIT
is the rejected connection. my.cnf
disable require_secure_transport = ON
and recreate the user without REQUIRE SSL
, then the connection is successful. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question