Friday, March 10, 2017

Docker Container fails to connect to remote SQL

I am trying to run laravel project which connects to a remote SQL server of the company of a client, and all I have from laravel as a stacktrace is :

"code": 20013,
"message": "SQLSTATE[HY000] Unknown host machine name (severity 2) (SQL: get_member_head :id)",
"file": "/share/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 770,

I tried changing the IP of the docker bridge, running under their vpn and outside it, nothing works. The is that the sql server host can be pinged outside docker, but inside (even in terminal) shows the same error saying unkown host machine !



via Chaibi Alaa

Advertisement