Hi,
I want to use mySQL database instead of H2 database…
Is there any step by step document/post available to do so???
Please share the details.
Thanks,
Tushar
Hi,
I want to use mySQL database instead of H2 database…
Is there any step by step document/post available to do so???
Please share the details.
Thanks,
Tushar
You can find information’s about configure the JDBC connections in the Camunda installation Guide.
For Example for Tomcat (you have to simply edit the driverClassName
, url
and the credentials).
To configure a JDBC Resource you have to edit the file
$TOMCAT_HOME/conf/server.xml. This could look like the following
example for an H2 database:
<Server>
...
<GlobalNamingResources>
...
<Resource name="jdbc/ProcessEngine"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
uniqueResourceName="process-engine"
driverClassName="org.h2.Driver"
url="jdbc:h2:./camunda-h2-dbs/process-engine;MVCC=TRUE;TRACE_LEVEL_FILE=0"
username="sa"
password=""
maxActive="20"
minIdle="5" />
</GlobalNamingResources>
</Server>
For JBoss or Wildfly you have to edit the standalone/configuration/standalone.xml
:
Add a datasource and driver tag, which could like the following, to the datasources.
<datasource jta="true" enabled="true" use-java-context="true" use-ccm="true"
jndi-name="java:jboss/datasources/ProcessEngine"
pool-name="ProcessEngine">
<connection-url>jdbc:sqlserver://SERVER_NAME:SERVER_PORT;databaseName=DB_NAME</connection-url>
<driver>sqlserver2008</driver>
<security>
<user-name>USERNAME</user-name>
<password>PASSWORD</password>
</security>
<pool>
<min-pool-size>5</min-pool-size>
<max-pool-size>50</max-pool-size>
<prefill>false</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"></valid-connection-checker>
</validation>
</datasource>
<drivers>
<driver name="sqlserver2008" module="com.microsoft">
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
</driver>
</drivers>
Greets,
Chris
Other than doing changes in the “server.xml” file…is there anything else we need to do?..like schema’s and ol !!!
Thanks,
Tushar
Hi,
OK I assume you are working with Tomcat.
In the Camunda Manual Setup Guide for Tomcat
you can find all necessary information’s to setup your system with a different data source.
Please follow this guide to setup your database (including creation of the database schema and necessary tables).
Greets,
Chris
Hi ,
I was able to successfully configure and create tables in the MySQL DB Container from my local camunda 7.5.0 by editing the server.xml file
But when I am doing the same server.xml file changes in “Camunda-BPM Container”(Docker) I am not able to create tables in the MySQL DB Container.
Note: In Camunda Container I am not able to locate the 3 SQL files for create, drop and upgrade. Is this the issue?
If Yes , how to resolve this?
Thanks,
Tushar