从主服务器上的主位置未更新
Master position not updating on slave-master server
我有 1 个主从复制,同时从服务器是 MariaDB 集群的主服务器,这将取代实际的两个数据库服务器。一切看起来都很好,但是自从上个月设置集群以来,从站上的主站位置没有更新。
Slave 从主服务器写入数据正常,但集群从未更新过 since.In 事实上没有观察到错误,但注意到集群与从一开始就设置的一样。
我知道集群不写入新数据与从站上的主站位置有关。
那么问题来了,为什么slave上的master位置没有更新?
在我的主人身上
mysql>秀主status\G;
*************************** 1. 行 *************** ************
文件:mysql-bin.000775
职位:6593494
Binlog_Do_DB:
Binlog_Ignore_DB: mysql,performance_schema,phpmyadmin,information_schema
一组中的 1 行(0.00 秒)
在我的奴隶上:
MariaDB [(none)]> 显示从属 status\G;
*************************** 1. 行 *************** ************
Slave_IO_State: 等待master发送事件
Master_Host: master_IP
Master_User:复制
Master_Port: 3306
Connect_Retry: 10
Master_Log_File: mysql-bin.000775
Read_Master_Log_Pos: 4192372
Relay_Log_File: slave-relay-bin.002921
Relay_Log_Pos: 2315832
中继_Master_Log_File: mysql-bin.000775
Slave_IO_Running: 是
Slave_SQL_Running: 是
也在 SLAVE 上
MariaDB [(none)]> 显示大师 status\G;
*************************** 1. 行 *************** ************
文件:mysql-replication.000003
职位:342
Binlog_Do_DB:
Binlog_Ignore_DB:
一组中的 1 行(0.00 秒)
在集群上
MariaDB [none]> 显示奴隶 status\G;
*************************** 1. 行 *************** ************
Slave_IO_State: 等待master发送事件
Master_Host: slave_IP
Master_User:副本
Master_Port: 3306
Connect_Retry: 10
Master_Log_File: mysql-replication.000003
Read_Master_Log_Pos: 342
Relay_Log_File: cluster-relay-bin.000004
Relay_Log_Pos: 645
中继_Master_Log_File: mysql-replication.000003
Slave_IO_Running: 是
Slave_SQL_Running: 是
机器不会将传入事件复制到下游副本,除非您在其上启用 log_slave_updates
。
Normally, a slave does not write any updates that are received from a master server to its own binary log. This option causes the slave to write the updates performed by its SQL thread to its own binary log.
(MySQL 引用了文档,但对于 MariaDB 也是准确的。)
不相关,但 Binlog_Ignore_Db
通常是不必要的并且可能有问题。
我有 1 个主从复制,同时从服务器是 MariaDB 集群的主服务器,这将取代实际的两个数据库服务器。一切看起来都很好,但是自从上个月设置集群以来,从站上的主站位置没有更新。
Slave 从主服务器写入数据正常,但集群从未更新过 since.In 事实上没有观察到错误,但注意到集群与从一开始就设置的一样。
我知道集群不写入新数据与从站上的主站位置有关。
那么问题来了,为什么slave上的master位置没有更新?
在我的主人身上
mysql>秀主status\G;
*************************** 1. 行 *************** ************
文件:mysql-bin.000775
职位:6593494
Binlog_Do_DB:
Binlog_Ignore_DB: mysql,performance_schema,phpmyadmin,information_schema
一组中的 1 行(0.00 秒)
在我的奴隶上:
MariaDB [(none)]> 显示从属 status\G;
*************************** 1. 行 *************** ************
Slave_IO_State: 等待master发送事件
Master_Host: master_IP
Master_User:复制
Master_Port: 3306
Connect_Retry: 10
Master_Log_File: mysql-bin.000775
Read_Master_Log_Pos: 4192372
Relay_Log_File: slave-relay-bin.002921
Relay_Log_Pos: 2315832
中继_Master_Log_File: mysql-bin.000775
Slave_IO_Running: 是
Slave_SQL_Running: 是
也在 SLAVE 上
MariaDB [(none)]> 显示大师 status\G;
*************************** 1. 行 *************** ************
文件:mysql-replication.000003
职位:342
Binlog_Do_DB:
Binlog_Ignore_DB:
一组中的 1 行(0.00 秒)
在集群上
MariaDB [none]> 显示奴隶 status\G;
*************************** 1. 行 *************** ************
Slave_IO_State: 等待master发送事件
Master_Host: slave_IP
Master_User:副本
Master_Port: 3306
Connect_Retry: 10
Master_Log_File: mysql-replication.000003
Read_Master_Log_Pos: 342
Relay_Log_File: cluster-relay-bin.000004
Relay_Log_Pos: 645
中继_Master_Log_File: mysql-replication.000003
Slave_IO_Running: 是
Slave_SQL_Running: 是
机器不会将传入事件复制到下游副本,除非您在其上启用 log_slave_updates
。
Normally, a slave does not write any updates that are received from a master server to its own binary log. This option causes the slave to write the updates performed by its SQL thread to its own binary log.
(MySQL 引用了文档,但对于 MariaDB 也是准确的。)
不相关,但 Binlog_Ignore_Db
通常是不必要的并且可能有问题。