[Django]-Deploying django to AWS Lambda connecting to RDS MySQL, showing error: NameError: name '_mysql' is not defined

6👍

The problem was due to .mysql file missing in MySQLdb directory

I tried a work around and importing pymysql and installing..
goto django_project/django_project/init.py file (the same dir where settings.py lives)

add the foll. code and deploy again, this worked for me

import pymysql
pymysql.install_as_MySQLdb()

Leave a comment