MongoDB Gridfs File System
Practical Exercises
1. View the mongofile help document with the –help option
2. Put {FileName} through mongofile-h {Ip:port}-d {CollectionName}
where the-h option specifies the host name and the port number, the-d
Zabbix Monitoring MongoDB
Environment
Linux Server
Configuration
MongoDB monitoring is also the use of script monitoring, mainly with the MONGO command. Monitoring Script mongodb.sh
#!/bin/bash
index=$ (echo $@ | tr "".)
Status=$ (echo
MongoDB and MySQL, each update of MySQL will be directly written to the hard disk, but MONGO will not, as a memory database, data operations will be written to the memory, and then to persist to the hard drive, then MONGO how to persist it?
At
Mycat as a database middleware also has some problems, in the use of the process will inevitably encounter a variety of problems, based on this we will be related to the issue of a record for the FAQ to view. The following questions are proposed for
MongoDB security access control, domestic publishing books, online find Bowen are all using db.adduser (Username,password) to increase users. The execution of the secondary method in MongoDB 3.0 will cause an error.
elevation information indicates
Classes that are @entity annotations must have a unique @Id value, which is stored in the id attribute of the MongoDB database, which is a required index. Like in the Hotel class:
@Entity
public class hotel{
@Id
Private ObjectId ID;
.....
}
References: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/
The steps are as follows:
1. Download mongodb:http://www.mongodb.org/from the website
Because now 2.0 has been released, so here is the MongoDB 2.0.6
2. After
DBObject o= (dbobject) Json.parse ("{groups.groupname: ' group1 '}");
DBObject o2= (dbobject) Json.parse ("{groups.size:0}");
This extra part is filed selection, for 0 you see the result inside there is no this filed, if 1 is only this filed is
Connection: http://blog.csdn.net/puncha/article/details/12974777
MONGDB Free management tools very few, finally found 2, the first is based on the web, the operation is also more convenient:
Address: https://code.google.com/p/mongo-vision/
I
The $type operator is based on the Bson type to retrieve the matching data type in the collection and returns the result.
The types that can be used in MongoDB are shown in the following table:
We used the database name "Runoob", our collection
Basic Operation command Show DBS//View all libraries using test//Use library without words automatically create show collections//view created table add Db.test_collection.insert (); Key value pair JSON data for (i=3;iDb.test.find ({$text: {$search:
Today, a group of brothers asked me the MongoDB collection corresponding file is which, this problem I have not viewed, to the MySQL file is easy to distinguish the way to save, but MongoDB is not so, save the file as followsThe file name doesn't
All data are not the same.
First look at skip and limit, when the two are used together, regardless of their position order, default first skip, then limit.
The following figure:
Look at the sort, "6" statement, my data is sorted. After that,
background
Recently the business MONGO upgrade, because the need to adjust the business code and offline testing, the work lasted one months before the results of the phase. Version upgrade be sure to make a version upgrade on the production
MongoDB ShardShardingIn MongoDB there is another cluster, that is, the Shard technology, can meet the requirements of a large number of MONGODB data volume growth.When MongoDB stores massive amounts of data, a machine may not be enough to store data,
MongoDB version is 4.0.11. The core idea is:Create an administrator rights user in the Admin library,The user then assigns the Operation library data to other libraries through this administrator privilege.2. Steps and precautions are as follows:①
When the amount of data is low, the query is fast, but when the data is large, the query becomes very slow, in MongoDBView Index> db.test_collection.getIndexes ()[ { "V": 2, "key" : { "_id": 1 }, " Name ":"
Mongodb
PS a lot of MongoDB are not set a password, the default MongoDB is not set the password, halo
$type operatorThe query type uses theGets the title value of the Col collection as a string type documentdb.col.find(title: {$type: 2}
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