Instructions on setting up a MySQL DataSource connection for Confluence Standalone or EAR/WAR.

The Confluence database connection URL must have autoReconnect=true added to the end to prevent disconnection issues.

Shut down Tomcat

Install the Drivers

Configure Tomcat

The configuration is different for Conflence 2.2 onwards due to an upgrade to Tomcat 5.5

For users of Confluence 2.2 and later

For users of Confluence 2.1.x and earlier

Configure the Confluence web application

Configure Confluence

Restart Confluence

F.A.Q.

I see "Can't call commit when autocommit=true" during an upgrade of Confluence or otherwise.

Check out http://jira.atlassian.com/browse/CONF-1710 This error can be fixed by adding:
&relaxAutoCommit=true
to the end of your JDBC url.

Example:
jdbc:mysql://localhost/confdb?autoReconnect=true&relaxAutoCommit=true

This JDBC url can be found in your confluence.cfg.xml file located in your confluence home folder.