I seem to have an impossible situation.
I have set up MySQL (8.0) on a Master and Slave and followed instructions to set up replication.
Replication seems to be running but none of the tables in the slave are being updated.
Running in AlmaLinux 9.
Details from Master:
In \etc\my.cnf.d\mysql-server.cnf I have added
server-id = 1
log-bin = mysql-bin
binlog_format = row
gtid-mode=ON
enforce-gtid-consistency=ON
log-slave-updates=ON
show master status shows
File: mysql-bin.000003
Position: 31142290
Gtd: f675fc68-1ade-11f0-8732-0201eb49f50d:1-38965
Details from Slave:
In \etc\my.cnf.d\mysql-server.cnf I have added
server-id = 2
log-bin = mysql-bin
relay-log = relay-log-server
read-only = OFF
gtid-mode=ON
enforce-gtid-consistency
log-slave-updates
show replica status shows
Replica_IO_State Waiting for source to send event
Source_Host ionos1.xxxx.co.uk
Source_User replica_user
Source_Port 3306
Connect_Retry 60
Source_Log_File mysql-bin.000003
Read_Source_Log_Pos 31141859
Relay_Log_File relay-log-server.000004
Relay_Log_Pos 31141644
Relay_Source_Log_File mysql-bin.000003
Replica_IO_Running Yes
Replica_SQL_Running Yes
The Log_Pos values seem to be strange - and the slave is always lagging behind the master even though it always shows 'Waiting for source to send event'
The total size of the 3 bin files is 321,141 KB
Thanks in advance.
Edit added:
As I'm not concerned about corrupting the slave data, I thought I would try some changes. In the cnf file of the slave I removed what looked like redundant lines, leaving just:
server-id = 2;
relay-log = relay-log-server
read-only = OFF.
I then executed:
RESET SLAVE;
CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=1;
START SLAVE;
I restarted mysqld for both servers. Now replica status shows 'connecting to server' with log_pos stuck at 4.
The log shows: "Can't connect to MySQL server on 'ionos1.xxxx.co.uk:3306' (110), Error_code: MY-002003" so my change must have broken something.
So I put back the removed lines and restarted mysqld for both - but still failing to connect.
I would not mind totally removing all reference to replication on both servers and starting afresh, but I have tried that already once and still ended up with the same problem.