Databases 4 min read

How to Integrate Dameng Database with Nacos 2.3.2 Using the New DM8 Plugin

This guide explains how to enable Dameng database support in Nacos 2.3.2 by adding a custom SPI plugin, configuring connection properties, and optionally building the integration from source, complete with migration scripts, driver setup, and sample configuration files.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
How to Integrate Dameng Database with Nacos 2.3.2 Using the New DM8 Plugin

Background

Nacos does not support databases other than MySQL by default; you need to inject a custom data‑source plugin via the SPI mechanism so that Nacos can load the plugin at startup.

Method 1: Use nacos.zip to Support Dameng

① Dameng DTS migration script

Dameng DTS can migrate the original MySQL data of Nacos to a Dameng database.

② Add Dameng driver and plugin

Create a

plugins

directory inside the extracted

nacos.zip

and place the required JAR files there.

NACOS Version

Dameng Plugin Version

2.2.0 - 2.3.0

0.0.2

2.3.1 - 2.3.2

0.0.3

Download address: https://repo1.maven.org/maven2/com/pig4cloud/plugin/nacos-datasource-plugin-dm8/

③ Configure connection to Dameng

Edit the

conf/application.properties

file:

<code>spring.datasource.platform=dameng<br/>db.num=1<br/>db.url.0=jdbc:dm://192.168.110.200:5236?schema=nacos<br/>db.user.0=SYSDBA<br/>db.password.0=SYSDBA<br/>db.pool.config.driver-class-name=dm.jdbc.driver.DmDriver</code>

Method 2: Build from Source

Example using the PIG microservice development platform, which runs nacos-console as a sub‑service.

1. Add driver and database plugin to nacos‑console

Edit

pig-register/pom.xml

:

<code><!-- Dameng database plugin --><dependency><groupId>com.pig4cloud.plugin</groupId><artifactId>nacos-datasource-plugin-dm8</artifactId><version>${VERSION}</version></dependency><dependency><groupId>com.dameng</groupId><artifactId>DmJdbcDriver18</artifactId><version>8.1.1.193</version></dependency></code>

2. Use Dameng DTS migration tool

Follow the same migration steps as in Method 1.

3. Configure Nacos datasource connection

Edit

pig-register/application.yml

:

<code>db:<br/>  num: 1<br/>  url:<br/>    0: jdbc:dm://172.27.0.5:5236?schema=nacos<br/>  user: nacos<br/>  password: nacos@123<br/>  pool:<br/>    config:<br/>      driver-class-name: dm.jdbc.driver.DmDriver<br/>spring:<br/>  datasource:<br/>    platform: dameng</code>
MicroservicesNacosSpring BootDatabase IntegrationDameng
Java Architecture Diary
Written by

Java Architecture Diary

Committed to sharing original, high‑quality technical articles; no fluff or promotional content.

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.