可以安装PyMySQL(pymysql),“pip install PyMySQL”,然后在__init__.py文件中添加以下代码即可:

import pymysql
pymysql.install_as_MySQLdb()

 

另外,python3已经不支持MySQL-python。

相关文章:

  • 2021-12-31
  • 2021-10-28
  • 2022-12-23
  • 2021-10-29
  • 2021-11-23
  • 2021-10-15
  • 2021-08-10
  • 2022-01-14
猜你喜欢
  • 2021-10-10
  • 2021-07-09
  • 2021-04-22
  • 2021-06-12
  • 2021-12-16
  • 2021-12-12
  • 2022-12-23
相关资源
相似解决方案