search

Home  >  Q&A  >  body text

mongodb - 关于连接mongdb数据库的问题

mongodb://127.0.0.1:27017/club

这段代码应该是连接到本地主机端口号为27017的club数据库(如果不是的话,麻烦指正,我是新手),我想问一下本地启动mongodb数据库时,应该在哪创建club文件目录,对应的就是上面的代码连接到club数据库?

过去多啦不再A梦过去多啦不再A梦2757 days ago632

reply all(2)I'll reply

  • 给我你的怀抱

    给我你的怀抱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;

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-04-28 09:06:26

    mongo 127.0.0.1:27017/club

    reply
    0
  • Cancelreply