mongodb://127.0.0.1:27017/club
这段代码应该是连接到本地主机端口号为27017的club数据库(如果不是的话,麻烦指正,我是新手),我想问一下本地启动mongodb数据库时,应该在哪创建club文件目录,对应的就是上面的代码连接到club数据库?
给我你的怀抱2017-04-28 09:06:26
mongo -h 127.0.0.1 --port 27017 -d club
This command is executed on the Linux server. You can connect to the mongo database, and then use mongo related commands to operate the database;
If you use java development, you can use jmongo. Connect to mongodb;
If you use python to develop, you can use pymongo to connect to mongodb;