01 2015 档案

摘要:查询所有数据库占用磁盘空间大小的SQL语句: 复制代码代码如下: select TABLE_SCHEMA, concat(truncate(sum(data_length)/1024/1024,2),' MB') as data_size, concat(truncate(sum(index_l... 阅读全文
posted @ 2015-01-09 18:16 chaotech 阅读(278) 评论(0) 推荐(0)
摘要:import time,pymysqltry:#获取一个数据库连接,注意如果是UTF-8类型的,需要制定数据库conn=pymysql.connect(host='localhost',user='root',passwd='123456',db='test',port=3306,charset='... 阅读全文
posted @ 2015-01-08 16:41 chaotech 阅读(168) 评论(0) 推荐(0)
摘要:import urllib.requestresponse = urllib.request.urlopen('http://www.baidu.com/')html = response.read()z_data=html.decode('UTF-8')print(z_data) 阅读全文
posted @ 2015-01-08 16:38 chaotech 阅读(320) 评论(0) 推荐(0)