码迷,mamicode.com
首页 > 数据库 > 详细

Flask项目中使用mysql数据库启动项目是发出警告

时间:2019-09-23 12:02:40      阅读:106      评论:0      收藏:0      [点我收藏+]

标签:file   ble   variable   event   connect   student   导入   port   gevent   

Flask项目中使用mysql数据库启动项目是发出警告:

Warning: (1366, “Incorrect string value: ‘\xD6\xD0\xB9\xFA\xB1\xEA…’ for column ‘VARIABLE_VALUE’ at row 479”)

项目正常服务:警告去掉需要导入一个模块

pip install mysql-connector

然后在config配置中添加

SQLALCHEMY_DATABASE_URI = "mysql+mysqlconnector://root:123@localhost/StudentManage"

但是安装的时候遇到了一个问题。

pip安装时ReadTimeoutError解决办法

pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org‘, port=443): Read timed out.

使用以下方法可以解决:

pip --default-timeout=100 install gevent

Flask项目中使用mysql数据库启动项目是发出警告

标签:file   ble   variable   event   connect   student   导入   port   gevent   

原文地址:https://www.cnblogs.com/lph970417/p/11571319.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!