1. Download installation package
wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.8.2.tgzUnzip the compressed package after the download is completeTar zxf mongodb-linux-i686-1.8.2.tgz
2. Installation Preparation
Move MongoDB to
First, download, install the corresponding version
The website downloads the following address:
Www.mongodb.org/downloads
#通过CURL下载
Curl-o https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1404-3.2.0.tgz
#解压
tar -ZXVF
First, the common command
1. Help View command Prompt
Help
Db.help ();
Db.yourColl.help ();
Db.youColl.find (). Help ();
Rs.help ();
2. Switch/CREATE Database
Use Yourdb; The current database is created automatically when a
To back up a database,
Mongorestore-d db/path/to/back_up
For example:
mongodump-d Bookstore-o/data01/db_backup/
This command will dump all of the DB collectionrecover data from a backup folder
Mongorestore-d
MongoDB has been the most popular NoSQL, and according to Db-engines ranking the latest ranking, now MongoDB has defeated PostgreSQL leaped to the fourth place in the database ranking, after Oracle, MySQL and Microsoft SQ L Server, this article
MongoDB is a powerful, flexible, scalable way to store data. It expands the many useful features of relational databases, such as secondary indexes, range queries, and sorting. MongoDB is rich in functionality, such as built-in support for MapReduce
MongoDB IntroductionMongoDB is a product between relational database and non relational database, and is the most powerful and relational database in the relational database. The data structure he supports is very loose and is a JSON-like Bjson
Download path: Http://downloads.mongodb.org/win32/mongodb-win32-i386-1.7.0.zip
Put a DB folder I was put to D disk, path: Ddb
Extract Mongodb-win32-i386-1.7.0.zip rename it to MongoDB put it in D disk
Open cmd input: d:mongodbbinmongod.exe–dbpath=
Before we discussed the MongoDB "adding and deleting", to know that our additions and deletions are inseparable from the query expression, so the query expression in MongoDB is very important. About the query actually we just introduced to a small
MongodbThe difference between 1.mongodb and other NoSQL databasesWe should have been exposed to Redis or memcached, they belong to the Key-value database, they use the hash algorithm to correlate, can achieve fast query purposes.While MongoDB is a
Original address: Https://serholiu.com/python-mongodbThese days in the study of Python web development, so prepare to do a blog to practice practiced hand, of course, just practiced hand, blog has wordpress such a good thing, why still build their
1. Update the documents in the collection with the following syntax:Db.collection.update (Criteria,objnew,upsert,multi)Parameter description:Criteria: The object used to set the query criteriaObjnew: An object for setting up updated contentUpsert:
You can use modifiers to modify a document, such as adding or deleting a document's key value. Using the modifier first to navigate to a document and then add the appropriate modification options, you need to use the UPDATE statement1. Modify the
Back to CatalogToday we are going to talk about technical points, when we design the MONGODB data model, if the property is an array or a collection type, we need to initialize it for the model when it is initialized, otherwise it will be stored as
I. Software environment (version not required) PHP v5.6 extension: MongoDB nginx v1.11 MongoDB v3.2Note: MongoDB extensions must be installedIi. Connection $client = new Mongoclient ($server, $option);$server variable is a string that describes the
Assume that the basic data is:{"Name": "cb", "data": 0 ,}Sometimes, to make full use of multiple cores, multiple node processes are enabled at the same time. However, if some code involves operations on mongodb, the following occurs.Ideally, the
View all data tables> Use ChatRoomSwitched to db ChatRoom> Show collectionsAccountChatSystem. indexesSystem. users Create a data table> Db. createCollection ("Account "){"OK": 1} > Db. createCollection ("Test", {capped: true, size: 10000}) {"OK": 1}{
1. Install mongodbLet's skip this step. Let's go to linux/47932.htm"> Centos to install MongoDB.2. Create a databaseUse ttIn this way, a database is created. If you leave the database without any operations, the database will be deleted by the
Nginx automatic startup scriptSave the following script as an nginx file and put it in/etc/init. d/nginxThen you can use/Etc/init. d/nginx start command to start nginx/Etc/init. d/nginx stop command to stop nginx/Etc/init. d/nginx restart command
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.