赞
踩
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 撒花
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。