会报下面这个1366的错

  1. 安装MySQL驱动(我升级过Python,所以要再装一遍)

    本想安装MySQL官方驱动mysql-connector-python的,然而官方目前只支持到3.4
    我又懒,所以就用了另一个驱动mysql-connector,也不知道是谁开发的…… 
  2. 修改代码,把

app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:password@localhost/database'

改成

app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+mysqlconnector://root:password@localhost/database'

至此,上述1366报错信息消失!

 

相关文章:

  • 2022-12-23
  • 2021-10-31
  • 2021-07-21
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-05
  • 2021-12-19
  • 2022-12-23
  • 2021-09-01
相关资源
相似解决方案