当前位置:网站首页>Mongodb學習篇:安裝後的入門第一課
Mongodb學習篇:安裝後的入門第一課
2022-07-01 05:27: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;

边栏推荐
- [ffmpeg] [reprint] image mosaic: picture in picture with wheat
- Actual combat: gateway api-2022.2.13
- Software intelligence: the "world" and "boundary" of AI sentient beings in AAAs system
- Using nocalhost to develop microservice application on rainbow
- 了解 JVM 中几个相关问题 — JVM 内存布局、类加载机制、垃圾回收
- QDataStream的簡單讀寫驗證
- [RootersCTF2019]babyWeb
- 导电滑环使用的注意事项
- QT waiting box production
- Series of improving enterprise product delivery efficiency (1) -- one click installation and upgrade of enterprise applications
猜你喜欢

How to meet the requirements of source code confidentiality and source code security management

Leetcode316- remove duplicate letters - stack - greedy - string

Application of industrial conductive slip ring

LevelDB源码分析之LRU Cache

Detailed explanation of set

El cascade echo failed; El cascader does not echo

Set set detailed explanation

Single page application

工业导电滑环的应用

第05天-文件操作函数
随机推荐
Sqlplus connects using the instance name
Rainbow combines neuvector to practice container safety management
Global and Chinese market of protection circuit modules 2022-2028: Research Report on technology, participants, trends, market size and share
数字金额加逗号;js给数字加三位一逗号间隔的两种方法;js数据格式化
TypeORM 框架
QDataStream的簡單讀寫驗證
Tcp/ip explanation (version 2) notes / 3 link layer / 3.2 Ethernet and IEEE 802 lan/man standards
HCIP Day13
C WPF uses dockpanel to realize screenshot box
CockroachDB: The Resilient Geo-Distributed SQL Database 论文阅读笔记
轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
el-form表单新增表单项动态校验;el-form校验动态表单v-if不生效;
Rainbond结合NeuVector实践容器安全管理
RecycleView的一些使用
How to create a progress bar that changes color according to progress
Some common commands of podman
Ebpf cilium practice (2) - underlying network observability
Copy baby prompt: material cannot be empty. How to solve it?
2/15 (awk, awk conditions, awk processing design can perform additional tasks, and use awk array +for loop to realize advanced search)
Printk debugging summary