I'm trying to connect to my mysql DB on OpenShift Online that has been set up as a scalable gear, and the connection URL that OpenShift provides
mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/
does not connect. When using this as the localhost parameter within mysql_connect(), I am unable to connect to my DB. When I set the gear up as non-scalable, which provides the actual host ip and port when adding mysql to the gear, this works perfectly. Below is an example of how I would input this.
$DBconnect = mysql_connect("mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/", "UserName","PassWord","DB");
Does anyone have any experience connecting to a scalable gear on OpenShift, and what I might be doing wrong?
Thanks,