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-12-24MongoDB资料:新手入门完全指南
- 2024-12-20go-zero 框架的 RPC 服务 启动start和停止 底层是怎么实现的?-icode9专业技术文章分享
- 2024-12-19Go-Zero 框架的 RPC 服务启动和停止的基本机制和过程是怎么实现的?-icode9专业技术文章分享
- 2024-12-18怎么在golang中使用gRPC测试mock数据?-icode9专业技术文章分享
- 2024-12-15掌握PageRank算法核心!你离Google优化高手只差一步!
- 2024-12-15GORM 中的标签 gorm:"index"是什么?-icode9专业技术文章分享
- 2024-12-11怎么在 Go 语言中获取 Open vSwitch (OVS) 的桥接信息(Bridge)?-icode9专业技术文章分享
- 2024-12-11怎么用Go 语言的库来与 Open vSwitch 进行交互?-icode9专业技术文章分享
- 2024-12-11怎么在 go-zero 项目中发送阿里云短信?-icode9专业技术文章分享
- 2024-12-11怎么使用阿里云 Go SDK (alibaba-cloud-sdk-go) 发送短信?-icode9专业技术文章分享