DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Running Camunda With Postgres Using Docker
  • Smart Deployment Strategies for Modern Applications
  • Solving the Mystery: Why Java RSS Grows in Docker on M1 Macs
  • How We Diagnosed a Hidden Scheduler Failure in a Docker Swarm Cluster Serving 2 Million Users

Trending

  • Data Contracts as the "Circuit Breaker" for Model Reliability
  • Contract-First Integration: Building Scalable Systems With Flyway, OpenAPI, and Kafka
  • Building a DevOps-Ready Internal Developer Platform: A Hands-On Guide to Golden Paths, Self-Service, and Automated Delivery Pipelines
  • Optimizing High-Volume REST APIs Using Redis Caching and Spring Boot (With Load Testing Code)
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Running Camunda with MySQL in Docker Container

Running Camunda with MySQL in Docker Container

In this article, we'll run a Camunda bpm platform connecting to MySQL Database in the Docker container. We'll use the MySQL client to verify the Camunda database.

By 
Alok Singh user avatar
Alok Singh
·
Sep. 16, 21 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
7.3K Views

Join the DZone community and get the full member experience.

Join For Free

In this article, we are going to run a Camunda bpm platform connecting to MySQL Database within the Docker container. At the same time, we'll use the MySQL client (workbench) to verify the Camunda database (Although the same can be done by Docker CLI for MySQL as well). 

Below is the list of packages that you need to add before proceeding:

a) Download and install Docker-desktop

b) Download and install MySQL workbench (Optional, To verify the installation of MySQL in docker)

STEP-1: Running MySQL in Docker container

Run the below command in command prompt to run MySQL in Docker Container with name "mysql".

docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=mysqladmin -d mysql/mysql-server:latest

Note: Set up your own password for MySQL instead of mysqladmin in the above command.

Open the Docker desktop app and verify MYSQL is running on the docker container.

Docker Container

STEP-2: Connecting MySQL Workbench with Docker container

a) Open CLI command prompt of mysql as highlighted.

Connecting MySQL Workbench with Docker containerb) Enter command mysql -u root -p press enter and enter the password as mysqladmin (OR as given in step-1). You will be connected to mysql console.

Connecting to MYSQL Console

Note: On this console, also we can validate the Camunda database later using mysql commands hence steps 2-c, 2-d and 2-e are completely optional.

c) To connect MySQL with the workbench need to execute the below command on the MySQL console.

update mysql.user set host = '%' where user='root';

d) Open MySQL workbench and enter the details as below. Use password as provided in step-1.

MYSQL Workbench

e) Connect to MySQL Database.

MYSQL Database

f) Create a new schema in MySQL say named "mydb" using the below command.

create database mydb;

Creating Schema MYSQL

g) Verify the database is created and having no tables.

Verifying databases

Step-3: Running Camunda BPM

a) Open command prompt and execute the below command to start Camunda in docker container name as "camunda-mysql-env ".

docker run -d --name camunda-mysql-env -p 8080:8080 --link mysql:db -e DB_DRIVER=com.mysql.cj.jdbc.Driver -e DB_URL=jdbc:mysql://db:3306/mydb?autoReconnect=true -e DB_USERNAME=root -e DB_PASSWORD=mysqladmin -e WAIT_FOR=db:3306 camunda/camunda-bpm-platform:latest

Running Camunda BPM

b) Refresh the database and check for Camunda tables are created inside "mydb" database. The same can be verified in Docker CLI (for MySQL) also.

Checking Camunda Tables

The same can be verified using CLI as well.

Checking Camunda Tables Using CLI

c) Open the browser and check if the Camunda application is running at http://localhost:8080/camunda/.

Checking Camunda Application

Thanks for reading!!!

Docker (software) MySQL Workbench Camunda

Opinions expressed by DZone contributors are their own.

Related

  • Running Camunda With Postgres Using Docker
  • Smart Deployment Strategies for Modern Applications
  • Solving the Mystery: Why Java RSS Grows in Docker on M1 Macs
  • How We Diagnosed a Hidden Scheduler Failure in a Docker Swarm Cluster Serving 2 Million Users

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook