A 1418 error occurred in the mysql creation function

  • 2020-05-27 07:22:31
  • OfStack

Error Code : 1418 
This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) 
(0 ms taken) 

According to the system prompt, the reason for this error may be the configuration of a security setting. According to the manual, log_bin_trust_function_creators parameter defaults to 0, which does not allow the synchronization of function. Generally, we forget to pay attention to this parameter when configuring repliaction, so that after master updates funtion, slave will report the error, and then slave stoped.
Log in to the mysql database
> set global log_bin_trust_function_creators = 1;
> start slave;
Trace the startup log of mysql, slave is running normally, and the problem is solved.

Related articles: