2021
04-07
04-07
python 实现mysql自动增删分区的方法
连接mysql#!/usr/bin/python#-*-coding:utf-8-*-importtimeimportpymysqlclassconnect_mysql(object):def__init__(self,host,dbname):self.mysql_config={'host':host,'port':33071,'user':'sysbench','passwd':'970125','db':dbname,'charset':'utf8mb4',}self.dbname=dbnamedefselect_db(self,sql):mysql_conn=pymysql.connect(**self.mysql_con...
继续阅读 >