Change the default DB from H2 to Mysql

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Change the default DB from H2 to Mysql

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
Highlighted
Senior Member

Re: Change the default DB from H2 to Mysql

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