mongo shell not showing all dbs

时间:2015-10-30 23:33:47

标签: macos meteor mongodb-shell

Good Day. I've been developing with meteorJS which uses mongodb. No problems there. I've been using the mongo shell to access the database on my dev machine (osx 10.11). This is my first project with mongo and when the shell would load, it would connect to db.test and I'd always show dbs and get the list of database, then use myApp. Yesterday whenever I go into the shell and I type show dbs the only one shown is local 0.078GB. However my app is still working and pulling and pushing data to the database. I've checked the dbpath in the mongod.conf and that seems ok. I'm not entirely sure about the exact order of things, but two things where different (I'm not sure if these happened prior to the show dbs not showing everything or after, and I'm not sure which came first): when loading the mongo shell I was getting this error: WARNING: soft rlimits too low. Number of files is 256, should be at least 1000" I followed these directions which seemed to stop that error from appearing (https://github.com/basho/basho_docs/issues/1402 ) I use Meteor Toys and for the first time I update user.profile.companyName (which is a custom field within the standard profile from within the Meteor Toys widget. Just odd that the app can still access the database and collections, but that the mongo shell doesn't show. I've update mongod via brew upgrade mongodb from 3.0.2 to 3.0.7 to no avail. Any ideas?

2 个答案:

答案 0 :(得分:1)

如果你想使用普通的mongo控制台,你必须为meteor应用程序指定端口为3001而不是默认的27017.否则只需键入meteor mongo并以这种方式连接就会简单得多。然后,您可以输入' show collections'它会像平常一样展示它们。

答案 1 :(得分:0)

MongoDB不显示数据库,除非最少有一个包含文档的集合。 Refer to this link

相关问题