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

数据库 MySQL
MySQL函数不能创建,是一个很麻烦的问题,下面就为您提供了一个解决此问题的方法,如果您也遇到过类似的问题,不妨一看。

在使用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查询超时的问题处理方法

MySQL重复记录的处理方法

mysql查询前几条记录的实现方法

MySQL用户权限设置方法

带您了解mysql变量

责任编辑:段燃 来源: 互联网
相关推荐

2010-07-21 15:14:59

不能telnet服务器

2010-09-28 13:53:59

sql text字段

2010-06-21 09:54:50

Linux Aplay

2010-10-13 17:22:12

MySQL查询乱码

2010-05-10 18:30:31

Oracle多表创建

2009-11-26 15:42:18

PHP函数mail()

2009-12-02 10:08:33

PHP mail()函

2011-05-16 09:54:22

mysql1067错误

2010-05-25 16:37:47

MySQL忘记密码

2012-07-27 16:46:17

Windows 7 操作系统

2010-09-16 15:36:26

SQL Server2

2010-10-14 13:55:58

MySQL创建函数

2010-10-15 11:22:24

MySQL复制表结构

2010-11-03 09:34:39

DB2临时表

2010-04-16 12:33:09

无线路由器不能上网

2010-10-19 15:45:32

SQL Server创

2010-07-15 14:01:12

telnet乱码

2013-04-23 16:48:55

GPT分区CentOS

2011-08-24 17:41:16

MySQL死锁

2011-07-05 09:44:31

QT Mysql 乱码
点赞
收藏

51CTO技术栈公众号