mongodb安装笔记【服务没有及时响应或控制请求】
mongodb安装笔记 --下面大部分都是参考网上资料,仅仅作为笔记使用 参考链接 Mongodb官网安装 Mongodb官网对比 相关文档 我的mongodb安装在[d:\Java\mongodb] 所以需要根目录手动创建文件夹【e:\data\db】 mongodb使用服务方式安装 D:\Java\mongodb\bin\mong
mongodb安装笔记
--下面大部分都是参考网上资料,仅仅作为笔记使用
参考链接
Mongodb官网安装
Mongodb官网对比
相关文档
我的mongodb安装在[d:\Java\mongodb]
所以需要根目录手动创建文件夹【e:\data\db】
mongodb使用服务方式安装
1 2 3 4 |
|
安装、删除服务指令
mongod --install
mongod --service
mongod --remove
mongod --reinstall
或者
1 |
|
启动服务
1 |
|
1 |
|
1 2 3 4 5 6 7 8 9 10 11 |
|
下面从官网摘抄下来的普通sql跟MongoDB的区别
Create and Alter
The following table presents the various SQL statements related totable-level actions and the corresponding MongoDB statements.
SQL Schema Statements | MongoDB Schema Statements | Reference | ||||||
---|---|---|---|---|---|---|---|---|
Copy after login |
Implicitly created on first insert() operation. The primary key_idis automatically added if_id field is not specified.
Copy after login However, you can also explicitly create a collection:
Copy after login |
Seeinsert() anddb.createCollection()for more information. | ||||||
Copy after login |
Collections do not describe or enforce the structure of itsdocuments; i.e. there is no structural alteration at thecollection level. However, at the document level, update() operations can add fields to existingdocuments using the$set operator.
Copy after login |
See the Data Modeling Concepts, update(), and$set for moreinformation on changing the structure of documents in acollection. | ||||||
Copy after login |
Collections do not describe or enforce the structure of itsdocuments; i.e. there is no structural alteration at the collectionlevel. However, at the document level, update() operations can remove fields fromdocuments using the$unset operator.
Copy after login |
See Data Modeling Concepts, update(), and$unset for more information on changing the structure ofdocuments in a collection. | ||||||
Copy after login |
Copy after login |
See ensureIndex()andindexes for more information. | ||||||
Copy after login |
Copy after login |
See ensureIndex()andindexes for more information. | ||||||
Copy after login |
Copy after login |
See drop() formore information. |
Insert
The following table presents the various SQL statements related toinserting records into tables and the corresponding MongoDB statements.
SQL INSERT Statements | MongoDB insert() Statements | Reference | ||||
---|---|---|---|---|---|---|
Copy after login |
Copy after login |
See insert() for more information. |
Select
The following table presents the various SQL statements related toreading records from tables and the corresponding MongoDB statements.
SQL SELECT Statements | MongoDB find() Statements | Reference | ||||||
---|---|---|---|---|---|---|---|---|
Copy after login |
Copy after login |
See find()for more information. | ||||||
Copy after login |
Copy after login |
See find()for more information. | ||||||
Copy after login |
Copy after login |
See find()for more information. | ||||||
Copy after login |
Copy after login |
See find()for more information. | ||||||
Copy after login |
Copy after login |
See find()for more information. | ||||||
Copy after login |
Copy after login |
See find()and$ne for more information. | ||||||
Copy after login |
Copy after login |
See find()and$and for more information. | ||||||
Copy after login |
Copy after login |
See find()and$or for more information. | ||||||
Copy after login |
Copy after login |
See find()and$gt for more information. | ||||||
Copy after login |
Copy after login |
See find()and$lt for more information. | ||||||
Copy after login |
Copy after login |
See find(),$gt, and $lte formore information. | ||||||
Copy after login |
Copy after login |
See find()and$regex for more information. | ||||||
Copy after login |
Copy after login |
See find()and$regex for more information. | ||||||
Copy after login |
Copy after login |
See find()andsort()for more information. | ||||||
Copy after login |
Copy after login |
See find()andsort()for more information. | ||||||
Copy after login |
Copy after login or
Copy after login |
See find()andcount() formore information. | ||||||
Copy after login |
Copy after login or
Copy after login |
See find(),count(), and$exists for more information. | ||||||
Copy after login |
Copy after login or
Copy after login |
See find(),count(), and$gt for more information. | ||||||
Copy after login |
Copy after login |
See find()anddistinct()for more information. | ||||||
Copy after login |
Copy after login or
Copy after login |
See find(),findOne(),andlimit()for more information. | ||||||
Copy after login |
Copy after login |
See find(),limit(), andskip() formore information. | ||||||
Copy after login |
Copy after login |
See find()andexplain()for more information. |
Update Records
The following table presents the various SQL statements related toupdating existing records in tables and the corresponding MongoDBstatements.
SQL Update Statements | MongoDB update() Statements | Reference | ||||
---|---|---|---|---|---|---|
Copy after login |
Copy after login |
See update(),$gt, and $set for moreinformation. | ||||
Copy after login |
Copy after login |
See update(),$inc, and $set for moreinformation. |
Delete Records
The following table presents the various SQL statements related todeleting records from tables and the corresponding MongoDB statements.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics





