描述:我们在mysql中创建或调用储存函数时可能会抛出错误:This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled(you *might* to use the less safe log_bin_trust_function_creators variables)
原因:这其实是创建的储存函数不被二进制日志文件信任导致的。
解决办法:只需要将全局变量log_bin_trust_function_creators variables的值改为1。语法如下:
set global log_bin_trust_function_creators=1;