Tuesday, April 23

How to set up confluence with MySQL database. Part 2

Part 2 of 2

If you haven’t found part 1, you can access it from here.

In part 1 we installed MySQL, created a confluence database and user, and granted all the required permission to the user. Installed open JDK and configure or set up JAVA_HOME.
Downloaded the Confluence file, created the required directory, extracted the Confluence file, and moved to the created directory.

In this part, we will configure confluence and connect or set up with MySQL database.

In this step, we will configure the confluence home directory by editing the confluence.init.properties file. which is located in the /opt/confluence/confluence/WEB-INF/classes/ directory

root@conf:~# nano /opt/confluence/confluence/WEB-INF/classes/confluence-init.properties


uncomment the confluence.home section under the # Note for Unix Users # section and define the home directory, in this post the directory is /opt/confluence-home.

in this step, we need to download one .jar file which is MySQL connector, and move or copy it to the /opt/confluence/confluence/WEB-INF/lib directory. You can download the MySQL connection from the link below.
Extract the zip file using unzip command. If you have unable to use unzip command please install the unzip package. You will find the mysql-connector-java-x.x.x.jar file. move or copy this file to the directory.

root@conf:~# mv mysql-connector-java-8.0.13.jar /opt/confluence/confluence/WEB-INF/lib/


Let’s, start the confluence service.

root@conf:~# /opt/confluence/bin/start-confluence.sh

To run Confluence in the foreground, start the server with start-confluence.sh -fg
executing as current user

If you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide
Server startup logs are located in /opt/confluence/logs/catalina.out
Using Java: /usr/lib/jvm/java-8-openjdk-amd64/bin/java
2022-11-30 09:23:22,532 INFO [main] [atlassian.confluence.bootstrap.SynchronyProxyWatchdog] A Context element for ${confluence.context.path}/synchrony-proxy is found in /opt/confluence/conf/server.xml. No further action is required
Using CATALINA_BASE: /opt/confluence
Using CATALINA_HOME: /opt/confluence
Using CATALINA_TMPDIR: /opt/confluence/temp
Using JRE_HOME: /usr/lib/jvm/java-8-openjdk-amd64
Using CLASSPATH: /opt/confluence/bin/bootstrap.jar:/opt/confluence/bin/tomcat-juli.jar
Using CATALINA_OPTS: -Datlassian.plugins.startup.options=” -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Dconfluence.context.path= -Djava.locale.providers=JRE,SPI,CLDR -Dsynchrony.enable.xhr.fallback=true -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -Xloggc:/opt/confluence/logs/gc-2022-11-30_09-23-22.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -Xlog:gc+age=debug:file=/opt/confluence/logs/gc-2022-11-30_09-23-22.log::filecount=5,filesize=2M -XX:G1ReservePercent=20 -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDateStamps -XX:+IgnoreUnrecognizedVMOptions -XX:ReservedCodeCacheSize=256m -Xms1024m -Xmx1024m
Using CATALINA_PID: /opt/confluence/work/catalina.pid
Tomcat started.

Tomcat is started, let’s browse the confluence. http://hostname or IP:8090. Make sure that port 8090 for confluence and corresponding ports are open from the firewall.

Confluence Startup page

I am continuing with the trial.

Confluence MySQL database setup

Choose the database type. In this case, the database type is MySQL. specified the hostname, port, database name, and user credentials that we already created and click on next. It will take several minutes to configure the database.
Meanwhile, we can check whether the tables are created or not.

Confluence MySQL database creation

The database was configured successfully. I will continue with the Empty Site.

Confluence databases configure

If you have Jira in your organization, you can connect to Jira for the user source. But I will continue with confluence.

Confluence manage users and groups.
Confluence System administration account

Confluence configuration with MySQL database in the Linux environment is successful.
Have a good day.

Confluence Setup Successful
Confluence first space

Leave a Reply

Your email address will not be published. Required fields are marked *