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

边栏推荐
- CockroachDB: The Resilient Geo-Distributed SQL Database 论文阅读笔记
- Explanation of characteristics of hydraulic slip ring
- More than one file was found with OS independent path ‘lib/armeabi-v7a/libyuv. so‘.
- Copy baby prompt: material cannot be empty. How to solve it?
- How to meet the requirements of source code confidentiality and source code security management
- Global and Chinese market of enterprise wireless LAN 2022-2028: Research Report on technology, participants, trends, market size and share
- More than one file was found with OS independent path ‘lib/armeabi-v7a/libyuv.so‘.
- Global and Chinese market for kitchen range hoods 2022-2028: Research Report on technology, participants, trends, market size and share
- 移动端常用解决方案
- 数字金额加逗号;js给数字加三位一逗号间隔的两种方法;js数据格式化
猜你喜欢
![[NLP Li Hongyi] notes](/img/8e/a51ca5eee638facd54270fb28d2fce.jpg)
[NLP Li Hongyi] notes

Unity project experience summary

Use and principle of Park unpark

Redis数据库的部署及常用命令

tar命令

第05天-文件操作函数

Use and principle of wait notify

Application and principle of ThreadPoolExecutor thread pool

Fluentd is easy to use. Combined with the rainbow plug-in market, log collection is faster

Summary of spanner's paper
随机推荐
Day 05 - file operation function
HCIP Day13
AcWing 886. Finding combinatorial number II (pretreatment factorial)
Distributed transactions - Solutions
Ebpf cilium practice (2) - underlying network observability
Rainbow combines neuvector to practice container safety management
[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
Distributed architecture system splitting principles, requirements and microservice splitting steps
复制宝贝提示材质不能为空,如何解决?
Global and Chinese market of solder wire 2022-2028: Research Report on technology, participants, trends, market size and share
Summary of spanner's paper
使用 Nocalhost 开发 Rainbond 上的微服务应用
Application and principle of ThreadPoolExecutor thread pool
複制寶貝提示材質不能為空,如何解决?
el-cascader回显失败;el-cascader回显不出来
And search: the suspects (find the number of people related to the nth person)
What can the points mall Games bring to businesses? How to build a points mall?
工业导电滑环的应用
Redis数据库的部署及常用命令
Redis database deployment and common commands