mysql数据库添加函数时报错:1418 - This function has nOne Of DETERMINISTIC, NO SOL, Or READS SQL DATA in its declaration and binary logging is enabled (youmight want to use the less safe log bin trust function creators variable)
解决方案:
执行命令:show variables like 'log_bin_trust_function_creators'(注意执行该命令不要进入数据库中执行,不然会报错)
执行结果:log_bin_trust_function_creators OFF
这时需要将off设置为on执行下面代码
set global log_bin_trust_function_creators=1;
如果想在设置回来执行下面命令:
set global log_bin_trust_function_creators=0;