Skip to main content
Version: Latest

Connect to a Data source

To connect to an external data source, follow the steps below:

  1. Access the Base context menu by clicking on the ... in the left sidebar against the base name

  2. Click on Settings tab

  3. In the popup modal, click on Data Sources tab

  4. Click on + New Data Source button

  5. On the input modal, provide the following details:

    Field NameDescription
    Source NameName for this data source for display on NocoDB UI
    Database TypeType of the data source. Currently, NocoDB supports PostgreSQL & MySQL data sources.
    Host AddressHostname of the data source
    Port NumberPort number of the data source
    UsernameUsername to connect to the database
    PasswordPassword to connect to the database
    DatabaseName of the database to connect to
    Schema nameName of the schema to connect to

5a. Optionally, if the connection required is TLS/MTLS for MITM protection, follow these additional steps below:

  • Click on SSL & Advanced Parameters
  • Select SSL Mode and upload the client certificate, client key, and Root CA files by clicking on the file.

    Note: The entire connection parameters can be viewed in json form by clicking on the "Edit connection JSON" and edited as required by database server type.

    Example: In PostgreSQL when SSL mode set to "Required-Identity," if the server certificate's common name (cname) differs from the actual DNS/IP used for connection, the connection will fail.
    To resolve, add "servername" property with same cname value under the SSL section. Additional details are available at knex configuration options.
  1. Click on the Test Database Connection button to verify the connection
  2. Wait for the connection to be verified.
  • After test is successful, Counnect to Data Source button will be enabled.
  • Click on Connect to Data Source button to save the data source.

data source-1

data source-2

data source-3

data source-4

Configuring Permissions

This section covers the settings available when configuring data source permissions. These settings determine the level of access and modifications allowed on the connected database.

data source-1

NocoDB provides the following options for schema and data permissions:

Allow Data Edit

This option when enabled, users can insert, update, and delete records from the tables. This provides the flexibility to manage the data directly from the NocoDB UI but should be used with caution to avoid unintentional changes to the records in the external data source. This level of access is ideal for administrative users who need to modify data directly.

By default, data editing is enabled

When data editing is disabled, users can still view the data and perform read-only operations such as filtering, sorting, and grouping. This ensures that users can access the data for analysis and reporting purposes without the risk of modifying the records.


Data editing can only be disabled when schema editing is also disabled

Allow Schema Edit

This option enables users to modify the structure of the database schema. When enabled, users can create, modify, and delete tables, fields and relationships (links) within the connected datasource from NocoDB UI. This provides flexibility to adjust the database schema design as needed from UI.


NocoDB strongly advises against enabling the schema editing option unless absolutely necessary. Use with extreme caution, as improper changes can severely impact the data integrity and functionality of the connected data source.

By default, schema editing is disabled.

Even when schema editing is disabled, users can still

  • add (augment) virtual columns such as Lookup, Rollup and Formula. These virtual columns do not alter the underlying schema of the connected data source.
  • create views to customize the data presentation without modifying the original tables.
  • create webhooks to trigger external actions based on specific events within the connected datasource.
  • collaborate with other users by explicitly inviting them to the base or by sharing views.