当前位置:   article > 正文

MongoDB compress 链接不上远程虚拟机centos服务器mongo_mongodb compass 连接不上

mongodb compass 连接不上

1、最近在学习MongoDB 再使用,mongoDBcompress 链接时发现 一直链接不上 提示 connect ECONNREFUSED
2、输入mongo 启动client链接时突然发现

2022-01-26T23:35:48.479+0800 I  CONTROL  [initandlisten] ** WARNING: This server is bound to localhost.
2022-01-26T23:35:48.479+0800 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server.
2022-01-26T23:35:48.479+0800 I  CONTROL  [initandlisten] **          Start the server with --bind_ip <address> to specify which IP 
2022-01-26T23:35:48.479+0800 I  CONTROL  [initandlisten] **          addresses it should serve responses from, or with --bind_ip_all to
2022-01-26T23:35:48.479+0800 I  CONTROL  [initandlisten] **          bind to all interfaces. If this behavior is desired, start the
2022-01-26T23:35:48.479+0800 I  CONTROL  [initandlisten] **          server with --bind_ip 127.0.0.1 to disable this warning.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

Remote systems will be unable to connect to this server.这句的意思是远程系统是不能链接到这个服务的。然后一搜索 发现有博客

https://blog.csdn.net/Hhalcyon/article/details/105417406?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522164321338416780271923479%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=164321338416780271923479&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_ecpm_v1~rank_v31_ecpm-1-105417406.pc_search_result_cache&utm_term=This+server+is+bound+to+localhost.+++++++Remote+systems+will+be+unable+to+connect+to+this+server.+++++++++Start+the+server+with±-bind_ip+%3Caddress%3E+to+specify+which+IP++++++++++addresses+it+should+ser&spm=1018.2226.3001.4187

3、然后使用命令

mongod --dbpath /data/db --port 27017 --bind_ip 0.0.0.0 --logpath /data/db/mongod.log --fork
  • 1

链接OK 撒花

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/407728
推荐阅读
相关标签
  

闽ICP备14008679号