Open fengbao123 opened 7 months ago
slave_status_dict = cursor.fetchone() # 这里是 fetchone
貌似不支持多源复制。
def get_slave_status(self): cursor = self._connection.cursor(cursor=pymysql.cursors.DictCursor) # 以字典的形式返回操作结果 try: cursor.execute('SHOW SLAVE STATUS') slave_status_dict = cursor.fetchone() # 这里是 fetchone except pymysql.Error as e: print("Error %d: %s" % (e.args[0], e.args[1])) finally: cursor.close()
slave_status_dict = cursor.fetchone() # 这里是 fetchone
貌似不支持多源复制。