mysql 创立函数EPAJERORO揽胜极光 141八 (HY000): 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_f,deterministic

mysql 创造函数的时候 报错

    ERROR 1418 (HY000): 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)ERROR 1418 (HY000): 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)

永利皇宫登录网址 1

 

  Mysql 函数无法创制,是未张开作用:

    

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

mysql> set global log_bin_trust_function_creators=1;  
Query OK, 0 rows affected (0.00 sec)  

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

如此那般就哦了

创立函数E中华VRO本田UR-V 1418 (HY000): This function
has none of DETEKoleosMINISTIC, NO SQL, or READS SQL DATA in its declaration
and binary logging is enabled (you *might* want to use t…

MySQL函数不能够创制的化解措施,mysql函数化解措施

MySQL函数无法创立,是2个很麻烦的难点,上边就为您提供了二个消除此难题的措施,假如你也遇到过类似的问题,不要紧一看。

在应用MySQL数据库时,一时会遇见MySQL函数无法创设的动静。上面就教您三个缓慢解决MySQL函数无法成立难题的主意,供你借鉴参谋。

出错音讯大约类似:

ERROR 1418 (HY000): 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)
ERROR 1418 (HY000): 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函数无法创立,是未开启功效:

  1. mysql> show variables like ‘%func%’;  
  2. +———————————+——-+  
  3. | Variable_name                   | Value |  
  4. +———————————+——-+  
  5. | log_bin_trust_function_creators | OFF   |  
  6. +———————————+——-+  
  7. 1 row in set (0.00 sec)  
  8.  
  9. mysql> set global log_bin_trust_function_creators=1;  
  10. Query OK, 0 rows affected (0.00 sec)  
  11.  
  12. mysql> show variables like ‘%func%’;  
  13. +———————————+——-+  
  14. | Variable_name                   | Value |  
  15. +———————————+——-+  
  16. | log_bin_trust_function_creators | ON    |  
  17. +———————————+——-+  
  18. 1 row in set (0.00 sec)mysql> 

==================

 

 

 

一、在MySQL中开创自定义函数报错新闻如下:

ERROR 1418 (HY000): 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>set global log_bin_trust_function_creators=1;

 

源文档 <;

 

 

2、创建function时

出错音信:

ERROR 1418 (HY000): 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)

 

原因:

那是大家展开了bin-log, 大家就亟须钦赐我们的函数是不是是

壹 DETE瑞鹰MINISTIC 不分明的

贰 NO SQL 未有SQl语句,当然也不会修改数据

3 READS SQL DATA 只是读取数据,当然也不会修改数据

四 MODIFIES SQL DATA 要修改数据

5 CONTAINS SQL 包含了SQL语句

 

在那之中在function里面,惟有 DETEQashqaiMINISTIC, NO SQL 和 READS SQL DATA
被协理。要是大家张开了 bin-log, 大家就必须为大家的function钦点1个参数。

 

在MySQL中开创函数时出现这种破绽百出的缓慢解决格局:

set global log_bin_trust_function_creators=TRUE;

 

源文档 <;

 

3、

向MySQL导入数据的时候出错

阴差阳错消息:

ERROR 1418 (HY000): 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)

 

原因:

永利皇宫登录网址 ,那是大家张开了bin-log, 我们就务须钦定大家的函数是还是不是是 

1 DETE中华VMINISTIC 不显著的 

2 NO SQL 未有SQl语句,当然也不会修改数据 

叁 READS SQL DATA 只是读取数据,当然也不会修改数据 

四 MODIFIES SQL DATA 要修改数据 

5 CONTAINS SQL 包含了SQL语句 

 

内部在function里面,唯有 DETE凯雷德MINISTIC, NO SQL 和 READS SQL
DATA 被扶助。 倘若大家展开了 bin-log, 大家就非得为大家的function钦命二个参数。 

杀鸡取蛋措施:

SQL code

mysql> show variables like ‘%func%’;

+———————————+——-+

| Variable_name                   | Value |

+———————————+——-+

| log_bin_trust_function_creators | OFF   |

+———————————+——-+

1 row in set (0.00 sec)

 

mysql> set global log_bin_trust_function_creators=1;

Query OK, 0 rows affected (0.00 sec)

 

mysql> show variables like ‘%func%’;

+———————————+——-+

| Variable_name                   | Value |

+———————————+——-+

| log_bin_trust_function_creators | ON    |

+———————————+——-+

1 row in set (0.00 sec)

 

源文档 <;

 

4、

前几日要写三个函数.但未有办法建提醒错误如下:

ERROR 1418 (HY000): 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)

缓和情势:(编缉my.cnf,增多如下)

[mysqld]

log_bin_trust_routine_creators = 1

重启mysql就好了

humen1 Tech

 

源文档 <;

MySQL函数不可能成立,是贰个很劳碌的难题,上边就为你提供了一个化解此主题素材的格局,如若…

网站地图xml地图