Like velblud said above, you can use PyMySQL instead.
Here is my complete solution, there are 2 parts. I suspect there is another (more proper) way to do this, but I just wanted to share what worked for me.
Part1: You need to install the dependency PyMySQL. Most commonly I have seen people give answers that suggest to use "pip install PyMySQL". I suspect the downside to this is you have to manually do this each time, for any new node you want to deploy (i.e dev vs prod). Instead I added it to the "requirements.txt" file, which seems to install it for me on deployment:
###Add pip packages here, simulates "pip install xxx" during deployment
#SOLVES ImportError: No module named 'MySQLdb', actual import is done in settings.py
PyMySQL==0.6.2
Part2: I saw suggestions to add the import logic to my "application" or "manage.py" files. That didnt work for me. Instead in my "settings.py" file, I added this:
if ON_OPENSHIFT:
try:
print("IMPORTING - PyMySQL as MySQLdb")
import pymysql
pymysql.install_as_MySQLdb()
except ImportError:
print("CANT FIND - PyMySQL")
pass
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'YOUR_DB_NAME_HERE',
'USER': os.environ['OPENSHIFT_MYSQL_DB_USERNAME'],
'PASSWORD': os.environ['OPENSHIFT_MYSQL_DB_PASSWORD'],
'HOST': os.environ['OPENSHIFT_MYSQL_DB_HOST'],
'PORT': '3306',
}
}
During the "git push" deployment to Openshift, you will see at the beginning the "requirements.txt" installation. And you can run "pip list" from the shell command line before and after deployment to see if it installed correctly. You will also see the print("Importing - PyMySQL as MySQLdb") during the git deployment. It will run the syncdb, and you will see the MySQL tables being created, updated, migrated, etc.
FYI, The version I used is the current version as of today. Hope this helps someone...