I'm new to Django. It wasted me whole afternoon to config the MySQL engine. I am very confused about the database engine and the database driver. Is the engine also the driver? All the tutorial said that the ENGINE should be 'django.db.backends.mysql', but how the ENGINE decide which driver is used to connect MySQL?
Every time it says 'django.db.backends.mysql', sadly I can't install MySQLDb and mysqlclient, but PyMysql and the official mysql connector 2.1.3 has been installed. How could I set the driver to PyMysql or mysql connector?
Many thanks!
This question is not yet solved: Is the ENGINE also the DRIVER?
You can import pymsql
so it presents as MySQLdb. You'll need to do this before any django code is run, so put this in your manage.py
file
import pymysql
pymysql.install_as_MySQLdb()