Problem to connect with local machine from container

%D0%97%D0%BD%D1%96%D0%BC%D0%BE%D0%BA%20%D0%B5%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%20%D0%B7%202019-09-23%2023-28-06

How I can connect to my local database?
(firewall in the local machine is disabled)

What can I do?
Thank’s

mysql -h 127.0.0.1 -u root -p

works for me!

%D0%97%D0%BD%D1%96%D0%BC%D0%BE%D0%BA%20%D0%B5%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%20%D0%B7%202019-09-26%2016-14-22
%D0%97%D0%BD%D1%96%D0%BC%D0%BE%D0%BA%20%D0%B5%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%20%D0%B7%202019-09-26%2016-14-47
%D0%97%D0%BD%D1%96%D0%BC%D0%BE%D0%BA%20%D0%B5%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%20%D0%B7%202019-09-26%2016-15-23

try this instead

mysql -h localhost -u root -p

%D0%97%D0%BD%D1%96%D0%BC%D0%BE%D0%BA%20%D0%B5%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%20%D0%B7%202019-09-26%2017-04-22

Ok. My final thought (out of more ideas): check the MySQL connect address at devilbox control panel.

See my image. I can connect to both 172.16.238.12 and 127.0.0.1.

I don’t compose container with mysql. I use mysql only in local machine, and want to connect with it from container. Is it impossible?

Sorry, I’m not sure. Maybe someone else can help?

Maybe, but I am very grateful to you :wink:

the problem resolved by itself. I carefully read the documentation again. Maybe someone will need my experience :slight_smile:

mysql -h 172.16.238.1 -u root -p

and everything works