DBLE Server.xml Configuration Guide: System, User, and Firewall Settings
This article provides a comprehensive overview of DBLE's Server.xml configuration, covering system parameters, user definitions with schema and privilege controls, and black‑white list firewall settings, along with practical code examples and links to official resources for quick onboarding.
DBLE is an enterprise‑grade open‑source distributed middleware derived from MyCat, designed for high‑concurrency and TB‑scale data processing. The article introduces its official website, GitHub project, download links, and community group.
The main configuration files reside in the conf directory, with server.xml, schema.xml, and rule.xml being the most frequently used.
DBLE uses conf/wrapper.conf to manage JVM settings; detailed documentation is available at the provided URL.
Server.xml Configuration
Server.xml is divided into three sections: <system>, <user>, and <firewall>. The <system> section defines performance, scheduled tasks, ports, and user parameters. A sample XML snippet is shown:
<dble:server>
<system></system>
<user></user>
<firewall>
<whitehost></whitehost>
</firewall>
</dble:server>To apply configuration changes at runtime, the reload @@config command can be used, but changes in the <system> block require a full restart.
System Parameters
property
作用
serverPort
业务用户连接端口
managerPort
管理用户连接端口
charset
字符集
maxCon
控制最大连接数
processors
NIO前端处理器的数量,默认java虚拟机核数
enableSlowLog
是否允许慢查询,默认不开启
sqlSlowTime
慢查询阈值(毫秒)
User Configuration
Users are defined inside the <user> block. Each user can be bound to one or multiple schemas, and fine‑grained DML permissions can be set via the privileges element. Example user definitions:
<user name="adv_user">
<property name="password">adv_user</property>
<property name="schemas">adv</property>
<property name="readOnly">false</property>
</user>
<user name="motor_user">
<property name="password">motor_user</property>
<property name="schemas">motor</property>
<property name="readOnly">false</property>
</user>For a user needing access to multiple schemas, the schemas attribute can list them separated by commas, e.g., adv_motor_user with schemas="motor,adv".
DML permissions are expressed as a four‑digit binary string (INSERT, UPDATE, SELECT, DELETE). The example below grants full DML rights on all tables of schema adv and overrides table tb01 to allow all four operations:
<user name="adv_user">
...
<privileges check="true">
<schema name="adv" dml="1110">
<table name="tb01" dml="1111"/>
</schema>
</privileges>
</user>Blacklist / Whitelist (Firewall)
DBLE provides a firewall with whitehost (allow list) and blacklist (fine‑grained deny rules). The whitelist restricts connections by IP and username; the blacklist can further limit SQL actions such as SELECT, INSERT, UPDATE, etc.
<firewall>
<whitehost>
<host host="127.0.0.1" user="adv_user"/>
<host host="127.0.0.1" user="admin"/>
</whitehost>
<blacklist check="true">
<property name="selectAllow">false</property>
<property name="insertAllow">false</property>
<property name="updateAllow">false</property>
...
</blacklist>
</firewall>The article concludes that DBLE’s Server.xml offers system settings, user management with schema‑level and table‑level privileges, and a powerful blacklist/whitelist mechanism for precise access control.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
