天天看點

Django 3.0.5 mysql ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3

問題描述

使用Django 3.0.5 連接配接mysql時出現連接配接異常。

mysql ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3

問題解決方式

引用pymsqy的位置加入

pymysql.version_info = (1, 3, 13, "final", 0)

引用情況将變為

import pymysql

pymysql.version_info = (1, 3, 13, "final", 0)

pymysql.install_as_MySQLdb()

微信公衆号

Django 3.0.5 mysql ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3

頭條号

Django 3.0.5 mysql ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3