This function has none of deterministic, no SQL, or reads SQL data in its error records

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)

The solution to this error when creating a function in MySQL:
set global log_ bin_ trust_ function_ Creators = true;
it should be noted that it is invalid after restarting the service.

Read More: