Confluence change database port

I need a secondary mysql database with an older version to run with the standard port (3306).

This means that I need to move the main mysql server from port 3306 to a different one (3307).

Confluence runs on this server. Thus I need to tell confluence to connect to the mysql server on 3307.

Nothing changes, databases don't even move. Only the port of the server changes.


How can i configure this in confluence?


Beste regards,


3 answers

1 accepted

1 vote
Accepted answer

Hi Sven,

To change the Confluence database listening ports, you can simply edit the Confluence.cfg.xml file located in confluence_home directory and add the port right after the database connection URL.

This should do the trick.



Perfect! Worked like a charm! For furture reference, this has to be changed: <property name="hibernate.connection.url">jdbc:mysql://localhost/confluence?sessionVariables=storage_engine%3DInnoDB</property> Simply put ":yourPortNumber" behind the "localhost": <property name="hibernate.connection.url">jdbc:mysql://localhost:<yourPortNumber>/confluence?sessionVariables=storage_engine%3DInnoDB</property> Thank you very much sir!

You are welcome Sven :) Glad I could help

Forgot to mention that I have already found this article: But @Nic Brough [Adaptavist] did not mention the details of "Work[ing] out the new connection settings".

0 votes

Yes, I was assuming that the poster knew how to work out a connection string. Anyway, Rodrigo beat me to the answer (and you usually find the string in the .cfg file will contain :3306 in it, which you just change to 3307)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

102 views 1 14
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you