Convert from MySQL MyISAM to InnoDB Storage Engine
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
At one point in time, you may have accidentally set up your databases using the MyISAM storage engine. Although MyISAM is fast, it lacks transactions and foreign key constraints, thus increasing the likelihood of database-based corruption.
To change to InnoDB
Backup everything, and make a copy without create table information
mysqldump -uroot dbname> dbbackup.sql mysqldump -uroot dbname --no-create-info > db_no_create.sql
- Download a fresh copy of the same version of Confluence
- Create a new database (create database foo)
Set up Confluence against foo, taking care to ensure that you've got the engine and all other settings set correctly
With the introduction of Active Objects, some tables are not populated immediately upon creating a Confluence instance. Active Objects database tables are generated lazily, meaning they won't be created until a feature that requires them is made. For example, the
AO187CCC_SIDEBAR_LINK
table won't be created until a space is made. Some Active Object tables are also created by plugins (such as Team Calendars for Confluence), and these will need to be installed to generate the necessary tables in the new database.- Once you're done with setup, shutdown Confluence
Make a backup, without data
mysqldump -uroot foo --no-data> db_ddl.sql
Make a 3rd database, restore the db_ddl.sql, then the db_no_create_.sql
mysql -uroot newdb < db_ddl.sql mysql -uroot newdb < db_no_create.sql
Edit
confluence_home/confluence.cfg.xml
, change thehibernate.connection.url
to reference your new database. Ensure that your the connection string is of the following form:mysql://DBHOST/DBNAME?autoReconnect=true&characterEncoding=utf8&useUnicode=true&sessionVariables=storage_engine=InnoDB