【发布时间】:2020-08-21 16:57:52
【问题描述】:
我想在flask中使用MySQL,一个配置是
app.config['SQLALCHEMY_DATABASE_URI'] = "mysql+pymysql://user:password@127.0.0.1:3306/db"
如果我使用mysql+pymysql,它可以工作
但是当我只使用mysql时,错误信息是这样的
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
但在我的代码中,我没有导入pymysql,那么pymysql 是什么以及为什么需要使用它才能工作
我知道
pymysql是一个moudle
感谢您的回复!
【问题讨论】:
-
请说明您使用的是哪个数据库客户端?
标签: python mysql sqlalchemy