# Change h2 db to MYSQL in Flowable-Rest Example

**URL:** <https://forum.flowable.org/t/change-h2-db-to-mysql-in-flowable-rest-example/1215>\
**Category:** Flowable Engine\
**Created:** [November 16, 2017, 12:47pm UTC](https://forum.flowable.org/t/change-h2-db-to-mysql-in-flowable-rest-example/1215 "2017-11-16T12:47:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![subbu](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/subbu/32/1407_2.png) [@subbu](https://forum.flowable.org/u/subbu)\
**Post date:** [November 16, 2017, 12:47pm UTC](https://forum.flowable.org/t/change-h2-db-to-mysql-in-flowable-rest-example/1215/1 "2017-11-16T12:47:04Z")

</div>

Modify the “flowable-rest\WEB-INF\classes\db.properties” with below content.  
db=mysql  
datasource.driver=com.mysql.jdbc.Driver  
datasource.url=jdbc:mysql://localhost:3306/flowable  
datasource.username=root  
datasource.password=root

Once save this file ,Restart your tomcat server ,it will connect to MYSQL db.

Note: If you are trying to connect MYSQL 5.5 server ,you may face syntax error while starting the tomcat.because of “timestamp(6)” in the following create query. Instead of “timestamp(6)”, use “timestamp” then it will work.

CREATE TABLE flowable.ACT\_CO\_CONTENT\_ITEM (  
ID\_ VARCHAR(255) NOT NULL,  
NAME\_ VARCHAR(255) NOT NULL,  
MIME\_TYPE\_ VARCHAR(255) NULL,  
TASK\_ID\_ VARCHAR(255) NULL,  
PROC\_INST\_ID\_ VARCHAR(255) NULL,  
CONTENT\_STORE\_ID\_ VARCHAR(255) NULL,  
CONTENT\_STORE\_NAME\_ VARCHAR(255) NULL,  
FIELD\_ VARCHAR(400) NULL,  
CONTENT\_AVAILABLE\_ BIT(1) DEFAULT 0 NULL,  
CREATED\_ timestamp(6) NULL,  
CREATED\_BY\_ VARCHAR(255) NULL,  
LAST\_MODIFIED\_ timestamp(6) NULL,  
LAST\_MODIFIED\_BY\_ VARCHAR(255) NULL,  
CONTENT\_SIZE\_ BIGINT DEFAULT 0 NULL,  
TENANT\_ID\_ VARCHAR(255) NULL,  
CONSTRAINT PK\_ACT\_CO\_CONTENT\_ITEM PRIMARY KEY (ID\_));

This code you will find in “flowable-content-engine-6.2.0.jar” file. Please update this jar with proper query in the flowable-content-db-changelog.xml file.

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [November 25, 2017, 1:54pm UTC](https://forum.flowable.org/t/change-h2-db-to-mysql-in-flowable-rest-example/1215/2 "2017-11-25T13:54:19Z")

</div>

Thanks for reporting, we’ll fix it. The .sql file is autogenerated using Liquibase, but the behaviour doesn’t seem to be properly working for mysql 5.5. Removing the (6) from the Liquibase file generally is not a good idea, as it’s needed for other databases.

Do note that when using Mysql 5.5 you won’t have support for storing fractional parts of timestamps (which you typically want). 5.6 and 5.7 don’t have this problem.

---

<div class="post-metadata">

**Author:** ![subbu](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/subbu/32/1407_2.png) [@subbu](https://forum.flowable.org/u/subbu)\
**Post date:** [November 27, 2017, 5:23am UTC](https://forum.flowable.org/t/change-h2-db-to-mysql-in-flowable-rest-example/1215/3 "2017-11-27T05:23:20Z")

</div>

Thanks joram for clarification.
