I'm trying to move our Confluence database to another server. I've found a few pages with instructions, but most are directing me to edit XML files that do not exist in my installation. We're on 4.3.3. I'm not changing anything about the setup except the server that the database is on (moving from a remote server to the server that runs Confluence). Help is appreciated!
Hi Karen,
There are two possible files that can store database connection parameters in Confluence, the default one is the confluence.cfg.xml, which is located into your Confluence home directory. This is how it looks like:
<?xml version="1.0" encoding="UTF-8"?> <confluence-configuration> <setupStep>complete</setupStep> <setupType>custom</setupType> <buildNumber>3393</buildNumber> <properties> <property name="admin.ui.allow.daily.backup.custom.location">false</property> <property name="admin.ui.allow.manual.backup.download">false</property> <property name="admin.ui.allow.site.support.email">false</property> <property name="attachments.dir">${confluenceHome}/attachments</property> <property name="confluence.license.hash">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</property> <property name="confluence.license.message">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</property> <property name="confluence.setup.server.id">B3WL-TF3W-IY98-YDPI</property> <property name="confluence.webapp.context.path"></property> <property name="hibernate.c3p0.acquire_increment">1</property> <property name="hibernate.c3p0.idle_test_period">100</property> <property name="hibernate.c3p0.max_size">30</property> <property name="hibernate.c3p0.max_statements">0</property> <property name="hibernate.c3p0.min_size">0</property> <property name="hibernate.c3p0.timeout">30</property> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.isolation">2</property> <property name="hibernate.connection.password">confluence</property> <property name="hibernate.connection.url">jdbc:mysql://localhost/confluence?sessionVariables=storage_engine%3DInnoDB</property> <property name="hibernate.connection.username">confluence</property> <property name="hibernate.database.lower_non_ascii_supported">true</property> <property name="hibernate.dialect">com.atlassian.hibernate.dialect.MySQLDialect</property> <property name="hibernate.setup">true</property> <property name="lucene.index.dir">${confluenceHome}/index</property> <property name="webwork.multipart.saveDir">${confluenceHome}/temp</property> </properties> </confluence-configuration>
The other possible file is the server.xml, which is located into your Confluence install directory, within the sub folder called conf. The server.xml file contain a lot of other settings, but the lines related to the database connection would look like this:
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="20" name="jdbc/ConfluenceDS" password="confluence" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/confluence?useUnicode=true&amp;characterEncoding=UTF8" username="confluence" validationQuery="select 1"/>
I hope this information has helped.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.