当前位置:网站首页>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;

边栏推荐
- Web Security (x) what is OAuth 2.0?
- [NLP Li Hongyi] notes
- Tar command
- Causes of short circuit of conductive slip ring and Countermeasures
- 液压滑环的特点讲解
- Summary of spanner's paper
- AcWing 884. Gauss elimination for solving XOR linear equations
- What can the points mall Games bring to businesses? How to build a points mall?
- Use of STM32 expansion board temperature sensor and temperature humidity sensor
- Global and Chinese markets of InGaAs APD arrays 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢

One click deployment of highly available emqx clusters in rainbow

Leetcode top 100 question 2 Add two numbers
![[RootersCTF2019]babyWeb](/img/b4/aa8f8e107a9dacbace72d4717b1834.png)
[RootersCTF2019]babyWeb

LRU cache for leveldb source code analysis

C# wpf 使用DockPanel实现截屏框

提高企业产品交付效率系列(1)—— 企业应用一键安装和升级

Series of improving enterprise product delivery efficiency (1) -- one click installation and upgrade of enterprise applications

液压滑环的特点讲解

Copier le matériel de conseils de bébé ne peut pas être vide, comment résoudre?

eBPF Cilium实战(2) - 底层网络可观测性
随机推荐
数字金额加逗号;js给数字加三位一逗号间隔的两种方法;js数据格式化
Set集合詳細講解
导电滑环使用的注意事项
More than one file was found with OS independent path ‘lib/armeabi-v7a/libyuv.so‘.
busybox生成的东西
C# wpf 使用DockPanel实现截屏框
[SRS] use of Vhost isolated stream: push / pull Stream Address
Worried about infringement? Must share copyrightless materials on the website. Don't worry about the lack of materials for video clips
小程序常用组件小结
Set set detailed explanation
Tcp/ip explanation (version 2) notes / 3 link layer / 3.2 Ethernet and IEEE 802 lan/man standards
Global and Chinese markets of Ethernet communication modules 2022-2028: Research Report on technology, participants, trends, market size and share
Mathematical knowledge: finding the number of divisors
Youqitong [vip] v3.7.2022.0106 official January 22 Edition
How to hide browser network IP address and modify IP internet access?
複制寶貝提示材質不能為空,如何解决?
Dynamic verification of new form items in El form; El form verifies that the dynamic form V-IF does not take effect;
Leetcode316- remove duplicate letters - stack - greedy - string
Day 05 - file operation function
3D建模與處理軟件簡介 劉利剛 中國科技大學