1.安装mysql-connector-python驱动
  pip install mysql-connector-python
2.修改代码
engine = create_engine("mysql+pymysql://root:password@localhost/my_db")
改为:
engine = create_engine("mysql+mysqlconnector://root:password@localhost/my_db")

 

详细文档可参考:https://www.jianshu.com/p/e09eb9cc2830

相关文章:

  • 2021-05-23
  • 2021-06-24
  • 2021-12-20
  • 2021-05-27
  • 2022-01-11
  • 2021-11-14
  • 2021-11-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2021-10-23
  • 2021-04-29
  • 2022-01-11
相关资源
相似解决方案