cancel
Showing results for 
Search instead for 
Did you mean: 

Change the default DB from H2 to Mysql

bsong
Champ in-the-making
Champ in-the-making

Initially, I started to using Activiti-app I was using the default DB h2. Right now I want to change the database to Mysql. 

I did the following configuration in the  activiti-app.properties

datasource.driver=com.mysql.jdbc.Driver
datasource.url=jdbc:mysql://localhost:8889/activiti?characterEncoding=UTF-8
datasource.username=admin
datasource.password=admin

hibernate.dialect=org.hibernate.dialect.MySQLDialect

but after the change, I restart the activiti-app there is no table created in activiti database and activiti still point to the H2 database. 

And how can I move the data from H2 to Mysql?

Thanks 

1 REPLY 1

salaboy
Star Collaborator
Star Collaborator

Can you please specify which version of activiti are you using? 

hibernate.dialect=org.hibernate.dialect.MySQLDialect -> we are not using hibernate as far as I remember, so you will probably need to set up a flag to specify that the tables should be created if they don't exist.

Also check this if you are in 5.x versions: How to configure a mysql database in activiti? - Stack Overflow