Mysql – Testing Database Replication and timestamps are different

MySQLreplication

This may be a stupid question.

I've just setup database replication across two servers on different networks.

The Master is on MySQL v5.5.52 and Slave is on MySQL v5.7.21.

The replication all looks good, but when I manually checked the databases this morning to make sure it's pulling through accurately, I noticed the timestamps were different.

One of my tables has a column for the current timestamp, which on update is updated with NOW().

The master timestamp reads as 2018-02-01 16:43:23 the slave as 2018-02-01 22:43:23

Why would these be different? How can I make these match?

Best Answer

Do this on both machines:

show variables like '%zone%';

Also check the OS dates.

I think you will find a configuration difference.