How to connect Robomongo to MongoDB

笑着哭i 提交于 2019-11-26 22:12:41

I was able to connect Robomongo to a remote instance of Mongo DB running on Mongo Labs using the connection string as follows:

  1. Download latest Robomongo. I downloaded 0.9 RC6 from here.

  2. From the connection string, populate the server address and port numbers as follows.

  1. Populate DB name and username and password as follows under the authentication tab.

  1. Test the connection.

Hope this help!

EDIT: Commenting out bind_ip can make your system vulnerable to security flaws, please see https://docs.mongodb.com/manual/administration/security-checklist/#limit-network-exposure It is a better idea to add more IP's than to open up your system to everything.

You need to edit your /etc/mongod.conf file's bind_ip variable to include the IP of the computer you're using, or eliminate it altogether.

I was able to connect using the following mongod.conf , I commented out bind_ip and uncommented port.

# mongod.conf

# Where to store the data.

# Note: if you run mongodb as a non-root user (recommended) you may
# need to create and set permissions for this directory manually,
# e.g., if the parent directory isn't mutable by the mongodb user.

dbpath=/var/lib/mongodb


#where to log

logpath=/var/log/mongodb/mongod.log


logappend=true


port = 27017


# Listen to local interface only. Comment out to listen on all 
interfaces. 

#bind_ip = 127.0.0.1


# Disables write-ahead journaling

# nojournal = true


# Enables periodic logging of CPU utilization and I/O wait

#cpu = true


# Turn on/off security.  Off is currently the default

#noauth = true

#auth = true


# Verbose logging output.

#verbose = true


# Inspect all client data for validity on receipt (useful for

# developing drivers)

#objcheck = true


# Enable db quota management

#quota = true


# Set oplogging level where n is

#   0=off (default)

#   1=W

#   2=R

#   3=both

#   7=W+some reads

#diaglog = 0


# Ignore query hints

#nohints = true


# Enable the HTTP interface (Defaults to port 28017).

#httpinterface = true


# Turns off server-side scripting.  This will result in greatly limited

# functionality

#noscripting = true


# Turns off table scans.  Any query that would do a table scan fails.

#notablescan = true


# Disable data file preallocation.

#noprealloc = true


# Specify .ns file size for new databases.

# nssize = <size>


# Replication Options


# in replicated mongo databases, specify the replica set name here

#replSet=setname

# maximum size in megabytes for replication operation log

#oplogSize=1024

# path to a key file storing authentication info for connections

# between replica set members

#keyFile=/path/to/keyfile

Don't forget to restart mongod service before trying to connect:

service mongod restart

From robomongo I used the following connection settings:

Connection Tab:

Address: [VPS IP] : 27017

SSH Tab:

SSH Address: [VPS IP] : 22

SSH User Name: [Username for sudo enabled user]

SSH Auth Method: Password

User Password: Supersecret

  1. First you have to run mongod command in your terminal make sure the command execute properly.

  2. Then in new terminal tab run mongo command.

  3. Then open Robomongo GUI and create a new connection with default setting.

Hopefully this will solve your problem

Cheers !!

Looks like Robomongo not yet works with Mongo 3

https://github.com/paralect/robomongo/issues/771

DonFabiolas

Currently, Robomongo 0.8.x doesn't work with MongoDB 3.0 :: - Mongodb & Robomongo: Can't connect (authentication) - https://github.com/paralect/robomongo/issues/766

For now, don't use Robomongo, for me, the best solution for me is to use mongochef : http://3t.io/mongochef/

Have encountered any specific error so far?! btw, here's what we do:

  • Create a new connection, set the name, IP address and the appropriate port

  • Setup authentication, if required

  • Optionally setup other available settings for SSL, SSH, etc.

  • Save and connect

If there is no authentication enabled (username/password) and still unable to connect. Just use localhost and default port. Click Test and Save, if test connection is successful.

Regards Jagdish

Tim Long

Robomongo 0.8.5 definitely works with MongoDB 3.X (mine version of mongoDB is 3.0.7, the newest one).

The following steps should be done to connect to mongodb server:

  1. Install Mongodb server (on Windows, Linux... your choice)
  2. Run Mongodb server. Don't set net.bind_ip = 127.0.0.1 if you want the client to connect to the server by server's own ip-address!
  3. Connect to the server from Robomongo with the server ip + set authentication if needed.

I exported from Studio 3T the following connection:

mongodb://youn-nosql-grej-test:xxxyyyzzz@youn-nosql-grej-test.documents.azure.com:10255/admin?3t.uriVersion=2&3t.certificatePreference=RootCACert:accept_any&3t.databases=admin&3t.connectionMode=direct&3t.useClientCertPassword=false&3t.connection.name=Grej-Test&readPreference=primary&ssl=true

And fill it in the following screens:

  1. Comment out /etc/mongod.conf file's bind_ip
  2. Download https://download.robomongo.org/0.9.0-rc9/windows/robomongo-0.9.0-rc9-windows-x86_64-0bb5668.exe
  3. Connection TAB:

    3.1 Name ( whatever )

    3.2 Address ( IP of server ) : Port number ( 27017 )

  4. SSH TAB ( I used my normal putty connection details )

    4.1 SSH Address : [ IP of server ]

    4.2 SSH User Name [ User Name ]

    4.3 User Password [ password ]

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!