0
任何想法为什么collection
未显示在结果中?我给自己定lastmanstanding
作为当前db
的使用mongodb成功导入后未显示新集合
[host repo]\> mongoimport --db $OPENSHIFT_APP_NAME --collection players --drop --host $OPENSHIFT_MONGODB_DB_HOST --port $OPENSHIFT_MONGODB_DB_PORT --username $OPENSHIFT_MONGODB_DB_USERNAME --password $OPENSHIFT_MONGODB_DB_PASSWORD --file db/primer-dataset-players.json --jsonArray
connected to: 127.2.202.130:27017
Sun Oct 18 11:15:19.789 dropping: MyDatabaseName.players
Sun Oct 18 11:15:19.796 imported 3 objects
[lastmanstanding-bobbyrne01.rhcloud.com repo]\> mongo
MongoDB shell version: 2.4.9
connecting to: 127.2.202.130:27017/admin
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
> set MyDatabaseName
set MyDatabaseName to true
> show collections
system.indexes
system.users
内容db/primer-dataset-players.json
..
[
{
"name": "bobbyrne01",
"id": 21
},
{
"name": "Someone",
"id": 55
}
]
你可能想'使用,而不是'设置MyDatabaseName' – JohnnyHK
@JohnnyHK奏效,谢谢MyDatabaseName'。 – bobbyrne01