zoukankan      html  css  js  c++  java
  • xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

    # MongoDB Up and Going

    https://ide.c9.io/xgqfrms/mongodb

    # MongoDB 教程

    https://www.runoob.com/mongodb/mongodb-tutorial.html

    ```sh
    # start
    # server
    $ mongod --dbpath /System/Volumes/Data/data/db

    # stop
    $ mongod --shutdown
    # Ctrl + C
    # kill <mongod process ID>

    # Shut down the mongod from the mongo shell using the db.shutdownServer() method as follows:
    > use admin
    > db.shutdownServer()
    ```

    https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes/#stop-mongod-processes


    ```sh
    # client
    $ mongo

    # 查看所有数据库
    > show databases;
    > show dbs;

    > show dbs

    # 数据库不存在,则创建数据库,否则切换到指定数据库
    > use test

    > db.test.insert({"name":"xgqfrms"})

    # 创建集合,类似SQL数据库中的表
    > db.createCollection("table")

    # 查看集合
    > show collections

    > show tables

    # 删除集合
    > db.collection.drop()

    # 删除当前数据库
    > db.dropDatabase()

    ```

    https://zzk.cnblogs.com/my/s/blogpost-p?Keywords=MongoDB

  • 相关阅读:
    ZROI2018提高day9t1
    p2114 起床困难综合症
    EZOJ #78
    Linux JDK配置
    jps命令
    虚拟机 网卡模式配置
    redhat下yum命令安装(替换为centos yum命令)
    URL编码
    Query DSL(2)----Full text queries
    Query DSL(1)
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/6240543.html
Copyright © 2011-2022 走看看