![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tornado
Taoware
fun with code
展开
-
Tornado服务器连接数据库
环境python3.6.1vscodemysqlnavicat安装需要的包pip installtorndb_for_python3pip install pymysql==0.8.0#请安装pymysql的0.8.0版本,否则可能出现一个FLAG不存在的bug。亲测0.8.0可用。tornadb不适用于python3,torndb_for_python3 是修改过的包。若安装tornadb,则无法在python3使用查询测试import to...原创 2022-05-24 21:34:08 · 500 阅读 · 0 评论 -
Tornado获取mysql返回结果后转为字典
查询import torndb_for_python3 as torndb # 1.连接数据库db = torndb.Connection( host='localhost', database='dbname', user='root', password='111111') # 2.查询result = db.query('select * from user')print(result) # 3.关闭连接db.close()结果是一个原创 2022-05-25 10:27:31 · 307 阅读 · 0 评论