创建存储过程时
错误信息: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)
原因:开启了bin-log,需要为function指定一个参数
解决:
临时:
show global variables like 'log_bin%';
set global log_bin_trust_function_creators = 1;
或set global log_bin_trust_function_creators = on;
永久:
在my.cnf配置文件中mysqld模块下添加:
log_bin_trust_function_creators=1
临时+永久,可以不重启永久生效。