Recently, LG Display announced that its 27-inch 480Hz QHD gaming OLED panel has officially entered mass production. This panel has created a new high in refresh rate and response speed among OLED products. The 480Hz refresh rate is paired with a GtG grayscale response time of 0.02ms, which is a step further than the previous record of 0.03ms, bringing the ultimate experience to game types such as FPS and racing. . The new panel optimizes LG Display’s META Technology to improve the luminous efficiency of OLED materials. The image quality is enhanced and specular reflection is greatly reduced. The four-sided frameless design expands the field of view and brings an immersive experience. Pixel structure optimization WRGB pixel structure is optimized for gaming and document editing needs. Text display is clearer

According to news on August 3, according to Huawei’s official introduction, Huawei’s July Service Day has officially started, from August 3 to August 4. It is understood that Huawei’s service days are from the first consecutive Friday to Sunday of each month (if the weekend spans the month, it will be postponed to the next weekend). Huawei users who visit the store during the event can enjoy six exclusive benefits including free film stickers and free labor costs for repairs. Specifically: Huawei mobile phones: free film, cleaning, maintenance, and system upgrade services. Huawei tablets, laptops, wearables, earphones of designated models, and smart glasses: free appearance cleaning and maintenance services. In addition, during the event, users are not required to go to the store for equipment repairs. Pay labor fees and go to the store to purchase Huawei brand accessories, extended service packages, and personalized film products: enjoy a 10% discount on the recommended retail price. The repaired equipment cannot be repaired on the same day.

This article introduces how to configure MongoDB on Debian system to achieve automatic expansion. The main steps include setting up the MongoDB replica set and disk space monitoring. 1. MongoDB installation First, make sure that MongoDB is installed on the Debian system. Install using the following command: sudoaptupdatesudoaptinstall-ymongodb-org 2. Configuring MongoDB replica set MongoDB replica set ensures high availability and data redundancy, which is the basis for achieving automatic capacity expansion. Start MongoDB service: sudosystemctlstartmongodsudosys

This article describes how to build a highly available MongoDB database on a Debian system. We will explore multiple ways to ensure data security and services continue to operate. Key strategy: ReplicaSet: ReplicaSet: Use replicasets to achieve data redundancy and automatic failover. When a master node fails, the replica set will automatically elect a new master node to ensure the continuous availability of the service. Data backup and recovery: Regularly use the mongodump command to backup the database and formulate effective recovery strategies to deal with the risk of data loss. Monitoring and Alarms: Deploy monitoring tools (such as Prometheus, Grafana) to monitor the running status of MongoDB in real time, and

According to news from this site on July 16, Xiaomi has launched its Thanksgiving Season event today, providing preferential replacement and maintenance services for mobile phones, laptops, air conditioners, washing machines, range hoods and other accessories. The content of the activities organized by this site is as follows: The event time is from 10:00 on July 16, 2024 to 24:00 on July 25, 2024. Mobile phone battery replacement can be enjoyed at 20% off for 80 models, with official quality and original accessories. 12 models can enjoy a 20% discount on mobile phone back cover replacement starting from 79.2 yuan. Mobile phone back cover replacement, official accessories, starting from 68 yuan. It should be noted that after users place an order for the back cover replacement service on Xiaomi Mall, the color can be selected at the store. , the specific inventory is subject to the actual situation of the store. If the selected color is out of stock, there may be a delivery delay. Replace your laptop battery with a new one and enjoy 20% off on 14 models of laptops

It is impossible to view MongoDB password directly through Navicat because it is stored as hash values. How to retrieve lost passwords: 1. Reset passwords; 2. Check configuration files (may contain hash values); 3. Check codes (may hardcode passwords).

PiNetwork is about to launch PiBank, a revolutionary mobile banking platform! PiNetwork today released a major update on Elmahrosa (Face) PIMISRBank, referred to as PiBank, which perfectly integrates traditional banking services with PiNetwork cryptocurrency functions to realize the atomic exchange of fiat currencies and cryptocurrencies (supports the swap between fiat currencies such as the US dollar, euro, and Indonesian rupiah with cryptocurrencies such as PiCoin, USDT, and USDC). What is the charm of PiBank? Let's find out! PiBank's main functions: One-stop management of bank accounts and cryptocurrency assets. Support real-time transactions and adopt biospecies

Encrypting MongoDB database on a Debian system requires following the following steps: Step 1: Install MongoDB First, make sure your Debian system has MongoDB installed. If not, please refer to the official MongoDB document for installation: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/Step 2: Generate the encryption key file Create a file containing the encryption key and set the correct permissions: ddif=/dev/urandomof=/etc/mongodb-keyfilebs=512

SQL Delete Statements | MongoDB remove() Statements | Reference | ||||
---|---|---|---|---|---|---|
Copy after login |
Copy after login |
See remove()for more information. | ||||
Copy after login |
Copy after login | See remove()for more information. |