python操作数据库
Kelly雨薇
一步一个脚印
展开
-
python操作redis
怎么用python连接redis,清除redis缓存? def clearRedis(): port = [111,222,333] for i in port: r = redis.Redis(host = '10.0.0.0',port = i,db=0) list_keys = r.keys("keywords*") for...原创 2019-01-14 19:41:20 · 106 阅读 · 0 评论 -
python怎么操作mysql
python怎么操作mysql? 先附一段代码: import pymysql import redis import datetime def truncateDateBase(): connect = pymysql.Connect( host='10.1.1.123', port=1111, user='user_name', ...原创 2019-01-14 20:17:45 · 607 阅读 · 0 评论