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

边栏推荐
- 第05天-文件操作函数
- Explanation of characteristics of hydraulic slip ring
- How to start learning editing? Detailed analysis of zero basis
- HDU - 1069 Monkey and Banana(DP+LIS)
- LRU cache for leveldb source code analysis
- [Yugong series] February 2022 Net architecture class 005 ABP vNext Net core web application getting started configuration
- Global and Chinese market of digital badge 2022-2028: Research Report on technology, participants, trends, market size and share
- C WPF uses dockpanel to realize screenshot box
- Global and Chinese market of protection circuit modules 2022-2028: Research Report on technology, participants, trends, market size and share
- How to traverse massive data in redis
猜你喜欢

Principle, technology and implementation scheme of data consistency in distributed database

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

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

Application and principle of ThreadPoolExecutor thread pool

Thread process foundation of JUC

Software intelligence: the "world" and "boundary" of AI sentient beings in AAAs system

Memtable for leveldb source code analysis

复制宝贝提示材质不能为空,如何解决?

Rainbow combines neuvector to practice container safety management

STM32 expansion board digital tube display
随机推荐
Rust hello-word
AcWing 884. Gauss elimination for solving XOR linear equations
Flutter can refresh data every time the interface comes in
Txncoordsender of cockroachdb distributed transaction source code analysis
What can the points mall Games bring to businesses? How to build a points mall?
Like cloud functions
printk 调试总结
Some common commands of podman
Set集合详细讲解
[Yugong series] February 2022 Net architecture class 005 ABP vNext Net core web application getting started configuration
Set set detailed explanation
Introduction to 3D modeling and processing software Liu Ligang University of science and technology of China
Global and Chinese markets of superconductor 2022-2028: Research Report on technology, participants, trends, market size and share
使用 Nocalhost 开发 Rainbond 上的微服务应用
Global and Chinese market of broadband amplifiers 2022-2028: Research Report on technology, participants, trends, market size and share
如何创建一个根据进度改变颜色的进度条
QDataStream的简单读写验证
More than one file was found with OS independent path ‘lib/armeabi-v7a/libyuv. so‘.
第05天-文件操作函数
Global and Chinese market of digital badge 2022-2028: Research Report on technology, participants, trends, market size and share