MySQL And MariaDB Configuration
Configuring A MySQL Or MariaDB Data Source In Coordimap
This page explains how to configure the Coordimap agent to crawl a MySQL or MariaDB server. Once configured, Coordimap can discover databases, tables, indexes, and relationships so the structure stays visible and current.
For MySQL and MariaDB, use the server UUID as scope_id. That is the stable upstream identity Coordimap should use for the database server.
Prerequisites
Before you begin, make sure you have:
- Installed the Coordimap agent in an environment that can reach the database server.
- Added the MySQL or MariaDB data source in the Coordimap UI so you have a
data_source_id. - Created a read-only database user for the agent.
Use a read-only user
Use a dedicated read-only MySQL or MariaDB user whenever possible. Follow the guide here: MySQL Read-Only User.
Find The Correct scope_id
Use the server UUID:
SHOW VARIABLES LIKE 'server_uuid';If server_uuid is not available in a specific deployment, use an explicitly configured stable scope_id.
Configuration File
coordimap:
api_key: ${COORDIMAP_API_KEY}
data_sources:
- type: mysql
data_source_id: <YOUR_DATASOURCE_ID_FROM_UI>
config:
- name: scope_id
value: "<MYSQL_SERVER_UUID>"
- name: db_name
value: "appdb"
- name: db_host
value: "mysql.example.com"
- name: db_user
value: "coordimap_readonly_user"
- name: db_pass
value: ${MYSQL_PASSWORD}
- name: crawl_interval
value: "10m"The same pattern applies to MariaDB. If you are crawling MariaDB, set type to mariadb and keep the same scope_id guidance.
Configuration Options
| Attribute Name | Required | Description |
|---|---|---|
type | Yes | The data source type. Use mysql for MySQL or mariadb for MariaDB. |
data_source_id | Yes | The Coordimap data source identifier created in the UI. It identifies the connector record, not the database server identity. |
config.name: scope_id | Yes | Stable upstream identity for the database server. Use server_uuid when available. |
config.name: db_name | Yes | The database name to connect to. |
config.name: db_host | Yes | Hostname or IP address of the MySQL or MariaDB server. |
config.name: db_user | Yes | Database user for the agent connection. Use a read-only user. |
config.name: db_pass | Yes | Password for the database user. Prefer an environment variable. |
config.name: crawl_interval | No | How often the agent refreshes the schema inventory. See Shared Configuration Options. |
Why scope_id Matters For MySQL And MariaDB
Coordimap uses scope_id to decide whether two crawls represent the same upstream database server. If you replace the connector but keep the same scope_id, the discovered database objects remain tied to the same identity space.
PostgreSQL Read-Only User
Create a read-only PostgreSQL role and grants so the Coordimap agent can crawl schema metadata without modifying data.
Create A Read-Only MySQL Or MariaDB User
Create a read-only MySQL or MariaDB user for the Coordimap agent so schema metadata can be crawled without write access.