mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3.0 KiB
3.0 KiB
title | description | tags | keywords |
---|---|---|---|
Connect to a Data source | Learn how to connect to an external data-source (PG/MySQL) in NocoDB. | [Data Sources Connect External PG MySQL mtls tls ssl] | [NocoDB data source connect data source external data source PG data source MySQL data source] |
To connect to an external data source, follow the steps below:
- Access Base context menu by clicking on the
Base
name in the left sidebar - Select
Data Sources
tab - Click on
+ New Data Source
button - On the pop-up modal, provide the following details:
Field Name Description Source Name Name for this data source for display on NocoDB UI Database Type Type of the data source. Currently, NocoDB supports PostgreSQL & MySQL data sources. Host Address Hostname of the data source Port Number Port number of the data source Username Username to connect to the database Password Password to connect to the database Database Name of the database to connect to Schema name Name of the schema to connect to
4a. 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.
- Click on
Test Database Connection
button to verify the connection - Wait for the connection to be verified.
- After connection is successful,
Submit
button will be enabled. - Click on
Submit
button to save the data source.