Confluence 3.5 has reached end of life
Check out the [latest version] of the documentation
This page provides instructions for installing Confluence and the open-source MySQL database on Microsoft Windows, as well as how to set up and configure MySQL to work with Confluence. Additional instructions are also provided for migrating across any existing Confluence database content. Use this guide in conjunction with the more general Database Setup Guide for Any Database. These instructions add some important reference notes specific to MySQL.
Please note the following points:
- Throughout the instructions below, the
Confluence Installation Directoryrefers to the directory where you extracted the Confluence zipped installer. - The MySQL Database Setup procedure below will make modifications to your default MySQL Server settings. These modifications result in:
- The default collation (localisation) option being changed to
utf8_bin(that is, case-sensitive binary UTF8), such that by default, all new database tables will be created with this type of case-sensitive collation. - The default MySQL database storage engine being changed to 'InnoDB'.
- The default collation (localisation) option being changed to
On this page:
Install Confluence if you have not done so already. Ensure that you download Confluence Standalone, not the evaluation installer.
To install MySQL Server, MySQL JDBC Drivers bundled with Confluence To create the database and user privileges, For an existing database If you're using a existing database, confirm the Character Encoding by executing the query:
To set up your Confluence MySQL database connection or to switch to using this external database,1. Install Confluence
2. Install MySQL Server
The installation package can be downloaded from the MySQL download page or from the version 5.0 download page. Instructions for installing the MySQL 5.0 database server on Windows can found on the 'Installing MySQL on Windows' page of the MySQL web site.
If you intend to connect Confluence to an existing, operational MySQL database server instance, we strongly recommend that you reconfigure this database server instance by running through the Config Wizard and initially choosing the Reconfigure Instance option.
It is highly recommended that you only use the InnoDB storage engine with Confluence. Avoid using the MyISAM storage engine as this can lead to data corruption.
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.
mysql-connector-java-5.x.y-bin.jar where x.y depends on the driver version) in <confluence install>/WEB-INF/lib (for Confluence 2.10 onwards) or <confluence install>/common/lib (for earlier versions). Information and links to the appropriate database drivers are available on Database JDBC drivers.my.cnf file (often named my.ini on Windows operating systems). Locate the [mysqld] section in the file add/modify the following parameters:
[mysqld]
...
default-collation=utf8_bin
character-set-server=utf8
collation-server=utf8_bin
default-character-set=utf8
...
[mysqld]
...
default-storage-engine=INNODB
...
max_allowed_packet to be at least 32M:
[mysqld]
...
max_allowed_packet=32M
...
transaction-isolation to be READ-COMMITTED:
[mysqld]
...
transaction-isolation=READ-COMMITTED
...
my.cnf and my.ini.)
3. Set up your MySQL Database and User
CREATE DATABASE confluence;
GRANT ALL PRIVILEGES ON confluence.* TO 'confluenceuser'@'localhost' IDENTIFIED BY 'confluencepass';
To support international languages in Confluence, you should verify that the newly created database is using UTF-8 encoding and re-examine the JDBC URL settings (configured in Stage 3).
SHOW VARIABLES LIKE 'character%'; and SHOW VARIABLES LIKE 'collation%';.
The results should be UTF-8.(Optional) 4. Back Up Confluence Data
This stage is only required if you have existing Confluence content you wish to transfer.
To back up your Confluence data,
5. Set Up your Database Connection
Confluence Installation Directory_/confluence/WEB-INF/classes/confluence-init.properties and change the confluence.home property to point to a new directory. e.g. if you had
confluence.home=c:/confluencedata
confluence.home=c:/confluencedata_mysql
Confluence Home Directory. (The name doesn't have to end in _mysql – that's just an example)
confluenceuser in the User Name field, and the password you chose earlier in the Password fieldCould not successfully test your database: : Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user 'confluenceuser'@'localhost' (using password: YES)' verify that you have properly given the confluenceuser user all the right permissions when connecting from localhost.Troubleshooting
WEB-INF/lib folder or possibly have placed it in the wrong folder.
