--- title: 'Connect to a Data source' description: 'Learn how to connect to an external data-source (PG/MySQL) in NocoDB.' tags: ['Data Sources', 'Connect', 'External', 'PG', 'MySQL'] keywords: ['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: 1. Access Base context menu by clicking on the `Base` name in the left sidebar 2. Select `Data Sources` tab 3. Click on `+ New Data Source` button 4. 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 | 5. Click on `Test Database Connection` button to verify the connection 6. Wait for the connection to be verified. - If the connection is successful, you will see a checkmark next to the `Test Database Connection` button & `Submit` button will be enabled. - Click on `Submit` button to save the data source. ![data source-1](/img/v2/data-source/data-source-connect-1.png) ![data source-2](/img/v2/data-source/data-source-connect-2.png) ![data source-3](/img/v2/data-source/data-source-connect-3.png)