1
mongodb 콜렉션에서 '모두 찾기'를 시도하고 있습니다.mongo find()는 출력이없는 eval을 출력합니다.
나는 카운트 확인을받을 수 있습니다
mongo ip:port/database1 -u correctusername -p correctpassword
--authenticationDatabase admin --eval "db.getCollection('collection_123').count()"
을하지만
이mongo ip:port/database1 -u correctusername -p correctpassword
--authenticationDatabase admin --eval "db.getCollection('collection_123').find()"
그것은 나 또한 노력
MongoDB shell version: 2.4.0
connecting to: ip:port/database1
DBQuery: database1.collection_123 -> { }
생산을 조정할 때 find({})
그만큼 인증 오류가 아닌 것 같습니다. 첫 번째 쿼리는 작동하고 카운트를 생성합니다. 또한
mongo ip:port/database1 -u correctusername -p correctpassword
--authenticationDatabase admin
는 몽고 쉘에 들어가서
db.getCollection('collection_123').find()
그리고 올바른 JSON 출력을 볼 수 있습니다.
는
케어는? 이거 진짜 table123? – Oct
@Oct 컬렉션으로 업데이트했습니다. 테스트 컬렉션 일뿐입니다. – Michael