2👍
Django doesn’t automatically generate your database. You must create it first before syncing or migrating. Also, you need to install MySQLDB
package on your python package list. But if you’re using Python3 then I suggest you use PyMySQL then add these on your settings.py
import pymysql
pymysql.install_as_MySQLdb()
0👍
I had a similar issue,
I fixed this by replacing import MySQLdb
with
import pymysql
pymysql.install_as_MySQLdb()
in settings.py.
I am using MySQLdb version 1.2.5, PyMySQ version 0.9.2, Python 2.7 and Django 1.11.2.
- [Answered ]-Django sign up user in admin site with generated password
- [Answered ]-Django database connection issue
- [Answered ]-Add Template to Django Oscar e-commerce framework
Source:stackexchange.com