某次爬虫写的一个简单的python连接MySQL的工具类 import pymysql class MysqlTool: # 初始化连接参数,不传的话使用默认 def __init__(self, host='127.0.0.1', user='root', passwd='root', db='test', charset='utf8'): self.host = host self.uNmae = user self.pwd = passwd self.db = db self.charset =