MySQL uses replication as the master node. if you add a trigger from the top, when the insert statement has now (), you need to add default-time-zone to the server startup Item. Otherwise, a time zone issue occurs.
16.4.1.31. replication and time zones
The same system time zone shoshould be set for both master and slave. Otherwise, statements depending on the local time on the master are not replicated properly, such as statements that use Now ()
OrFrom_unixtime ()
Functions. You can set the time zone in which MySQL server runs by using -- Timezone =Timezone_name
Option ofMysqld_safe
Script or by setting TZ
Environment variable. See also section 16.4.1.14, "replication and system functions ".
If the master is MySQL 4.1 or earlier, both master and slave shoshould also use the same default connection time zone. that is, the -- default-time-zone
parameter shocould have the same value for both master and slave.
Convert_tz (...,..., @ session. time_zone)
Is properly replicated only if both master and slave are running MySQL 5.0.4 or newer.