블로그 이미지
Rootrator
1개를 알면 모르는 10개가 튀어나온다..!

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Notice

2016. 2. 19. 15:50 Linux

OS : CentOS 6.7 32bit

Mysql 5.1.63


mysql function 생성시 아래와 같은 에러 발생

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 에서 아래와 같이 확인해 보면 값이 Off로 설정이 되어있다.

mysql> show global variables like 'log_bin_trust_function_creators';

+---------------------------------+-------+

| Variable_name                       | Value |

+---------------------------------+-------+

| log_bin_trust_function_creators     | OFF  |

+---------------------------------+-------+

1 row in set (0.00 sec)


mysql>SET GLOBAL log_bin_trust_function_creators = 1; 

 

쿼리를 실행시켜주거나 my.cnf 설정 시키거나 실행시에 추가하여 서비스를 올리면 된다.



기존의 서버에서 dump로 function을 가져올땐 --routines 

trigger를 가져올땐 --trigger 옵션으로 포함시킬수 있다.





반응형
posted by Rootrator