Now that you have built your app we need to add a database. Use the following command to see what services you can create:
> cf marketplace
You should see something like this.
service plans description
p-hd Standard Pivotal HD is the industry’s most full-featured Hadoop distribution.
p-mysql 100mb-dev MySQL service for application development and testing
You will most likely see a hadoop service and a mysql service. Check you have no existing services (or at least no SQL services which is what we want to create:)
> cf services
Now let’s bind the database to your app.
> cf create-service p-mysql 100mb-dev <your_name_db>
Use the following to check what apps you had deployed:
> cf apps
Now let’s bind our new database service
> cf bind-service <your_app> <your_name_db>
To restart your app to ensure the database is connected, use:
> cf restart <your_app>
Navigate through the console and check the database is connected,