mysql自定义

mysql在自定义函数时会出现

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'end' at line 1

的错误,并且已经更改了标识符,通过百度发现是log_bin_trust_function_creators 属性没有开启


解决方法是:

一、

输入 show variables like '%func%'; 命令

会看到 log_bin_trust_function_creators 的状态,OFF表示自定义函数功能是关闭的

输入命令 set global log_bin_trust_function_creators=1;

再次输入show variables like '%func%'; 命令

这时log_bin_trust_function_creators 则为ON

二、

但是一方案,会因mysql自动重启后状态又会变为OFF,所以需要在

在服务启动时加上 “--log-bin-trust-function-creators=1 ”参数。
或在my.ini(my.cnf)中的[mysqld]区段中加上 log-bin-trust-function-creators=1。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值