当前位置:网站首页>Mongodb学习篇:安装后的入门第一课
Mongodb学习篇:安装后的入门第一课
2022-07-01 05:24:00 【HaanLen】
启动mongodb
进入安装mongodb的bin目录
mongod --dbpath D:\frontapplication\mongodb\data\db
输入地址http://localhost:27017/

此时说明mongodb服务已启动
在bin另开一个DOS窗口,启动服务窗口不要关闭!!
数据库相关操作命令
查看数据库
show dbs;

创建数据库
use note_list;
当数据库不存在时创建库,存在时则切换该数据库
查看当前数据库名
db;

可以看到新建的数据库不存在数据库中,如需查看需要往数据库插入一条数据
往数据库中插入一条数据命令
db.note_list.insert({
title:'Hello Vue,入门第一课',
date:'2022-03-01',
content: 'XXXXXX非常棒!'
});


创建集合
//db.createCollection(name, options)
db.createCollection('lists');
查看集合
show collections;

边栏推荐
- Redis database deployment and common commands
- 工业导电滑环的应用
- Flowable source code comment (XXXIX) task listener
- One click deployment of highly available emqx clusters in rainbow
- HCIP Day13
- Application and principle of ThreadPoolExecutor thread pool
- 数字金额加逗号;js给数字加三位一逗号间隔的两种方法;js数据格式化
- [Yugong series] February 2022 Net architecture class 005 ABP vNext Net core web application getting started configuration
- Distributed - summary list
- SSGSSRCSR区别
猜你喜欢

CockroachDB: The Resilient Geo-Distributed SQL Database 论文阅读笔记

Set set detailed explanation

Manually implement a simple stack

Usage and principle of synchronized

Set集合详细讲解

Mathematical knowledge: finding the number of divisors

Copy baby prompt: material cannot be empty. How to solve it?
![[RootersCTF2019]babyWeb](/img/b4/aa8f8e107a9dacbace72d4717b1834.png)
[RootersCTF2019]babyWeb

Design and application of immutable classes

And search: the suspects (find the number of people related to the nth person)
随机推荐
第05天-文件操作函数
Simple read / write verification of qdatastream
Txncoordsender of cockroachdb distributed transaction source code analysis
Use and principle of Park unpark
QT waiting box production
Design and application of immutable classes
Principle, technology and implementation scheme of data consistency in distributed database
智慧运维:基于 BIM 技术的可视化管理系统
小程序常用组件小结
Manually implement a simple stack
Set集合詳細講解
轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
Understand several related problems in JVM - JVM memory layout, class loading mechanism, garbage collection
How to traverse massive data in redis
使用 Nocalhost 开发 Rainbond 上的微服务应用
Global and Chinese market for instant messaging security and compliance solutions 2022-2028: Research Report on technology, participants, trends, market size and share
Distributed transactions - Solutions
Rust hello-word
Things generated by busybox
Global and Chinese market of 3D design and modeling software 2022-2028: Research Report on technology, participants, trends, market size and share