当前位置: 58彩票app下载 > 计算机网络 > 正文

MySQL函数不能创建的解决方法,创建函数ERROR

时间:2019-12-05 16:26来源:计算机网络
mysql 成立函数ETucsonRO昂Cora 1418 (HY000卡塔尔(英语:State of Qatar): 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

mysql 成立函数ETucsonRO昂Cora 1418 (HY000卡塔尔(英语:State of Qatar): 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>

那般就哦了

创造函数ERubiconRORubicon 1418 (HY000卡塔尔(英语:State of Qatar): 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 t...

在动用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> 

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

 

 

 

1、在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, 大家就必需钦定大家的函数是不是是

1 DETERMINISTIC 不分明的

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

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

4 MODIFIES SQL DATA 要修改数据

5 CONTAINS SQL 包含了SQL语句

 

其间在function里面,只有 DETERMINISTIC, NO SQL 和 READS SQL DATA 被帮忙。假诺我们张开了 bin-log, 我们就亟须为大家的function钦点贰个参数。

 

在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 DETERMINISTIC 不明确的 

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

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

4 MODIFIES SQL DATA 要纠正数据 

5 CONTAINS SQL 包含了SQL语句 

 

内部在function里面,只有 DETERMINISTIC, 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,增添如下卡塔尔(英语:State of Qatar)

[mysqld]

log_bin_trust_routine_creators = 1

重启mysql就好了

humen1 Tech

编辑:计算机网络 本文来源:MySQL函数不能创建的解决方法,创建函数ERROR

关键词: