Pages

Thursday, 19 January 2017

Installing OpenIDM with a MySQL Database

I mentioned some time ago in the OpenIDM beginner series that although the built in OrientDB is more than sufficient for development purposes as soon as you start getting serious you will want to install a proper database backend.

This is a quick blog to talk you through how to install OpenIDM on a database. In my case I am going to use MySQL ( MariaDB specifically ), steps for installing other databases are broadly similar.

Prerequisites

For this exercise please:

Ensure there is a Java Development Kit (JDK) installed, and your environment path is set appropriately.

These scripts set up the Activiti BPMN workflow engine in the openidm database instance we just created.

5. Now lets remove the original repo.orientdb.json file. Don't forget to do this step! I'd also suggest making a backup:

cd /usr/local/env/demo/openidm/conf

mkdir backup

mv repo.orientdb.json backup

6. Next we need to copy over the database specific configuration files:

cd /usr/local/env/demo/openidm

cp db/mysql/conf/repo.jdbc.json conf

cp db/mysql/conf/datasource.jdbc-default.json conf

Again, let's take a quick look at these files , repo.jdbc.json:

You'll notice that what we have is an SQL version of the repo file we looked at earlier, ready to execute queries against a MySQL like database. There is also one other notable difference:

The original repo did not have this line. Well, this line is used to specify the datasource to be used i.e. our MySQL database, and it refers to the second file we copied over datasource.jdbc-default.json: