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

边栏推荐
- [data recovery in North Asia] a data recovery case of raid crash caused by hard disk drop during data synchronization of hot spare disk of RAID5 disk array
- Global and Chinese market of enterprise wireless LAN 2022-2028: Research Report on technology, participants, trends, market size and share
- Global and Chinese market of search engine optimization (SEO) software 2022-2028: Research Report on technology, participants, trends, market size and share
- Using nocalhost to develop microservice application on rainbow
- [RootersCTF2019]babyWeb
- And search: the suspects (find the number of people related to the nth person)
- AcWing 885. Find the combination number I (recursive preprocessing)
- Application of industrial conductive slip ring
- Global and Chinese market of 3D CAD 2022-2028: Research Report on technology, participants, trends, market size and share
- Ebpf cilium practice (2) - underlying network observability
猜你喜欢

CockroachDB 分布式事务源码分析之 TxnCoordSender

Leetcode522- longest special sequence ii- hash table - String - double pointer
![Is there any good website or software for learning programming? [introduction to programming]?](/img/ae/68a5880f313c307880ac80bd200530.jpg)
Is there any good website or software for learning programming? [introduction to programming]?

eBPF Cilium实战(2) - 底层网络可观测性

Leetcode316- remove duplicate letters - stack - greedy - string

tar命令

Redis database deployment and common commands

LevelDB源码分析之memtable

轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷

El cascade echo failed; El cascader does not echo
随机推荐
Mathematical knowledge: finding the number of divisors
使用 Nocalhost 开发 Rainbond 上的微服务应用
C WPF uses dockpanel to realize screenshot box
Single page application
Global and Chinese market of mainboard 2022-2028: Research Report on technology, participants, trends, market size and share
0xc000007b the application cannot start the solution normally (the pro test is valid)
数字金额加逗号;js给数字加三位一逗号间隔的两种方法;js数据格式化
Global and Chinese market of digital badge 2022-2028: Research Report on technology, participants, trends, market size and share
Copier le matériel de conseils de bébé ne peut pas être vide, comment résoudre?
Global and Chinese markets of InGaAs APD arrays 2022-2028: Research Report on technology, participants, trends, market size and share
tar命令
了解 JVM 中几个相关问题 — JVM 内存布局、类加载机制、垃圾回收
QDataStream的簡單讀寫驗證
Global and Chinese market of high-end home theater 2022-2028: Research Report on technology, participants, trends, market size and share
Tcp/ip explanation (version 2) notes / 3 link layer / 3.2 Ethernet and IEEE 802 lan/man standards
Unity项目心得总结
[data recovery in North Asia] a data recovery case of raid crash caused by hard disk drop during data synchronization of hot spare disk of RAID5 disk array
[ffmpeg] [reprint] image mosaic: picture in picture with wheat
Sqlplus connects using the instance name
Lock free concurrency of JUC (leguan lock)