Hello,
Please go through the scenario :
Aim : I want to "my-app" running in namespace "my-app", communicate with the CloudSQL instance through , cloud proxy container running in name space "db".
1. name space=db : in this proxy container is running for Cloud SQL instance
logs form mysql Proxy container :
2018/03/30 08:56:28 Listening on 0.0.0.0.1:3306 for jenkins-196609:us-central1:mysql-test1
2018/03/30 08:56:28 Ready for new connections
2. name space=my-app : in this app container is runnign.
Logs from the my-app container:
> docker_...@1.0.0 start /usr/src/app
> node server.js
Running on http://:80
{ Error: connect ETIMEDOUT
at Connection._handleConnectTimeout (/usr/src/app/node_modules/mysql/lib/Connection.js:419:13)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Socket.emit (events.js:208:7)
at Socket._onTimeout (net.js:420:8)
at ontimeout (timers.js:482:11)
at tryOnTimeout (timers.js:317:5)
at Timer.listOnTimeout (timers.js:277:5)
--------------------
at Protocol._enqueue (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:145:48)
at Protocol.handshake (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:52:23)
at Connection.connect (/usr/src/app/node_modules/mysql/lib/Connection.js:130:18)
at Object.<anonymous> (/usr/src/app/server.js:14:12)
at Module._compile (module.js:652:30)
Please help he how can I achieve this.
Regards
Kartik