Confluence MySQL database migration causes content_procedure_for_denormalised_permissions does not exist error

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Summary

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.

Environment

  • 7.11.0 and onward
  • MySQL database

Diagnosis

The below error message appears in atlassian-confluence.log:

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:

MySQL
SHOW PROCEDURE STATUS WHERE DB = '<target_DB_name>';

Cause

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.

Solution

  1. Shutdown the source Confluence
  2. Re-generate the Confluence MySQL database dump with --routines parameter: 

    mysqldump command
    mysqldump -p conf7111 --routines > conf71112.sql
    # OR
    mysqldump -p conf7111 -R > conf71112.sql
    (info) https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html#option_mysqldump_routines
  3. Shutdown the target Confluence
  4. Drop off the existing target database
  5. Recreate and import the database dump
  6. Startup target Confluence

Last modified on Jul 12, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.