这个论坛的新手,对mongodb来说,我的目标是自动化从计算机客户端上的Linux BATCH到服务器的数据库创建。
conn = new mongo(); "returns OK"
db = conn.getDB("admin"); "returns OK"
db.runCommand( { use NewDatabase } ) "returns *NOK* , this is not the good syntax "
Run Code Online (Sandbox Code Playgroud)
在Shell Helper中找不到方法,或者我在mongodb帮助中错过了它:http : //docs.mongodb.org/manual/tutorial/write-scripts-for-the-mongo-shell/
有解决方案还是我必须使用Py -Pymongo或其他语言?
谢谢,对不起我的第一篇文章我不是一个很好的文章。