The data structure he supports is very loose and is a JSON-like Bjson format, so you can store more complex data types. The biggest feature of MONGO is that the query language he supports is very powerful, and its syntax is somewhat similar to an
Because the document structure of MongoDB is in the Bjson format (bjson full name: Binary JSON), and the Bjson format itself supports data in binary format, you can save the data in binary format of the file directly into the MongoDB document
First, the index base:
MongoDB's index is almost exactly the same as the traditional relational database, which includes some basic optimization techniques. Here is the command to create the index:
Copy Code code as follows:
>
MongoDB Foreign mirror access is very slow, so that the choice of MongoDB official website online installation is not reliable. Then, we can choose to install the MongoDB 2.6 binary release package.
Below we install the latest MongoDB 2.6.02 CentOS
By default, shutting down Shell,mongodb stops running.
If you want to run in the background, you can start by simply adding the--fork function.
You can add--logappend after the log path to prevent the log from being deleted.
Copy Code code
Read on an article, I believe we will know how to open MongoDB, this article on the next one of the additions and deletions, first when we use the same way to open MongoDB, suddenly
Dumbfounded, rub, unexpectedly opened, carefully observe the
Creating an index sometimes blocks new connections
When a connection is established with the MongoDB replica set, the driver first attempts to connect and validate each of the nodes that are not hidden in the cluster. If a node is a "down" state,
For example: MySQL installation configuration, there is a MySQL database, which has a user table, used to store users, as well as user rights, and MongoDB this most like relational database, there is no such a table.
One, to grasp the authority,
MongoDB Database features powerful! In addition to the basic query functionality, it provides powerful aggregation capabilities. Here's a quick introduction to count, distinct, and group.
1.count:
--In an empty collection, Count returns a
1, the security certification mode to start
Copy Code code as follows:
Bin/mongod?–auth?-dbpath/users/mc2/mongo/db-logpath/users/mc2/mongo/log.log &
You can enable authentication mode by starting the Mongod process with the –auth
In the most recent project, the log of the project was saved in JSON format for easy analysis. Before the log directly exists in the file, and MongoDB timely broke into my sight, so the log into the MongoDB. Log only save is meaningless, the most
The YII2 framework is an upgraded version of Yii, and this article explains how to connect the database MongoDB in the YII framework.
Add the following code to the folder common/config/main_local.php:
[
' MongoDB ' => ['
class ' =>
There is a project using the MongoDB database, query conditions have and also, according to thinkphp official manual, using a composite query (_complex), Getlastsql output query statement, found that the query condition is empty. Query with string
The example of this article describes the method of PHP operation MongoDB. Share to everyone for your reference. The specific analysis is as follows:
MongoDB database is a JSON format stored in the database, very suitable for a variety of
About this article
This article mainly summarizes some of the problems that have been encountered in transmitting JSON data since the site was written and the solutions currently adopted. The website database uses MongoDB, the back end is Python,
I. PrincipleThe principle of Zabbix monitoring MongoDB is through echo "Db.serverstatus ()" | MONGO Admin to see the status of MongoDBTwo Server Configuration1) Add global variables for MONGO# vim/etc/profile.d/mongo.shExport Path=/usr/local/mongodb/
MongoDB has three levels of distributed configuration: master-slave configuration, cluster configuration, and cluster shard configuration, we recommend using cluster configuration.Master-Slave configuration
Start the primary server:
A Mongodb1. One of the most popular MongoDB in the current NoSQL database is a high-performance, open-source, modeless document-based database that installs MongoDB for testingFirst time Installation1. Installing Mongodb-win32-i386-3.2.9-signed.msi2.
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