多维表格
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.
 
 
 
 
 
 

1 lines
7.6 KiB

"use strict";(self.webpackChunknoco_docs=self.webpackChunknoco_docs||[]).push([[4021],{3905:(t,e,a)=>{a.d(e,{Zo:()=>d,kt:()=>k});var n=a(67294);function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function c(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?o(Object(a),!0).forEach((function(e){r(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function l(t,e){if(null==t)return{};var a,n,r=function(t,e){if(null==t)return{};var a,n,r={},o=Object.keys(t);for(n=0;n<o.length;n++)a=o[n],e.indexOf(a)>=0||(r[a]=t[a]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)a=o[n],e.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(r[a]=t[a])}return r}var s=n.createContext({}),i=function(t){var e=n.useContext(s),a=e;return t&&(a="function"==typeof t?t(e):c(c({},e),t)),a},d=function(t){var e=i(t.components);return n.createElement(s.Provider,{value:e},t.children)},u="mdxType",p={inlineCode:"code",wrapper:function(t){var e=t.children;return n.createElement(n.Fragment,{},e)}},m=n.forwardRef((function(t,e){var a=t.components,r=t.mdxType,o=t.originalType,s=t.parentName,d=l(t,["components","mdxType","originalType","parentName"]),u=i(a),m=r,k=u["".concat(s,".").concat(m)]||u[m]||p[m]||o;return a?n.createElement(k,c(c({ref:e},d),{},{components:a})):n.createElement(k,c({ref:e},d))}));function k(t,e){var a=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var o=a.length,c=new Array(o);c[0]=m;var l={};for(var s in e)hasOwnProperty.call(e,s)&&(l[s]=e[s]);l.originalType=t,l[u]="string"==typeof t?t:r,c[1]=l;for(var i=2;i<o;i++)c[i]=a[i];return n.createElement.apply(null,c)}return n.createElement.apply(null,a)}m.displayName="MDXCreateElement"},31250:(t,e,a)=>{a.r(e),a.d(e,{assets:()=>s,contentTitle:()=>c,default:()=>p,frontMatter:()=>o,metadata:()=>l,toc:()=>i});var n=a(87462),r=(a(67294),a(3905));const o={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"]},c=void 0,l={unversionedId:"data-sources/connect-to-data-source",id:"data-sources/connect-to-data-source",title:"Connect to a Data source",description:"Learn how to connect to an external data-source (PG/MySQL) in NocoDB.",source:"@site/docs/100.data-sources/020.connect-to-data-source.md",sourceDirName:"100.data-sources",slug:"/data-sources/connect-to-data-source",permalink:"/data-sources/connect-to-data-source",draft:!1,editUrl:"https://github.com/nocodb/nocodb/tree/develop/packages/noco-docs/docs/docs/100.data-sources/020.connect-to-data-source.md",tags:[{label:"Data Sources",permalink:"/tags/data-sources"},{label:"Connect",permalink:"/tags/connect"},{label:"External",permalink:"/tags/external"},{label:"PG",permalink:"/tags/pg"},{label:"MySQL",permalink:"/tags/my-sql"}],version:"current",sidebarPosition:20,frontMatter:{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"]},sidebar:"tutorialSidebar",previous:{title:"Data sources overview",permalink:"/data-sources/data-source-overview"},next:{title:"Sync with Data source",permalink:"/data-sources/sync-with-data-source"}},s={},i=[],d={toc:i},u="wrapper";function p(t){let{components:e,...o}=t;return(0,r.kt)(u,(0,n.Z)({},d,o,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"To connect to an external data source, follow the steps below:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Access Base context menu by clicking on the ",(0,r.kt)("inlineCode",{parentName:"p"},"Base")," name in the left sidebar")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Select ",(0,r.kt)("inlineCode",{parentName:"p"},"Data Sources")," tab")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Click on ",(0,r.kt)("inlineCode",{parentName:"p"},"+ New Data Source")," button")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"On the pop-up modal, provide the following details:"),(0,r.kt)("table",{parentName:"li"},(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Field Name"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Source Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name for this data source for display on NocoDB UI")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Database Type"),(0,r.kt)("td",{parentName:"tr",align:null},"Type of the data source. Currently, NocoDB supports PostgreSQL & MySQL data sources.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Host Address"),(0,r.kt)("td",{parentName:"tr",align:null},"Hostname of the data source")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Port Number"),(0,r.kt)("td",{parentName:"tr",align:null},"Port number of the data source")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Username"),(0,r.kt)("td",{parentName:"tr",align:null},"Username to connect to the database")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Password"),(0,r.kt)("td",{parentName:"tr",align:null},"Password to connect to the database")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Database"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the database to connect to")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Schema name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the schema to connect to"))))),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Click on ",(0,r.kt)("inlineCode",{parentName:"p"},"Test Database Connection")," button to verify the connection")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Wait for the connection to be verified. "))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"After connection is successful, ",(0,r.kt)("inlineCode",{parentName:"li"},"Submit")," button will be enabled. "),(0,r.kt)("li",{parentName:"ul"},"Click on ",(0,r.kt)("inlineCode",{parentName:"li"},"Submit")," button to save the data source.")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"data source-1",src:a(34577).Z,width:"2876",height:"984"})),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"data source-2",src:a(34530).Z,width:"2880",height:"1800"})),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"data source-3",src:a(58071).Z,width:"2880",height:"1800"})))}p.isMDXComponent=!0},34577:(t,e,a)=>{a.d(e,{Z:()=>n});const n=a.p+"assets/images/data-source-connect-1-e1cd8c562d3d3db9699aba4395d8a800.png"},34530:(t,e,a)=>{a.d(e,{Z:()=>n});const n=a.p+"assets/images/data-source-connect-2-5eaa0a1ab29767749a9ea725e28ad47c.png"},58071:(t,e,a)=>{a.d(e,{Z:()=>n});const n=a.p+"assets/images/data-source-connect-3-48b79f4e92d396e681c0ede769e990d9.png"}}]);