[Fixed]-How to connect MySQL Cartridge to Django in OpenShift

1👍

As the error message says, the OPENSHIFT_DB_HOST does not seem to be the correct environment variable. Try using OPENSHIFT_MYSQL_DB_HOST (& include the DB type _MYSQL also for other variables).

You can actually use the variables for username and password too, details here:
https://developers.openshift.com/en/managing-environment-variables.html#database-variables

Leave a comment