Corresponding problems connecting to the database in 2.7 1 met

Python2.x MySQL connection is required MySQLdb module, but in Python3.x in need is pymysql, we must pay attention to:

 

After installing pymysql still not installed Pythondb newspaper, then it needs to be added in inte.py in:

import pymysql
pymysql.version_info = (1, 4, 6, 'final', 0) # change mysqlclient version
pymysql.install_as_MySQLdb()

 

 So that the error will not run

 

Guess you like

Origin www.cnblogs.com/y862621115/p/12286636.html