I was playing around with the platform initializer at start.camunda.com and it works great. The problem is after a restart all settings are gone. So how can i configure MySQL for the SpringBoot App as in the Camunda Run Server?
Hi @humour
Add a Maven dependency for the MySQL JDBC driver and then change the spring.datasource.url in the application.yaml to match the MySQL URL.
BR
Michael
Hi @humour
I have just tried a fresh application generated from the start.camunda.com initializer for Camunda 7.17 and Spring Boot 2.6.4 and Java 15.
I then added Maven dependency:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
and my application.yaml looks like:
spring:
datasource:
url: jdbc:mysql://localhost:33306/camunda
username: root
password: password
driver-class-name: com.mysql.cj.jdbc.Driver
camunda.bpm.admin-user:
id: demo
password: demo
To test it, I have started a MySQL instance using Docker:
docker run -p 33306:3306 --name some-mysql -e MYSQL_ROOT_PASSWORD=password -d mysql:latest
Before you start the application, connect to the MySQL Docker instance and create a database schema called “camunda”. Then the application should start and it will create the required tables in the database.
BR
Michael
I see you are using com.mysql.cj.jdbc.Driver
while i was using com.mysql.jdbc.Driver
. That fixed it. See MySQL :: MySQL Connector/J 8.0 Developer Guide :: 4.4.1.3 Changes in the Connector/J API
Ahh OK. Great it works now.
BR
Michael