[Fixed]-Python + SQL db runserver ERROR

1👍

Make sure you have PyMySQL module installed, if not use this.

pip install pymysql

In settings.py, add following code just below import os.

Your current code

import os

Your new code

import os
try:
    import pymysql
    pymysql.install_as_MySQLdb()
except:
    pass
👤nomad

Leave a comment