当前位置:网站首页>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;
边栏推荐
- Unity drags and modifies scene camera parameters under the editor
- Causes of short circuit of conductive slip ring and Countermeasures
- 2/15 (awk, awk conditions, awk processing design can perform additional tasks, and use awk array +for loop to realize advanced search)
- Global and Chinese market of 3D CAD 2022-2028: Research Report on technology, participants, trends, market size and share
- Unity项目心得总结
- QDataStream的简单读写验证
- Leetcode522- longest special sequence ii- hash table - String - double pointer
- Use and principle of wait notify
- Copy baby prompt: material cannot be empty. How to solve it?
- C WPF uses dockpanel to realize screenshot box
猜你喜欢
Unity项目心得总结
液压滑环的特点讲解
Use and principle of wait notify
Application and principle of ThreadPoolExecutor thread pool
Use of STM32 expansion board temperature sensor and temperature humidity sensor
使用 Nocalhost 开发 Rainbond 上的微服务应用
el-cascader回显失败;el-cascader回显不出来
Understand several related problems in JVM - JVM memory layout, class loading mechanism, garbage collection
How to select conductive slip ring material
2/15 (awk, awk conditions, awk processing design can perform additional tasks, and use awk array +for loop to realize advanced search)
随机推荐
Day 05 - file operation function
Global and Chinese market of 3D design and modeling software 2022-2028: Research Report on technology, participants, trends, market size and share
3D建模与处理软件简介 刘利刚 中国科技大学
C# wpf 使用DockPanel实现截屏框
Global and Chinese markets for soft ferrite cores 2022-2028: Research Report on technology, participants, trends, market size and share
轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
C WPF uses dockpanel to realize screenshot box
Distributed architecture system splitting principles, requirements and microservice splitting steps
Rainbond结合NeuVector实践容器安全管理
Floweable source code annotation (40) class delegation
Leetcode1497- check whether array pairs can be divided by K - array - hash table - count
小程序常用组件小结
Tcp/ip explanation (version 2) notes / 3 link layer / 3.2 Ethernet and IEEE 802 lan/man standards
导电滑环使用的注意事项
实战:redux的基本使用
In depth understanding of condition source code interpretation and analysis of concurrent programming
2/15 (awk, awk conditions, awk processing design can perform additional tasks, and use awk array +for loop to realize advanced search)
Flutter 实现每次进来界面都刷新数据
Rust hello-word
[ffmpeg] [reprint] image mosaic: picture in picture with wheat