mysql增加自定义函数功能

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服务

你可能感兴趣的:(mysql)