Directly on the code
java.util.list mongohostlist = new arraylist ();
Mongohostlist.add (New ServerAddress ("192.168.1.102", 27017));
Mongo mg = new Mongo (mongohostlist);
DB db = Mg.getdb ("recommend");
if (!db.authenticate ("Jianp", "1
1. Download installation packageHttps://www.mongodb.com/download-center#atlasGo straight to the official website and find your own version.
[Root@liugepython3 mongodb]# wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.6.4.tgz
2. Extract
1. Download MongoDB Windows version, there are 32-bit and 64-bit version, download according to the system, download address: http://www.mongodb.org/downloads
2. Extract to D:/mongodb
3. Create a storage location for your database files, such as
Robomongo,mongo Visualization Tools
Wow, actually she is three (sinister face).You see, the interface is fresh, let people feel relaxed (shy), who still want to Win+r+mongo ah ah.Oh, yes, go on ... Say the right thing.
In here ... Using SQL to
Http://www.cnblogs.com/xiaolai/p/3401289.html
MongoDB paging query is done by limit (), skip (), sort (), which is a combination of three functions for paging queries.
Here's my test data.
Db.test.find (). Sort ({"Age": 1});
The first of these
This article is reproduced to: http://blog.csdn.net/congcong68/article/details/47624221
one. Brief introduction
Springdata MongoDB provides org.springframework.data.mongodb.core.MongoTemplate to the MongoDB find operation, we last introduced a
These days to learn a bit mongodb, now take a note.
1. First Installation
(preferably installed in the root directory, and then manually build a DB folder)
Installation is complete because MongoDB is required to start manually, locate the Bin
Last blog We lied about what is nosql. We have a comprehensive understanding of NoSQL, starting from this blog, will lead everyone into the MongoDB world, we begin to introduce MongoDB.
What is MongoDB?
We look directly at the MongoDB official
The above integrates MongoDB into spring and injects the MongoDB template into the DAO layer.So let's do some of the following.Optionmongo.java.DB db=null;dbcollection Coll=null; Db=mongotemplate.getdb (); Coll= db.getcollection
Gossip lessFind the product information----The price is less than 200 contains the product name, the goods number, the price, adds the information and so onDb.goods.find ({"Shop_price": {$lt: $}},{"Shop_price":1,"Goods_name":1,"goods_id":1,"Add_time"
First, IntroductionMongoDB is written by the C + + language and is an open source database system based on distributed file storage. MongoDB is designed to provide scalable, high-performance data storage solutions for Web applications. MongoDB
Win7 install MongoDB system environment: win7 64-bit Database: mongodb-win32-i386-v2.4 the first step of course is to download http://www.mongodb.org/downloadsstep 2 unzip the mongodb-win32-i386-v2.4-latest.zip such as unzip to D: \ installsofts \
Simple translation.
Original article: http://www.mongodb.org/display/DOCS/Full+Text+Search+in+Mongo
MongoDB adds an array of tags to implement the tag function ).
OBJ = {Name: "Apollo ",Text: "Some text about Apollo moon landings ",Tags: [
According to the study of the official documentation, if two copies of data are required in the RS mode, Arbiter must be used, because if there are only two copies, therefore, the MongoDB election policy cannot determine which is primary and which
5. More commands
DB. adduser (username, password) Add User
DB. Auth (usrename, password) sets database connection Verification
DB. clonedatabase (fromhost) clone a database from the target serverDB. commandhelp (name) returns the help for the
Here I use centos as its running carrier.
1. Download MongoDB Linux version (note the difference between 32-bit and 64-bit),: http://www.mongodb.org/downloads
2. Put the downloaded MongoDB Installation File mongodb-linux-i686-1.6.5.tgz
It is inconvenient to run mongod -- dbpath D:/MongoDB/Data command line to start MongoDB every time. Just like MySQL without installation, I want to use it as a Windows service, this makes it much easier.
D: \ MongoDB \ bin> mongod -- logpath D:
Each MongoDB server supports multiple databases. Each database is relatively independent. For security purposes and convenience of management, the database data is also stored independently.
Mongo metadata
In the MongoDB database, the
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