If you want to make a backup of your database or just want to create a dump to migrate your db to another provider, you need to do these steps:
- Connect to your running application trough SSH. To do that you need to click this link on OpenShift and run the displayed command.

- Create the dump using this command:
mysqldump -u $OPENSHIFT_MYSQL_DB_USERNAME -h $OPENSHIFT_MYSQL_DB_HOST —password=$OPENSHIFT_MYSQL_DB_PASSWORD $OPENSHIFT_GEAR_NAME > dump.sql
gzip dump.sql
- After that you can scp the dump to any location you want.