SQL/MySQL
mysql 초기 함수 생성 시 오류
lid8
2022. 8. 10. 17:45
ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled
mysql 설치 후 함수를 생성하려고 하면
위와 같은 오류가 뜹니다.
MySQL 버전이 업데이트 되면서
기본 옵션이 바뀌어서 생기는 오류라고하네요
이럴땐 우선 옵션을 확인해 줍니다.
show global variables like 'log_bin_trust_function_creators';
그리고 아래와같은 쿼리를 입력해주면
바로 해결완료입니다!
SET GLOBAL log_bin_trust_function_creators = 1; //ON
#SET GLOBAL log_bin_trust_function_creators = 0; //OFF