修改默认端口 3306
app.config['SQLALCHEMY_DATABASE_URI'] ='mysql://useword:password@127.0.0.1:3306/db_test?charset=utf8'
改成MySQL端口:4999以下代码
app.config['SQLALCHEMY_DATABASE_URI'] ='mysql://useword:password@127.0.0.1:4999/db_test?charset=utf8'
修改默认端口 3306
app.config['SQLALCHEMY_DATABASE_URI'] ='mysql://useword:password@127.0.0.1:3306/db_test?charset=utf8'
改成MySQL端口:4999以下代码
app.config['SQLALCHEMY_DATABASE_URI'] ='mysql://useword:password@127.0.0.1:4999/db_test?charset=utf8'
本文标题:配置Flask-sqlalchemy连接MySQL数据库
本文链接:https://www.haomeiwen.com/subject/tcvkkctx.html
网友评论