This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled
分析:
根据系统提示,导致该错误的原因可能是一个安全设置方面的配置,查手册log_bin_trust_function_creators参数缺省0,是不允许function的同步的
建立不了函数,是未开启功能:
mysql> show variables like '%func%';
mysql> set global log_bin_trust_function_creators=1;
搞定!