MySQL Forums
Forum List  »  Replication

Setting up replication, no errors but no data replicates
Posted by: David Horan
Date: September 09, 2025 01:37PM

Trying to configure replication.
We used the existing dev/test DB VM server to make a clone and create a DB replica server. I dropped the two target DB's that we want to replicate. I used mysqldump to dump the existing database and recreate them on the replica_server.

If I stop and start replica this is the only message related to replication that I see on the replica_server:
2025-09-09T16:23:39.240573Z 25 [System] [MY-014001] [Repl] Replica receiver thread for channel '': connected to source 'replication_user@152.x.x.x5:3310' with server_uuid=5f89cf28-6f3c-11ed-83c5-00505683041f, server_id=1. Starting replication from file 'mysql_bin.000002', position '4478572'.

##### relevant information from the master server
mysql> show master status\G
*************************** 1. row ***************************
File: mysql_bin.000002
Position: 4938118
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set: 5f89cf28-6f3c-11ed-83c5-00505683041f:1-10430
1 row in set (0.00 sec)

mysql>
mysql> show variables like 'server_id';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| server_id | 1 |
+---------------+-------+
1 row in set (0.00 sec)

mysql> show variables like 'log_bin';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_bin | ON |
+---------------+-------+
1 row in set (0.00 sec)

mysql>
mysql> show variables like 'version';
+---------------+--------+
| Variable_name | Value |
+---------------+--------+
| version | 8.0.41 |
+---------------+--------+
1 row in set (0.00 sec)

### relevant information from mysql.cnf
# Enable GTID based replication
server-id = 1
log_bin = mysql_bin
gtid_mode=ON
enforce-gtid-consistency=ON


##### relevant information from the replica server. I cut some of the blank
##### variables, they have never come up in any google searches
### The replica
mysql> show replica status\G
*************************** 1. row ***************************
Replica_IO_State: Waiting for source to send event
Source_Host: 152.x.x.x5
Source_User: replication_user
Source_Port: 3310
Connect_Retry: 60
Source_Log_File: mysql_bin.000002
Read_Source_Log_Pos: 4960447
Relay_Log_File: replicaserver-relay-bin.000011
Relay_Log_Pos: 482241
Relay_Source_Log_File: mysql_bin.000002
Replica_IO_Running: Yes
Replica_SQL_Running: Yes
Replicate_Do_DB: app1_devdb,app2_devdb
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Source_Log_Pos: 4960447
Relay_Log_Space: 4961088
Until_Condition: None
Seconds_Behind_Source: 0
Source_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Source_Server_Id: 1
Source_UUID: 5f89cf28-6f3c-11ed-83c5-00505683041f
Source_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Replica_SQL_Running_State: Replica has read all relay log; waiting for more updates
Source_Retry_Count: 86400
Retrieved_Gtid_Set: 5f89cf28-6f3c-11ed-83c5-00505683041f:1688-10459
Executed_Gtid_Set: 01bddbdf-8a85-11f0-9d64-005056909086:1-8,
5f89cf28-6f3c-11ed-83c5-00505683041f:1-3539156,
b390a816-acc1-11ea-9f97-005056aca952:1-301238
Auto_Position: 0
Get_Source_public_key: 0
1 row in set (0.01 sec)

#### NOTES from above I don't know where these two came from
#### 01bddbdf-8a85-11f0-9d64-005056909086
#### b390a816-acc1-11ea-9f97-005056aca952

mysql> show variables like 'server_id';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| server_id | 2 |
+---------------+-------+
1 row in set (0.00 sec)

mysql> show variables like 'log_bin';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_bin | ON |
+---------------+-------+
1 row in set (0.00 sec)

mysql> show variables like 'version';
+---------------+--------+
| Variable_name | Value |
+---------------+--------+
| version | 8.0.41 |
+---------------+--------+
1 row in set (0.00 sec)

mysql>

### the relevant section mysql.cnf
# relay log location
relay_log = replicaserver-relay-bin
relay_log_index = /mysql01/data/replicaserver-relay-bin.index

# Enable GTID based replication
server-id = 2
gtid_mode=ON
enforce-gtid-consistency=ON
read-only=1

# Only Replicate the following DBs.
replicate_do_db = app1_devdb
replicate_do_db = app2_devdb


Additional info, after the initial attempt I have reset the master and the replica server. I have reset just the replica.
After making changes on the master and them not showing up on the replica, I have stopped replica, did mysqldump to copy over the updated DB and used mysql change replication source updating the source logfile and source log position with the new information.

I saw this as a basic test of replication: create table test_replication (id INT); But the table does not replicate to the replica server.

From linux CLI I tested the replication user from replica server to master using:
mysql -H 152.x.x.x5 -P 3310 -u replica_user -p and I can successfully connect.

Options: ReplyQuote


Subject
Views
Written By
Posted
Setting up replication, no errors but no data replicates
131
September 09, 2025 01:37PM


Sorry, only registered users may post in this forum.

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.