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

####### Flask项目中使用mysql数据库启动项目是发出警告:
Warning: (1366, “Incorrect string value: ‘xD6xD0xB9xFAxB1xEA…’ 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 mysql-connector

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