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

边栏推荐
- Unit testing with mongodb
- [RootersCTF2019]babyWeb
- Vmware workstation network card settings and three common network modes
- Copier le matériel de conseils de bébé ne peut pas être vide, comment résoudre?
- Use of STM32 expansion board temperature sensor and temperature humidity sensor
- 智慧运维:基于 BIM 技术的可视化管理系统
- eBPF Cilium实战(2) - 底层网络可观测性
- Floweable source code annotation (40) class delegation
- 如何创建一个根据进度改变颜色的进度条
- Worried about infringement? Must share copyrightless materials on the website. Don't worry about the lack of materials for video clips
猜你喜欢

Memtable for leveldb source code analysis

Distributed architecture system splitting principles, requirements and microservice splitting steps

Causes of short circuit of conductive slip ring and Countermeasures

Sqlplus connects using the instance name

Use of STM32 expansion board temperature sensor and temperature humidity sensor

Detailed explanation of distributed global unique ID solution

第05天-文件操作函数

Lock free concurrency of JUC (leguan lock)

Usage and principle of synchronized

TypeORM 框架
随机推荐
Global and Chinese market of protection circuit modules 2022-2028: Research Report on technology, participants, trends, market size and share
Go learning notes (5) basic types and declarations (4)
Variable binding and deconstruction for rudimentary rust
Usage and principle of synchronized
Leetcode1497- check whether array pairs can be divided by K - array - hash table - count
Set集合详细讲解
eBPF Cilium实战(2) - 底层网络可观测性
Actual combat: basic use of Redux
tar命令
Detailed explanation of distributed global unique ID solution
How to start learning editing? Detailed analysis of zero basis
使用 Nocalhost 开发 Rainbond 上的微服务应用
And search: the suspects (find the number of people related to the nth person)
实战:redux的基本使用
Lock free concurrency of JUC (leguan lock)
What can the points mall Games bring to businesses? How to build a points mall?
Some common commands of podman
Worried about infringement? Must share copyrightless materials on the website. Don't worry about the lack of materials for video clips
0xc000007b the application cannot start the solution normally (the pro test is valid)
[RootersCTF2019]babyWeb