Loading...
Loading...
Compare original and translation side by side
DOCUMENTDB_URImongodb://localhost:27017DOCUMENTDB_URIDOCUMENTDB_URImongodb://localhost:27017DOCUMENTDB_URIenv | grep "^DOCUMENTDB_URI\|^TRANSPORT\|^HOST\|^PORT" | sed 's/DOCUMENTDB_URI=.*/DOCUMENTDB_URI=[set]/'DOCUMENTDB_URITRANSPORTDOCUMENTDB_URIenv | grep "^DOCUMENTDB_URI\|^TRANSPORT\|^HOST\|^PORT" | sed 's/DOCUMENTDB_URI=.*/DOCUMENTDB_URI=[set]/'DOCUMENTDB_URITRANSPORTDOCUMENTDB_URImongodb://localhost:27017mongodb://localhost:27017mongodb+srv://<username>:<password>@<cluster-name>.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256<username><password>mongodb+srv://<user>:<password>@cluster.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256mongodb://<user>:<password>@cluster.mongocluster.cosmos.azure.com:10255/?tls=true&authMechanism=SCRAM-SHA-256tls=truemongodb+srv://<username>:<password>@<cluster-name>.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256<username><password>mongodb+srv://<user>:<password>@cluster.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256mongodb://<user>:<password>@cluster.mongocluster.cosmos.azure.com:10255/?tls=true&authMechanism=SCRAM-SHA-256tls=truemongosh --eval "db.runCommand({ping: 1})" 2>/dev/null || echo "MongoDB not reachable"mongodb://localhost:27017DOCUMENTDB_URImongosh --eval "db.runCommand({ping: 1})" 2>/dev/null || echo "MongoDB not reachable"mongodb://localhost:27017DOCUMENTDB_URImongodb://<user>:<password>@host:port/databasemongodb+srv://<user>:<password>@host/databasemongodb://host:portmongodb://<user>:<password>@host:port/databasemongodb+srv://<user>:<password>@host/databasemongodb://host:portHOSTlocalhostPORT8070HOSTlocalhostPORT8070echo $SHELLecho $SHELL~/.documentdb-env~/.documentdb-envnano ~/.documentdb-envundefined~/.documentdb-env~/.documentdb-envnano ~/.documentdb-envundefined
**For Custom Endpoint (Option C):**
```bash
**对于自定义端点(选项C):**
```bash
**If streamable-http transport was chosen (Step 4), also add:**
```bash
export TRANSPORT="streamable-http"
export HOST="localhost"
export PORT="8070"chmod 600 ~/.documentdb-envcode ~/.zshrcnano ~/.zshrcsource ~/.documentdb-envbass source ~/.documentdb-envset -x.ps1
**若选择了streamable-http传输模式(步骤4),还需添加:**
```bash
export TRANSPORT="streamable-http"
export HOST="localhost"
export PORT="8070"chmod 600 ~/.documentdb-envcode ~/.zshrcnano ~/.zshrcsource ~/.documentdb-envbass source ~/.documentdb-envset -x.ps1source ~/.zshrc # adjust path to match their profile fileenv | grep "^DOCUMENTDB_URI\|^TRANSPORT\|^HOST\|^PORT" | sed 's/DOCUMENTDB_URI=.*/DOCUMENTDB_URI=[set]/'source ~/.zshrc # 根据用户的配置文件路径调整env | grep "^DOCUMENTDB_URI\|^TRANSPORT\|^HOST\|^PORT" | sed 's/DOCUMENTDB_URI=.*/DOCUMENTDB_URI=[set]/'source <profile-file>source ~/.zshrclist_databasesget_connection_statuslist_databasesdb_statsget_db_infocollection_statssample_documentsfind_documentscount_documentsaggregatelist_indexesindex_statscreate_indexoptimize_find_queryexplain_aggregate_querysource <profile-file>source ~/.zshrclist_databasesget_connection_statuslist_databasesdb_statsget_db_infocollection_statssample_documentsfind_documentscount_documentsaggregatelist_indexesindex_statscreate_indexoptimize_find_queryexplain_aggregate_querymongodb://localhost:27017list_databasesmongodb://localhost:27017list_databasessourcetls=trueset -x$env:exportsourcetls=trueset -x$env:export