--- 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', 'mtls', 'tls', 'ssl'] keywords: ['NocoDB data source', 'connect data source', 'external data source', 'PG data source', 'MySQL data source'] --- To connect an external Database as a new Data Source for NocoDB, follow the steps below: 1. Click on the Base name in the left sidebar to access the **Base homepage** 2. Click **Connect External Data** button 3. Provide a name to the data source 4. Select connection to pick credentials for the database (a) Select connection from the list of available connections in the dropdown (b) Click on `+ New connection` button to create a new connection instead 5. Configure / Change database & schema details as required. If default database & schema details were provided during connection creation, these details will be pre-filled. 6. [Configure permissions](#configuring-permissions) for the data source 7. Click on `Test Database Connection` button to verify the connection 8. Click on `Add Source` button to save the data source ![data source](/img/v2/data-source/data-source-1.png) ![data source](/img/v2/data-source/data-source-2.png) ![data source](/img/v2/data-source/data-source-3.png) :::info Option (4b) to create a new connection is available only if the user has the required permissions to create new connection (Workspace Creator+). ::: ## 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](/img/v2/data-source/data-source-permissions.png) 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. :::note 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. :::warning 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.