您的位置:首页 > 博客中心 > 数据库 >

mysql增加自定义函数功能

时间:2022-03-13 23:57

mysql默认是不能自定义函数的

当create function时

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

solution 1:

exec:

SET GLOBAL log_bin_trust_function_creators = 1;

mysql重启会失效

attention:mysql主从数据库配置,主从复制时,从机必须要设置,不然会导致主从同步失败

 

 

solution 2:

配置my.cnf

log-bin-trust-function-creators=1

重启mysql服务

热门排行

今日推荐

热门手游