오랫만에 Confluence 를 설치할 일이 생겨서 MySQL 을 DBMS 로 선택하고 설치중에 다음과 같은 오류가 발생했습니다.

mysql error code [1419]; You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable);
CODE


원인

Confluence 설치중에 trigger 와 function 생성을 실패해서 발생했는데 Database 생성시에 모든 권한을 지정했었고 이 안에는 CREATE ROUTINE ALTER ROUTINE 권한도 포함되어 있습니다.

GRANT ALL PRIVILEGES ON confluence.* TO 'confluence'@'localhost';
SQL


구글링을 해보니 MySQL 은  log_bin_trust_function_creators 라는 전역 변수가 있고 이게 Off 일 경우 CREATE ROUTINE 권한이 있어도 trigger 나 procedure 생성을 할 수 없다고 합니다.

show variables like '%log_bin_tr%';

+---------------------------------+-------+
| Variable_name                   | Value |
+---------------------------------+-------+
| log_bin_trust_function_creators | OFF    |
+---------------------------------+-------+
CODE


처리

MySQL root 로 로그인 한 후에 log_bin_trust_function_creators 전역 변수를 1 로 설정해 주면 됩니다. 

set global log_bin_trust_function_creators=1;
CODE


Ref