python连接数据库
import MySQLdb as mdb from fdfs_client.client import * """ 连接数据库 查找tag_img表 查找url,id fastdf根据url下载图(还未实现) """ db131 = mdb.connect("192.168.1.31","sss","sss","ss-sss2",charset='utf8') db160 = mdb.connect("192.168.1.10","root","sssssss@ssss","ss-sss",charset='utf8') cursor160 = db160.cursor() cursor160.execute("SELECT * FROM tag_img WHERE `id`='00013338733343539431354303303033'") data160 = cursor160.fetchone() print(data160) db160.close()