I want to update MYSQL Variable on Google cloud server

124 views
Skip to first unread message

Ghazanfar Abbas

unread,
Mar 1, 2018, 9:08:00 AM3/1/18
to Google Cloud SQL discuss
here is my error 


[Err] 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)

and here is my code


DROP FUNCTION IF EXISTS `SPLIT_STR`;
DELIMITER ;;
CREATE FUNCTION `SPLIT_STR`(x longtext,
  delim VARCHAR(12),
  pos INT) RETURNS varchar(255) CHARSET utf8
RETURN REPLACE(SUBSTRING(SUBSTRING_INDEX(x, delim, pos),
       LENGTH(SUBSTRING_INDEX(x, delim, pos -1)) + 1),
       delim, '')
;;
DELIMITER ;

Fady (Google Cloud Platform)

unread,
Mar 1, 2018, 3:12:30 PM3/1/18
to Google Cloud SQL discuss

Hello Ghazanfar,


Per this document, “if you need to work with triggers or stored functions, make sure your instance has the log_bin_trust_function_creators flag set to on.”. You may configure flags (set it to on) by following this guide.


For further help with your query code (or syntax), you may post your question at stackoverflow.com with the proper mysql flags where you have access to a large community of enthusiasts and experts to share ideas with and get support from. I found a similar question at this link. I hope this helps.


Reply all
Reply to author
Forward
0 new messages