Skip to main content
Version: v1

連結至 MongoDB

開始之前

在開始之前,請先了解如何創建資料來源

Step1: 至 Data Sources 頁面

請點擊側欄的 Data Sources 至資料來源設定頁面

nav_to_data_source

Step2: 創建資料來源

點擊右上方的 Create a Data Source,設定以下資訊在彈出表單中

  • Name: 資料庫名稱,供顯示使用,後續可作修改
  • Data Source Type: 資料庫類型,請選擇 MongoDB
  • URL: 請填入 <protocol>://<hostname>:<port> 的格式,例如 mongodb+srv://testing.scscd.mongodb.net or mongodb://10.100.0.8:27017
  • Username: 連線使用的 Username
  • Password: 連線使用的 Password
  • Database Name: 連線的資料庫名稱
  • Auth Source: The collection with the user credentials, 通常是 admin
  • Explore Timeout: 若資料庫中含有的 Table 數量較大,建議調高此參數,讓 Explore 可執行較久

connect_mongo

Submit 後,稍後片刻會跳回列表頁面,並可看到 MongoDB 的資料來源在列表中