In the Django backend, you use the selected MySQLdb module as the mysql backend. In the install_as_MySQLdb () part, you can see sys.modules [MySQLdb = sys.modules [ _mysql = sys.modules [pymysql where pymysql is specified to actually tell MySQLdb to run django - aforwardz July 20th ' 18 at 17:30