MySQL did a timed execution of the event, found that the original work, and now not.
Call the error log file in/var/lib/mysql and find a sentence:
Unsafe statement written to the binary log using statement format since Binlog_format = statement. Statement is unsafe because it uses a system function, that could return a different value on the slave.
The current MySQL version is low, and the UUID function does not support the statement mode of MySQL replication.
Change the code first to ensure compatibility with the lower version:
BEGIN
--The UUID function is a nondeterministic function, which does not support the statement mode of MySQL replication, but supports mixed, row two modes
--in Copy mode, the UUID () function is required, so you must use the method of copy-based row/blend mode.
Set binlog_format = MIXED;
Insert into Users (username,guid,userpinyin,userpy,uper)
Select DISTINCT userName, UUID (), To_pinyin (UserName), TO_PINYINSX (UserName), Domain from T_zhangdan a
Where NOT EXISTS (select 1 from Users where username=a.username);
END
MYSQL uuid ()