The problem Im facing while trying to connect to database for mysql. I have also given the database settings that i have used.
Traceback (most recent call l
you have to install python-mysqldb - Python interface to MySQL
Try
sudo apt-get install python-mysqldb
With the same error message as Will, it worked for me to install mysql first as the missing file will be added during the installation. So after
brew install mysql
pip install mysql-python
ran without errors.
Just to add to other answers, if you're using Django, it is advisable that you install mysql-python BEFORE installing Django.
Maybe you can try the following mode of operation:
sudo python manage.py runserver 0.0.0.0:8000
Download and install Mysql-python from here for windows environment. http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python.
I think it is the version error.
try installing this in following order:
sudo apt-get install python3-mysqldb
pip3 install mysqlclient
python3 manage.py makemigrations
python3 manage.py migrate