Abhi
Abhi

Reputation: 334

How to configure a mysql database in activiti?

I am new to activiti and just started to explore what it has to offer. I am trying to configure activiti to use the mysql database that i have installed on my machine. I tried to follow this tutorial but have some confusions here.

I downloaded activiti from this link: http://activiti.org/download.html

The current version of activiti is 5.17

While following this tutorial at step 01 I can't find the folder "setup" in the zip that i downloaded. Nor can i find the file build.db.properties. {activiti-home}/setup/build.db.properties

After having war file deployed to tomact though, i did have this file {activiti-home}/WEB-INF/db.properties. Is modifying this file sufficient to change the database to mysql instead of the default in-memory h2 database?

Any help on this will be much appreciated.

Upvotes: 4

Views: 6893

Answers (1)

Ben
Ben

Reputation: 1599

Yes, exactly. You simply have to alter the db.properties file under {activiti-home}/WEB-INF/db.properties for example like this:

db=mysql
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/activiti?autoReconnect=true
jdbc.username=activiti
jdbc.password=activiti

In addition, you must copy a MySQL driver in TomcatHome/webapps/activiti-explorer/WEB-INF/lib

For example this one here: http://mvnrepository.com/artifact/mysql/mysql-connector-java/5.1.27

Upvotes: 6

Related Questions