This is mainly about the bottom of my package, does not involve MongoDB installation, start-up, visual query and other things, will be accompanied by a number of reference addresses for everyone to study together. There are currently two main
1. Download the Windows version of the MongoDB database
Download the MongoDB version of Windows to the official download page, 32-bit or 64-bit to choose from your own situation
Http://www.mongodb.org/downloads
2. Installation Preparation
Generally take the first method, directly transfer files, the second method suitable for the generation of data not saved to the local upload but directly to the binary system to MongoDB, the third way is to directly upload the form of the file into
MongoDb Replica set solves the problem of fault tolerance and single point of failure, but the storage and withstanding capacity of a single machine is limited, and sharding is generated for mass storage and dynamic expansion. This has the replica
When you use MongoDB, you may encounter problems that cause clients to not connect because the number of mongod connections is full. The maximum number of Mongod connections is specified by Net.maxincomingconnections, with a default value of 1000000,
Command-line query:
1, you can use. * To fuzzy query, the following is the query surname Chen user.
Db.customers.find ({name:/Chen */i});2, also can not carry * number
Db.fs.files.find ({filename:/install_mongo.sh/i})
PHP Query:
$query =array ("
Master/slave master-slave replicationmaster-slave replication MongoDB a common way, if you want to achieve a master-slave replication should have at least two MongoDB instance, one is responsible for the client request as the primary node, and the
TODO:MONGODB MySQL Database backup1. MongoDB Using command BackupMongodump for the entire database backup, the main use of the command parameters:
-D database to back up
-O Output path
./mongodump–d Databasename–o/data/dbbak
-------------------mongodb Corresponding SQL statement-------------------1, Create and alter 1, sql: CREATE TABLE users ( ID mediuminty not NULL auto_increment, &N Bsp user_id varchar (+), Age number,
Today in the docking interface encountered some problems, because in order to facilitate the verification interface to write the right is to the database inside of some of their own data, the beginning of the use of the joy, and later encountered an
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
Document Purposein the Install Mongodb application on Linux system and set basic security permissions to ensure database securityBasic KnowledgeMongoDB is based on a database for Distributed file storage . Written by the C + + language. Designed
Join the MongoDB service to random start vi/etc/rc.local use the VI Editor to open the configuration file and add the following line of code to it/usr/local/mongodb/bin/mongod-dbpath=/usr/local/ mongodb/data/db--fork--port
1. Export Database/backup:@echo offf:cd F:\software1\mongdb\mongodb-win32-x86_64-3.0. 0 127.0. 0.1:27017 -D db-o F:\software1\mongdbDo not explain, modify the path information can be used directly;2. Restore the backed up database:@echo offf:cd
We know that MySQL will need us to set a database default username and password when installing,MongoDB is no exception, but MongoDB is the default does not set access restrictions, You do not need to enter a user name and password to access, but
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
Mongdodb instance-"Database-" collection-"Document-" field (Key/value pair)Bin execution./mongod Startup & Background Boot./mongo into MongoDB shell Many of these commands resemble MySQL show DBS (view database)Start Error:/data/db/mongod.lock is
Recently, the security team detected that some Alibaba Cloud users have unauthorized access to the MongoDB database. This vulnerability is harmful and can easily cause database leaks. To ensure the security of your business and applications, you
Creating an index sometimes blocks new connections.When establishing a connection with the mongodb replica set, the driver first tries to connect and verify each non-hidden node in the cluster. If a node is in the "down" status, it will be skipped.
Sort by sort, which is equivalent to order by. The ascending order is represented by 1, and the descending order is represented by-1.For example, sort by age field in ascending order: The code is as follows:Copy code Db. user. find (). sort
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service