This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary log

mysql 复制数据库到其他主机时,报: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) 错误。

错误原因:
MySQL设置默认不允许创建函数。

解决办法:
SET GLOBAL log_bin_trust_function_creators = 1;(重启后失效;存在主从复制时从机必须设置)
或者:
在my.cnf设置log-bin-trust-function-creators=1(设置后重启mysql服务)

你可能感兴趣的:(mysql)