System Tables¶
After initialization, an instance contains several system databases that store metadata, compatibility-layer information, and internal runtime data. System objects are read-only by default. Do not write business logic that modifies undocumented internal table structures.
System databases¶
Database |
Product-oriented purpose |
|---|---|
|
MatrixOne metadata, including databases, tables, columns, indexes, users, roles, and grant relationships |
|
Information-schema views compatible with common table-structure and privilege inspection workflows |
|
A subset of system tables for the MySQL compatibility layer |
|
Runtime and log system data |
|
System metrics data |
Some older documents use a spelling variant for the metrics database. Refer to the actual database name returned by
SHOW DATABASES; the common name issystem_metrics.
Common mo_catalog tables¶
You do not need to memorize every column. Query the tables required for the task:
Table |
What it contains |
|---|---|
|
Database list, creation information, subscription status, and more |
Table and column metadata tables |
Table and column definitions. Exact names depend on the instance, such as the |
|
Index ID, type (primary, unique, or secondary), algorithm, and component columns |
|
Partition definitions. RANGE/LIST and other types may be unsupported. See Limitations. |
|
User name, status, creation time, default role, and more |
|
Roles |
|
Roles granted to users |
|
Role inheritance |
|
Privilege details for roles |
User-defined-function tables |
User-defined function metadata |
-- Example: view metadata for currently visible databases (requires the appropriate privileges)
SELECT datname, dat_type, created_time
FROM mo_catalog.mo_database
LIMIT 20;
information_schema and mysql¶
For tool compatibility with
information_schema.tables,columns,schemata, and similar objects, prefer this layer.Compatibility is a subset. Some MySQL system tables or columns do not exist or always remain empty. Do not assume 100% compatibility with MySQL 8.0.
Usage notes¶
Read-only: DML or DDL on system databases is generally rejected or can cause unexpected behavior.
Privileges: Ordinary business roles may not see all system tables. Administrative roles have broader visibility.
Version differences: Internal table columns evolve between versions. Automation should tolerate added columns and avoid depending on the column order returned by
SELECT *.Cleanup: Dedicated functions such as
PURGE_LOGmay be available for log cleanup. Do not modify underlying files or tables directly.