鍍金池/ 問答/數(shù)據(jù)庫  HTML/ MongoDB 連接報錯,折磨我一天了

MongoDB 連接報錯,折磨我一天了

D:mongodbbin>mongo.exe
MongoDB shell version v3.6.0
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.6.0
Server has startup warnings:
2017-12-16T23:50:58.764+0800 I CONTROL [initandlisten]
2017-12-16T23:50:58.764+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2017-12-16T23:50:58.765+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is
unrestricted.
2017-12-16T23:50:58.766+0800 I CONTROL [initandlisten]
2017-12-16T23:50:58.767+0800 I CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
2017-12-16T23:50:58.768+0800 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this s
erver.
2017-12-16T23:50:58.769+0800 I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to speci
fy which IP
2017-12-16T23:50:58.770+0800 I CONTROL [initandlisten] ** addresses it should serve responses from, or with
--bind_ip_all to
2017-12-16T23:50:58.771+0800 I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desire
d, start the
2017-12-16T23:50:58.773+0800 I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this wa
rning.
2017-12-16T23:50:58.774+0800 I CONTROL [initandlisten]
2017-12-16T23:50:58.775+0800 I CONTROL [initandlisten]
2017-12-16T23:50:58.775+0800 I CONTROL [initandlisten] ** WARNING: The file system cache of this machine is configure
d to be greater than 40% of the total memory. This can lead to increased memory pressure and poor performance.
2017-12-16T23:50:58.777+0800 I CONTROL [initandlisten] See http://dochub.mongodb.org/cor...
e
2017-12-16T23:50:58.778+0800 I CONTROL [initandlisten]

安了一天沒安上,還是報錯,求大神,
win7環(huán)境

回答
編輯回答
冷眸

其實你已經(jīng)安裝成功了

WARNING1: 創(chuàng)建管理員用戶或同時創(chuàng)建額外權限的用戶,在啟動服務時帶 “ --auth ” 參數(shù)即可
WARNING2: 綁定IP就好了,如果只是在本機調(diào)試就不用理會它了
WARNING3: 似乎只是影響服務器性能,沒發(fā)現(xiàn)其他影響

一般情況下解決警告1就可正常使用了

2017年8月30日 10:08
編輯回答
我以為

破windows要真是安裝不好,就直接重裝系統(tǒng):)

2017年11月9日 07:52
編輯回答
懷中人

首先這只是警告,不是錯誤。仔細閱讀警告的內(nèi)容,已經(jīng)很清楚了。這個實例監(jiān)聽的地址是localhost,遠程服務器無法連接到這個實例上(但是你自己從本機應該可以)。你可以通過bindIp來修改監(jiān)聽的地址。比如你的服務器地址是192.168.1.10,那應該在啟動時加上--bind_ip "127.0.0.1,192.168.0.10",如果你用配置文件的方式,應該修改bindIp那一段。

2018年3月12日 07:27