Giter Club home page Giter Club logo

compass-connect's Introduction

Compass Connect

This plugin is the initial connection screen dialog that appears when you open MongoDB Compass.

Usage

There are two ways in which you can connect to your desirable database: fill in connection fields manually or connect via a connection string (URI).

Connecting via URI

A Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource.

The standard MongoDB URI connection scheme has the form:

mongodb://[username:password@]host1[:port1][,...hostN[:portN]]][/[database][?options]]

And includes the following components:

mongodb:// -  A required prefix to identify that this is a string in the standard MongoDB connection format.

username:password@ - Optional authentication credentials. If specified, the client will attempt to log in to the specific database using these credentials after connecting.

host[:port] - The host (and optional port number) where the mongod instance (or the mongos instance for a sharded cluster) is running. You can specify a hostname, IP address, or UNIX domain socket. It can contain as many hosts as appropriate for your deployment topology.

/database - The optional name of the database to authenticate if the connection string includes authentication credentials in the form of username:password@.

?<options> - The optional query string that specifies connection string options as <name>=<value> pairs.

Here is some example of MongoDB URI:

mongodb://myDBReader:P%[email protected]:27017/admin?replicaSet=myRepl

uri-view

Connecting via the form

Users can switch to the form view by clicking "Fill in connection fields individually" on the top right corner of the screen. The connection form attributes are split into "Hostname" and "More options" views. On the first view users can enter hostname, port, indicate whether it is SRV record or regular one and specify the authentication mechanism. On the second view, a request can be decorated with additional connection options such as read preference, SSL method or SSH tunnel.

form-view

License

Apache 2.0

compass-connect's People

Contributors

addaleax avatar aherlihy avatar alenakhineika avatar anemy avatar dependabot-preview[bot] avatar durran avatar imlucas avatar lrlna avatar mcasimir avatar mmarcon avatar rose-m avatar rueckstiess avatar sampoonachot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compass-connect's Issues

Problem with ssh tunnel and replica set

Looks like compass need create different tunnel for every replica set hosts. Because of that tunnel is created only for first member host and user receives selection timeout.

'Authentication Database' is ignored when using connection string

Current Behavior

I have connection string to connect mongodb cluster with basic auth and authentication database which I tested with mongo (cli) and Studio 3T that works.

I found that authentication database part in connection string is ignored and I was keep getting auth failed error.

This is the page where I found the connection string specs: https://docs.mongodb.com/manual/reference/connection-string/

Giving connection string mongodb://username:[email protected]:27017/authentication_database what I experienced is that authentication_database part is ignored in paste connection string screen.

Expected Behavior/Code

Given connection string with basic auth and authentication database, mongodb-compass should connect successfully.

Environment

  • Centos 7
  • mongodb-compass 1.22.1

Possible Solution

Use Fill in connection fields individually screen and make sure to fill Authentication Database field.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.