Install/Upgrade of Confluence fails with MySQL error 'You do not have the SUPER privilege and binary logging is enabled'
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
An install or upgrade of Confluence Data Center version 7.11 or newer fails due to a MySQL 5.7/8.x configuration error.
Error log detail
2021-02-06 20:58:24,363 ERROR [Catalina-utility-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.DenormalisedSpacePermissionsUpgradeTask@c8e620 failed during the SCHEMA_UPGRADE phase due to: 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;You do not have the SUPER privilege and binary logging is enabled
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)
com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.DenormalisedSpacePermissionsUpgradeTask@c8e620 failed during the SCHEMA_UPGRADE phase due to: 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)
ソリューション
The Confluence database user is not allowed to create and alter stored functions, because the parameter log_bin_trust_function_creators = 1
is missing from the [mysqld] section of the my.cnf file, as described in Database Setup For MySQL documentation. To prevent this error, add the parameter.
セルフホスト型の MySQL
インストール/アップグレードを正常に完了させるには、my.cnf ファイルの [mysqld] セクションで次のパラメーターを指定する必要があります。当社のドキュメント「MySQL のデータベース セットアップ」にあるように、次の手順を実行します。
- Confluence を停止します。
- MySQL データベースを停止します。
my.cnf ファイルの [mysqld] で次のパラメーターを指定します。
log_bin_trust_function_creators = 1
- Start the MySQL database
- Confluence を起動します。
AWS 上の MySQL
- For a MySQL instance running in AWS RDS, we will need to make the above parameter change in a parameter group.
- 値を 1 に更新し、関連するデータベースにパラメーター グループを関連付けます。
Azure 上の MySQL
- For a MySQL instance running in Azure, we will need to make the above parameter change in Server parameters.
- Update the value to ON then save the change.
環境
- Confluence Data Center 7.11+
- MySQL 5.7 / MySQL 8