mysql 出现的错误

1:创建函数时提示:This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA ,因为当开启log-bin时,函数必须有参数,如果不想有参数,可以

set global log_bin_trust_function_creators=TRUE;  进行设置。  https://blog.csdn.net/topasstem8/article/details/8216740/
mysql> CREATE FUNCTION simpleFun()RETURNS VARCHAR(20) RETURN "Hello World!"; 
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> set global log_bin_trust_function_creators=TRUE; 
Query OK, 0 rows affected

mysql> CREATE FUNCTION simpleFun()RETURNS VARCHAR(20) RETURN "Hello World!"; 
Query OK, 0 rows affected

 

posted @ 2018-08-19 09:44  1367356  阅读(114)  评论(0编辑  收藏  举报