Re: Mysql 5.7 replication (A -> B -> C) not working
Thanks a lot for the reply. I've followed the article double verified the config files. Kindly check the details below.
On Server C(Master):
#/etc/my.cnf
[mysqld]
key_buffer_size=512M
server-id=2
report-host=10.13.123.40
user=mysql
read_only=0
log-slave-updates=1
log_bin=mysql-bin
relay-log=mysql-relay-bin
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
mysql> show slave hosts;
+-----------+--------------+------+-----------+--------------------------------------+
| Server_id | Host | Port | Master_id | Slave_UUID |
+-----------+--------------+------+-----------+--------------------------------------+
| 102 | 10.13.123.41 | 3306 | 2 | 1fa9a760-d853-11eb-ab2e-005056967d87 |
+-----------+--------------+------+-----------+--------------------------------------+
1 row in set (0.00 sec)
mysql> SHOW variables WHERE Variable_Name IN ("server_id", "log_bin", "relay_log", "log_slave_updates", "read_only");
+-------------------+-----------------+
| Variable_name | Value |
+-------------------+-----------------+
| log_bin | ON |
| log_slave_updates | ON |
| read_only | OFF |
| relay_log | mysql-relay-bin |
| server_id | 2 |
+-------------------+-----------------+
5 rows in set (0.00 sec)
mysql> show master status\G
*************************** 1. row ***************************
File: mysql-bin.000002
Position: 154
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set:
1 row in set (0.00 sec)
mysql>
=============================
In Slave (Server D):
mysql> SHOW variables WHERE Variable_Name IN ("server_id", "log_bin", "relay_log", "log_slave_updates", "read_only");
+-------------------+-------+
| Variable_name | Value |
+-------------------+-------+
| log_bin | ON |
| log_slave_updates | OFF |
| read_only | ON |
| relay_log | |
| server_id | 102 |
+-------------------+-------+
5 rows in set (0.00 sec)
mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 10.13.123.40
Master_User: replica
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000002
Read_Master_Log_Pos: 154
Relay_Log_File: lon-cms-prod-v2-relay-bin.000003
Relay_Log_Pos: 367
Relay_Master_Log_File: mysql-bin.000002
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 154
Relay_Log_Space: 797
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 2
Master_UUID: bfd4b293-d3ec-11eb-a834-00505696d4ab
Master_Info_File: /var/lib/mysql/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
1 row in set (0.00 sec)
mysql> show tables;
Empty set (0.00 sec)
mysql>
Subject
Views
Written By
Posted
959
June 28, 2021 02:53AM
343
June 28, 2021 01:45PM
Re: Mysql 5.7 replication (A -> B -> C) not working
393
June 28, 2021 03:08PM
348
June 28, 2021 04:07PM
399
June 29, 2021 12:36AM
328
June 29, 2021 08:06AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.