mdserver-web/plugins/mysql
dami 29795074fe Update index.py 2025-07-27 17:17:17 +08:00
..
bak Create orm.py 2023-12-25 19:56:48 +08:00
conf update 2025-07-20 11:05:24 +08:00
init.d update 2024-06-10 00:13:02 +08:00
js Update mysql.js 2025-07-27 17:01:36 +08:00
lib up 2022-11-28 21:46:56 +08:00
patch update 2024-07-24 23:07:08 +08:00
scripts up 2022-07-07 09:55:46 +08:00
versions update 2025-03-25 11:55:05 +08:00
README.md update 2024-05-17 16:51:10 +08:00
ico.png 减小图片大小 2019-03-29 01:05:11 +08:00
index.html update 2023-11-08 01:00:29 +08:00
index.py Update index.py 2025-07-27 17:17:17 +08:00
index_mysql.py update 2024-11-25 01:01:20 +08:00
info.json Update info.json 2025-03-25 12:26:05 +08:00
install.sh Update install.sh 2025-07-27 16:07:50 +08:00

README.md

show global  variables like '%gtid%';
show global  variables like 'server_uuid';
# 不锁表,需要删除原来数据表
# tables = db.query('show tables from `%s`' % sync_db_import)
# table_key = "Tables_in_" + sync_db_import
# for tname in tables:
#     drop_db_cmd = 'drop table if exists '+sync_db_import+'.'+tname[table_key]
#     # print(drop_db_cmd)
#     db.query(drop_db_cmd)
# 修改同步位置
# master_info = sync_mdb.query('show master status')
# slave_info = db.query('show slave status')
# if len(master_info)>0:
#     channel_name = slave_info[0]['Channel_Name']
#     change_cmd = "CHANGE MASTER TO  MASTER_LOG_FILE='"+master_info[0]['File']+"', MASTER_LOG_POS="+str(master_info[0]['Position'])+" for channel '"+channel_name+"';"
#     print(change_cmd)
#     r = db.execute(change_cmd)
#     print(r)