MySQL 创建函数失败提示1418

在创建函数时,往往会遇到创建函数失败的情形,除去书写的创建函数的sql语句本身语法错误之外,还会碰到一个错误就是,

1418:This function has none of DETERMINISTIC, NO SQL,or READS SQL DATA in its declaration and binary logging is enabled(you might want to use the less safe log_bin_trust_function_creators variable)

当提示这种错误的时候,解决方法如下:

一、查看创建函数的功能是否开启:

mysql> show variables like '%func%';
+-----------------------------------------+-------+
| Variable_name | Value |
+-----------------------------------------+-------+
| log_bin_trust_function_creators | ON    |
+-----------------------------------------+-------+
1 row in set (0.02 sec)

二、如果Value处值为OFF,则需将其开启。
mysql> set global log_bin_trust_function_creators=1;
 
三、创建函数
语法略过,可以通过Navicat工具操作,简单快捷

相关文章:

  • 2021-06-24
  • 2021-07-25
  • 2021-09-04
  • 2021-06-20
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-29
  • 2021-06-21
  • 2022-01-18
  • 2021-09-01
  • 2021-07-02
  • 2021-04-02
  • 2022-12-23
相关资源
相似解决方案