Confluence MySQL データベースの移行が原因で「content_procedure_for_denormalised_permissions は存在しません」エラーが発生する
プラットフォームについて: サーバーと Data Center のみ。この記事は、サーバーおよび Data Center プラットフォームのアトラシアン製品にのみ適用されます。
要約
After migrating the Confluence MySQL database to a different server with mysqldump
command, Confluence was unable to start up or you are unable to edit/update any pages.
環境
- 7.11.0 and onward
- MySQL データベース
診断
The below error message appears in atlassian-confluence.log:
ERROR [http-nio-8090-exec-3] [engine.jdbc.spi.SqlExceptionHelper] logExceptions PROCEDURE confluence.content_procedure_for_denormalised_permissions does not exist
No results when reviewing with the below SQL:
SHOW PROCEDURE STATUS WHERE DB = '<target_DB_name>';
原因
Since Confluence 7.11.0, we have introduced the content denormalised function. This is a new feature for faster permissions service to improve page load times.
mysqldump
will backup by default all the triggers but NOT the stored procedures/functions which will cause those errors.
ソリューション
- Shutdown the source Confluence
Re-generate the Confluence MySQL database dump with --routines parameter:
mysqldump commandmysqldump -p conf7111 --routines > conf71112.sql # OR mysqldump -p conf7111 -R > conf71112.sql
https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html#option_mysqldump_routines
- Shutdown the target Confluence
- Drop off the existing target database
- Recreate and import the database dump
- Startup target Confluence