简体   繁体   English

MongoDb远程服务器

[英]MongoDb Remote Server

I got a work of node.js and mongodb. 我得到了node.js和mongodb的工作。 While running node.js it gives error of permission denied. 在运行node.js时,它会给出权限被拒绝的错误。

For going alternatively when I tried to connect to remote server 当我尝试连接到远程服务器时可供选择

You are trying to access MongoDB on the native driver port. 您正在尝试在本机驱动程序端口上访问MongoDB。 For http diagnostic access, add 1000 to the port number... 对于http诊断访问,请在端口号上添加1000 ...

I just want to reach to the REMOTE DB of client so that I can configure it on local end and experiment things..... 我只想访问客户端的REMOTE DB,以便可以在本地配置它并进行实验。

Thanks 谢谢

The error message means that you have tried to use a web browser to connect to the MongoDB native port, eg: 该错误消息表示您已尝试使用Web浏览器连接到MongoDB本机端口,例如:

http://localhost:27017

If you want to use the MongoDB interactive shell to try database commands, you need to use the command line mongo : 如果要使用MongoDB交互式外壳程序来尝试数据库命令,则需要使用命令行mongo

$ mongo

MongoDB shell version: 2.0.6
connecting to: test
> 

mongo will connect to localhost:27017 by default. mongo默认情况下将连接到localhost:27017。 You can also specify a host and port, eg: 您还可以指定主机和端口,例如:

mongo localhost:27017

The mention of connecting by adding 1000 to the port number is referring to the MongoDB simple REST interface which is a read-only administrative interface accessible via a web browser: 提及通过在端口号上添加1000进行连接是指MongoDB 简单REST接口 ,该接口是可通过Web浏览器访问的只读管理接口:

http://localhost:28017/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM