본문 바로가기
Big Data/RDBMS

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) 에러 해결.

by 신군. 2022. 4. 9.
반응형

MySQL 에서 함수를 만들려고 하는데

CREATE FUNCTION 문을 선언하니

 

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

 

이런 에러가 뜨면서 함수가 생성되지 않았습니다.

 

구글링을 하니 간단하게 해결 방법이 있었습니다.

 

http://www.mysqlkorea.com/gnuboard4/bbs/board.php?bo_table=community_03&wr_id=1965

 

이곳을 참조했구요

 

어떤 설정인지는 정확히 알 수 없지만

 

SET GLOBAL log_bin_trust_function_creators = 1;

 

이런 SQL 쿼리를 한번 날려준 뒤

 

동일한 함수생성문을 선언했더니 에러가 나지 않았습니다.

 

혹시 이 방법이 안되신다면 저 커뮤니티를 참조하셔서 다른방법으로 해결해 보시기 바랍니다.

반응형