MySQL
Data source: External MySQLStandard Edition+Introduction
MySQL can be connected to NocoBase as an external database. NocoBase reads MySQL tables, fields, and views and uses them as collections in the external data source.
Unlike the main database, the original business system, database client, or migration scripts maintain the real MySQL schema. NocoBase reads structure, stores field metadata, and configures blocks, permissions, workflows, and APIs.
Use external MySQL to connect existing ERP, MES, WMS, or CRM databases, build management pages without migrating historical data, apply permissions and workflows to existing tables, and leave schema maintenance to DBAs or the original system.
External MySQL is not the NocoBase system database. NocoBase does not manage its backup, restore, migrations, or schema changes.
Plugin installation
This is a commercial plugin. See the commercial plugin activation guide for activation.
Add a data source
In Data source management, click Add new, select MySQL, and enter the connection information.

For a database with many objects, narrow the scope with Database, Table prefix, and Collections. Import only objects the application needs so that permissions, page building, and synchronization remain manageable.
Select collections
Click Load Collections to read available MySQL tables and views. Results depend on the connection account, Database, Table prefix, and Collections settings.
Add all collections is enabled by default. Disable it and select individual objects when only part of the database is needed.

One external data source can import at most 500 tables or views. Narrow the scope with Database, Table prefix, or Collections when MySQL has many objects.
Synchronize and configure fields
MySQL maintains the external table structure. NocoBase does not create columns, change column types, or delete real fields in external MySQL.
When the MySQL schema changes, use Sync from database to reread collection and field metadata. Synchronization updates NocoBase collections, fields, primary keys, unique keys, and type mappings; it does not delete real MySQL tables or data.
After synchronization, configure field titles, Field types, and Field interfaces in NocoBase. NocoBase relation fields are metadata only and do not automatically add real foreign-key columns to MySQL.
Field type mapping
Unsupported MySQL types are shown separately in field configuration. They require development support before they can be used as normal NocoBase fields.
Primary key and Record unique key
Collections used for block display and editing should have a primary key or unique field. NocoBase uses the primary key as the Record unique key when available.
For views, tables without a primary key, or composite-primary-key tables, configure Record unique key manually. Without a usable identifier, blocks might not view, edit, or delete records correctly.

- External databases - General external-database configuration and management.
- Data source management - Data-source entry points and management.
- Collection fields - Field types and mapping.

