SAP运输单自动化:BAPI_SHIPMENT_CREATE批量创建实战指南
2026/8/25 9:10:00
关于MySQL MGR集群的介绍就不在这里做详细的介绍了,大家可以自己到官网上查看阅读。在这里主要是实际操作方面的内容
总体结构设计如下图
| 序号 | 角色 | IP地址 | 数据库端口 | MGR端口 |
|---|---|---|---|---|
| 1 | 主节点 | 192.168.56.104 | 3309 | 10061 |
| 2 | 从节点 | 192.168.56.105 | 3309 | 10061 |
| 3 | 从节点 | 192.168.56.106 | 3309 | 10061 |
| 4 | MySQLrouter | 192.168.56.107 | 7001 读写,7002 只读 |
节点1
[mysqld] ##basic settings### server-id=104 port = 3309 character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci skip-name-resolve max_connections=1000 max_user_connections=800 max_allowed_packet=512M max_connect_errors=100000 datadir = /usr/local/mysql/data socket = /usr/local/mysql/data/mysql.sock pid_file = /usr/local/mysql/data/mysql.pid transaction_isolation = READ-COMMITTED lower_case_table_names=1 default_time_zone =+8:00 open_files_limit=65535 log_timestamps=system wait_timeout=900 interactive_timeout=900 ##innodb setting## innodb_buffer_pool_size = 256M innodb_buffer_pool_instances = 1 innodb_io_capacity=2000 innodb_flush_method=O_DIRECT innodb_flush_neighbors=0 innodb_flush_log_at_trx_commit = 1 innodb_print_all_deadlocks = 1 innodb_online_alter_log_max_size=128M innodb_lock_wait_timeout=10 innodb_file_per_table=ON innodb_doublewrite=ON ##log settings## log-error = /usr/local/mysql/data/error.log log-bin = /usr/local/mysql/data/mysql_bin.log slow_query_log = 1 slow_query_log_file = /usr/local/mysql/data/mysql_slow_query.log long_query_time = 10 ##replication settings## gtid-mode=on enforce-gtid-consistency=true master-info-repository=TABLE relay-log-info-repository=TABLE sync-master-info=1000 relay_log_recovery = 1 relay-log=/usr/local/mysql/data/relay-bin #binlog log_bin=/usr/local/mysql/data/binlog #expire_logs_days=10 #MySQL 5.7版本 binlog_expire_logs_seconds = 604800 # 保留7天 max_binlog_cache_size=200M sync_binlog=1 ##MGR settings binlog_checksum = NONE log_replica_updates = ON binlog_format=row plugin_load_add='group_replication.so' #transaction_write_set_extraction ='XXHASH64' #loose-group_replication_group_name = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' #loose-group_replication_start_on_boot = off #loose-group_replication_local_address = '192.168.56.104:10061' #loose-group_replication_group_seeds ='192.168.56.104:10061,192.168.56.105:10061,192.168.56.106:10061' #loose-group_replication_bootstrap_group = off #loose-group_replication_ip_whitelist = '192.168.56.104/24,192.168.56.105/24,192.168.56.106/24' #loose-group_replication_member_weight=50 #loose-group_replication_single_primary_mode=ON #loose-group_replication_enforce_update_everywhere_checks=OFF ###单主模式关闭,多主模式开启 [client] port = 3309 socket = /usr/local/mysql/data/mysql.sock节点2
[mysqld] ##basic settings### server-id=105 port = 3309 character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci skip-name-resolve max_connections=1000 max_user_connections=800 max_allowed_packet=512M max_connect_errors=10