On the cloudControl platform databases run on separate machines. All the credentials are provided as part of the run-time environment. This includes also host and port. You can not connect via socket. Please refer to the documentation on how to read the credentials from there.
https://www.cloudcontrol.com/dev-center/Platform%20Documentation#add-on-credentials