Databases 9 min read

Quick Start Guide for DBLE Distributed Middleware Using Docker‑Compose

This article introduces DBLE, an enterprise‑grade open‑source distributed middleware, and provides a step‑by‑step Docker‑Compose quick‑start tutorial covering download links, prerequisite installations, container launch, connection details, cleanup commands, and how to customize the configuration with custom scripts.

Aikesheng Open Source Community
Aikesheng Open Source Community
Aikesheng Open Source Community
Quick Start Guide for DBLE Distributed Middleware Using Docker‑Compose

DBLE is an enterprise‑grade open‑source distributed middleware derived from MyCat, suitable for high‑concurrency and terabyte‑scale data processing scenarios.

Download the latest DBLE version (2.19.01.0) from the GitHub releases page and refer to the Chinese PDF documentation available online.

Join the community technical QQ group (669663113) for rapid official support.

On March 1 a blog post announced the new version and gave a brief overview of its new features, using the Docker image as an example for quick start.

1. About This Section

How to quickly use DBLE's docker‑compose file to start a DBLE quick start.

A use case that starts DBLE quick start with custom configuration and SQL scripts.

2. Install Dependencies

Install Docker.

Install Docker‑Compose.

Install a MySQL client for connection testing.

3. Installation Process

Download the latest docker-compose.yml file from the DBLE project:

https://raw.githubusercontent.com/actiontech/dble/master/docker-images/docker-compose.yml

Start the containers with:

docker-compose up -d

Note: three containers are created – two MySQL containers (ports 33061 and 33062) and one DBLE container (ports 8066 and 9066).

4. Connect and Use

Use a prepared MySQL client to connect to the host ports 8066 or 9066:

SQL port 8066 – user root / password 123456 .

Management port 9066 – user man1 / password 654321 .

#connect dble server port
mysql -P8066 -u root -p123456 -h 127.0.0.1
#connect dble manager port
mysql -P9066 -u man1 -p654321 -h 127.0.0.1

Check the /opt/dble/conf/schema.xml file inside the dble‑server container for schema details.

5. Environment Cleanup

docker-compose stop

or

docker-compose down

6. Start DBLE with Custom Configuration

Mount a local directory containing custom DBLE configuration files and an initialization script into the container, then modify the start command to run the custom script.

Example docker-compose.yml snippet:

dble-server:
   image: actiontech/dble:latest
   container_name: dble-server
   privileged: true
   stdin_open: true
   tty: true
   volumes:
     - ./:/opt/init/
   command: ["/opt/dble/bin/wait-for-it.sh","backend-mysql1:3306","--","/opt/init/customized_script.sh"]
   ports:
     - "8066:8066"
     - "9066:9066"
   depends_on:
     - "mysql1"
     - "mysql2"

The local ./ directory should contain schema.xml , rule.xml , server.xml , init.sql , and customized_script.sh . The custom script copies these files into /opt/dble/conf/ , starts DBLE, waits for the service, creates the data node database, and loads the initialization SQL.

Custom script example:

#!/bin/sh

echo "dble init&start in docker"

cp /opt/init/server.xml /opt/dble/conf/
cp /opt/init/schema.xml /opt/dble/conf/
cp /opt/init/rule.xml /opt/dble/conf/

sh /opt/dble/bin/dble start
sh /opt/dble/bin/wait-for-it.sh 127.0.0.1:8066
mysql -P9066 -u man1 -h 127.0.0.1 -p654321 -e "create database @@dataNode ='dn1,dn2,dn3,dn4'"
mysql -P8066 -u root -h 127.0.0.1 -p123456 -e "source /opt/init/init.sql" testdb

echo "dble init finish"

/bin/bash

For more detailed guides, configuration analysis, and community resources, refer to the links provided at the end of the article.

DockerDatabaseDocker-ComposeDBLEDistributed MiddlewareQuick Start
Aikesheng Open Source Community
Written by

Aikesheng Open Source Community

The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.