MongoDB compress 链接不上远程虚拟机centos服务器mongo
2022/1/27 19:17:01
本文主要是介绍MongoDB compress 链接不上远程虚拟机centos服务器mongo,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
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.
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
链接OK 撒花
这篇关于MongoDB compress 链接不上远程虚拟机centos服务器mongo的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-15SendGrid 的 Go 客户端库怎么实现同时向多个邮箱发送邮件?-icode9专业技术文章分享
- 2024-11-15SendGrid 的 Go 客户端库怎么设置header 和 标签tag 呢?-icode9专业技术文章分享
- 2024-11-12Cargo deny安装指路
- 2024-11-02MongoDB项目实战:从入门到初级应用
- 2024-11-01随时随地一键转录,Google Cloud 新模型 Chirp 2 让语音识别更上一层楼
- 2024-10-25Google Cloud动手实验详解:如何在Cloud Run上开发无服务器应用
- 2024-10-24AI ?先驱齐聚 BAAI 2024,发布大规模语言、多模态、具身、生物计算以及 FlagOpen 2.0 等 AI 模型创新成果。
- 2024-10-20goland工具下,如修改一个项目的标准库SDK的版本-icode9专业技术文章分享
- 2024-10-17Go学习:初学者的简单教程
- 2024-10-17Go学习:新手入门完全指南