0

我构建了一个 2 节点 MariaDB Galera 集群(5.5.36),如果创建数据库/表,node1 和 node2 都可以看到更改,甚至在创建的表中插入 1 行,但如果导入 csv 文件(300,000+ 行, 使用"LOAD DATA INFILE...") 从node1 到创建的表,node2 不会看到任何变化。

为什么从 csv 文件导入行时 node2 不同步?

以下是/etc/my.cnf下node1的配置文件,node2的配置只是切换ip地址

#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

[mariadb]
wsrep_cluster_address=gcomm://172.16.10.01
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_sst_auth=root:password
wsrep_node_address=172.16.10.02
log-error=/var/log/mysql.log
log_slave_updates=ON
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
4

1 回答 1

0

使用批量插入将复制所有节点,不要使用“LOAD DATA INFILE”导入csv文件。我在网上找到了这个:Maria Galera Cluster 是真正的并行复制,在行级别上。

于 2014-04-09T17:15:37.403 回答