This page provides instructions for configuring Confluence to use the MySQL database.

ステップ 1. 前提条件を確認する

始める前に、以下の内容を確認します:

ステップ 2. MySQL サーバーをインストールする

If you do not already have an operational MySQL database server, install 'MySQL Community Edition'. Download the installation package from the MySQL download page and follow the instructions in the MySQL documentation.

On this page:

関連ページ

ステップ 3. MySQL サーバーを設定する

このステップでは、お使いの MySQL データベースサーバーを設定します。

注意:Confluence を既存の MySQL データベースサーバーに接続する場合、以下の説明に従って MySQL インストールウィザードで設定ステップを実行し、このデータベースサーバーを再設定することを強くお勧めします

MySQL サーバーを設定するには:

  1. MySQL インストレーションウィザードを実行します:
    1. Confluence を既存の MySQL サーバーに接続している場合、インスタンス再設定を選択します。
    2. 高度な設定 (Advanced Configuration) を選択します。
    3. Choose the type of MySQL Server that best suits your hardware requirements. This will affect the MySQL Server's usage of memory, disk and CPU resources. Refer to the MySQL documentation for further information.
    4. トランザクション データベースのみを選択して、お使いの MySQL データベースがそのデフォルト ストレージ エンジンとして InnoDB を利用する事を保証します。
      Confluence とは、InnoDB ストレージエンジンのみを利用する事を強くお勧めします。MyISAM ストレージ エンジンを利用するとデータ破損を引き起こす可能性があるため、その利用は控えて下さい。
    5. 要件に InnoDB テーブルスペース設定を行います (デフォルト設定でも可能です)。
    6. Set the approximate number of concurrent connections permitted to suit your Confluence usage requirements. You can use one of the presets or enter a number manually. Refer to the MySQL documentation for further information.
    7. For the networking options, ensure the Enable TCP/IP Networking and Enable Strict Mode options are selected (default). Refer to the MySQL documentation on setting the networking and server SQL modes for further information.
    8. For the MySQL server's default character set, choose Best Support For Multilingualism (in other words, UTF-8). This will ensure Confluence's support for internationalisation. For more information, see Configuring Database Character Encoding.
    9. For the Windows configuration option, choose whether or not to install the MySQL Server as a Windows service. If your hardware is going to be used as a dedicated MySQL Server, you may wish to choose the options to Install As Windows Service (and Launch the MySQL Server automatically). Refer to the MySQL documentation for further information.
      Note: If you choose not to install the MySQL Server as a Windows Service, you will need to ensure that the database service has been started before running Confluence.
    10. セキュリティ設定を修正するを選択して、MySQL サーバー (ルート) アクセスパスワードの入力と設定を行います。
  2. Edit the my.cnf file (often named my.ini on Windows operating systems) in your MySQL server. Locate the [mysqld]section in the file, and add or modify the following parameters:
  3. 変更内容を有効にするには、MySQL サーバーを再起動します:

ステップ 4. MySQL データベースおよびユーザーのセットアップ

このステップでは、お使いの Confluence データを保持するデータベースを MySQL 内に作成し、そのデータベースにアクセスする権限のあるデータユーザーを作成します。

データベースおよびユーザー権限を作成するには:

  1. mysql コマンドを MySQL のスーパー ユーザーとして実行します。既定ユーザーは "root" でパスワードはブランクです。
  2. 次のコマンドを実行して、空の Confluence データベースのスキーマを作成します:

    CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin;
  3. 次のコマンドを実行して、Confluence データベースユーザーを作成します。'confluenceuser' と 'confluencepass' を、お好きなユーザー名とパスワードに置き替えます。 お使いの MySQL データベースサーバーと同じサーバー上で Confluence が実行されていない場合、'localhost' を Confluence サーバーのホスト名もしくは IP アドレスと置き替えます:

    GRANT ALL PRIVILEGES ON confluence.*TO 'confluenceuser'@'localhost' IDENTIFIED BY 'confluencepass';

ステップ 5. Confluence をインストールする

Install Confluence if you have not done so already. See the Confluence Installation Guide. Stop immediately after the installation, before opening the Confluence Setup Wizard in your browser, and follow the steps below.

既に Confluence セットアップウィザードの途中まで進んだ場合、データベースセットアップのステップで止めて、以下のステップに従います。後で、同じ所から再びセットアップウィザードを再開できます。

ステップ 6. MySQL データベースドライバーのダウンロードおよびインストール

Confluence を新しいバージョンにアップグレードする際に、既に推奨 MySQL ドライバー (JDBC Connector/J 5.1) を利用しているのであれば、このセクションの内容を飛ばして結構です。Confluence アップグレードタスクは、アップグレードされたインストレーションにあなたの既存のドライバーを自動的にコピーしてくれます。

Confluence をインストールしているか、あるいは Confluence をアップグレードしていて推奨 MySQL ドライバー (JDBC Connector/J 5.1)を利用していないのであれば、以下のステップに従います。

お使いの環境に合わせて、MySQL への JDBC直接接続あるいはデータソースへの接続 のどちらをセットアップするか選択します。不明であれば、JDBC への直接接続を選択します。

JDBC への直接接続をセットアップするには:

MySQL に対する JDBC の直接接続をセットアップする予定であれば、MySQL JDBC ドライバーをお使いの Confluence インストレーションにコピーする必要があります。

  1. MySQL ドライバーを取得します:
  2. Copy the driver JAR file to the  <Confluence installation> /confluence/WEB-INF/lib folder in your new or upgraded Confluence installation.

データソース接続をセットアップするには:

If you plan to set up a datasource connection to MySQL, follow the steps described in Configuring a MySQL Datasource in Apache Tomcat.

ステップ 7. 国際化の設定を確認する

If you are using a existing database, use the status command to verify database character encoding information. The results should be UTF-8. See Configuring Database Character Encoding.

ステップ 8. Confluence セットアップウィザードにおいてデータベース接続をセットアップする

Confluence を起動して、お使いのブラウザの Confluence セットアップウィザードに行きます。ステップに従い、新しい設定をセットアップします:

  1. Follow the initial steps in the Confluence Setup Guide.
  2. 評価用インストールもしくは本番環境用インストールの選択を求められたときは、本番環境を選択します。
  3. 組み込みデータベースまたは外部データベースを選択するようにプロンプトが出されたら、ドロップダウンリストから MySQL を選択して、外部データベースを選択します。
    (注意:ドライバーが必要ですという警告が表示されます。ドライバーはステップ 6 でダウンロード済みまたはコピー済みなので、この警告は無視できます。 
  4. 先ほど MySQL データベースドライバーをセットアップした際の選択と合うように、JDBC 直接接続もしくはデータソース接続を選択します。

おめでとうございます!Confluence は、そのデータ保管に MySQL データベースを利用するようになりました。

トラブルシューティング