haxqer / confluence

The simplest docker file of Confluence. Support v8.9.6(latest) v9.0.3(latest) and v8.5.15(lts)
422 stars 221 forks source link

设置数据库报错 #9

Closed liruinan closed 1 year ago

liruinan commented 1 year ago

大神你好, 我用分支master或者v8都试过好几遍, 在设置数据库的时候总是报错, 如下图:

设置数据库失败 发生如下错误:

配置数据库失败 StatementCallback; uncategorized SQLException for SQL [CREATE TRIGGER denormalised_space_trigger_on_update AFTER UPDATE ON SPACES FOR EACH ROW sp: BEGIN DECLARE isServiceDisabled BOOL DEFAULT TRUE; CALL space_procedure_for_denormalised_permissions(isServiceDisabled); IF (isServiceDisabled) THEN LEAVE sp; END IF; IF (NEW.LOWERSPACEKEY = OLD.LOWERSPACEKEY) THEN LEAVE sp; END IF; INSERT INTO DENORMALISED_SPACE_CHANGE_LOG(SPACE_ID) VALUES (NEW.SPACEID); END;]; SQL state [HY000]; 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); nested exception is java.sql.SQLException: 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) 数据库设置失败。请重试一次,或者回到数据库选择页面:

liruinan commented 1 year ago

在mysql的command中增加了参数:'--log_bin_trust_function_creators=1' ,正常了

haxqer commented 1 year ago

https://github.com/haxqer/confluence/blob/master/docker-compose.yml#L30 这一行加 '--log_bin_trust_function_creators=1' ,是吗? 很赞,方便的话,可以提个 PR?

另外 mysql 用 root 应该是没有这个问题的。 可以放心的用 root 用户,mysql 端口没有对外开放,只有 confluence-service 能访问