This topic describes how to bind an external database to the Zend Server application as a user-provided service. Doing so will enable persistence, session clustering, and more. You can perform this procedure during the deployment of your application, or at any stage after deployment.
|
|
|
To bind an external database
cf create-user-provided-service [service-name] -p “comma, separated, parameters, names” The required parameters are 'hostname', 'port', 'username' , 'password', 'name' (where 'name' is the database Zend Server will use for its internal functions).
cf bind-service [service-name] [app-name]
cf restart [app-name] Zend Server will create the MySQL database schema and enable clustering features. |
|
Note: To use the database parameters in an application, use the PHP getenv function to extract them from the VCAP_SERVICES environment variable. |