This is when we turn on bin-log, we must specify whether our function is
1 DETERMINISTIC Uncertain
2 NO SQL There is no SQl statement, and of course will not modify the data
3 READS SQL DATA only reads the data, of course will not modify Data
4 MODIFIES SQL DATA To modify data
5 CONTAINS SQL Contains SQL statements
Among the functions, only DETERMINISTIC, NO SQL and READS SQL DATA are supported. If we have bin-log enabled, we must specify an argument to our function.
The solution to this error when creating a function in MySQL, add the following line to the sql file
set global log_bin_trust_function_creators=TRUE;