OpenShift access MySQL from another gear

I have two apps on OpenShift.
One is running on a salable PHP gear with a MySQL cartridge.
The other one is a node.js gear.

How can I access this MySQL database from node.js

If your php application is scalable, then you can use the connection information from your PHP gear (ssh into your gear and run 'env | grep MYSQL' to get that information) to connect to your MySQL gear from your node.js application. Do not use the OpenShift environment variables as they will not be available to your node.js application. Not that the MySQL Port number will not be the standard 3306, but another random port number, it is important that you use that information in your connection string.