The author uses the MONGO drive is MgO, this use more people, the document is also quite complete
Website address: Http://labix.org/mgo
Document Address: Https://godoc.org/labix.org/v2/mgo
Source Address: Https://github.com/go-mgo/mgo
1. MgO Package Installation
go get gopkg.in/mgo.v2
But it looks like it's not going to be downloaded from gopkg.in, just a detour, download it from GitHub.
go get github.com/go-mgo/mgo
After the download
This is a creation in
Article, where the information may have evolved or changed.
Panda TV's gift system uses the Golang of the MONGO library MgO, in the middle of some pits, summed up to avoid everyone to step on the pit
Golang's MgO library illustrates the use of the open connection multiplexing, but the observation experiment found that this does not realize the control of the connection at all, the connection multiplexing is actually only in the c
Some extensions of PHP installed under Debian geoip,mongo,redis,libevent,proctitle,inotify,pcntl
Because of the relationship of the project, some new extensions need to be installed
Debian Xfce 7.2 x86 The following 3 are installed through Apt-get.
PHP 5.4.4-14+deb7u5 (CLI)
nginx1.2.1
Apache 2.2.22
1: Installed by default method (optimal), most commonly used in the Debian warehouse, can be downloaded to note, #是代表root can be through Su-enter the pa
Official API: http://www.mongodb.org/pages/viewpage.action? PageId = 6750283
Master-slave synchronization:
1. Create a database directory
Mkdir/Mongodb/masterdbMkdir/Mongodb/Slavedb_1Mkdir/Mongodb/Slavedb2.2. Start the Master/Slave servers respectively.Start the master server to listen to port 10000./Bin/mongod-Dbpath/Mongodb/masterdb/-- Port 10000 -- masterYou can also use master-> slave settings to start two slave servers with ports 10001 and 10002 respectively../Bin/mongod-Dbpath/Mongodb/Slav
1. Gridfs IntroductionGridfs is a submodule of MONGO that uses GRIDFS to persist files based on MongoDB. and supports distributed applications (file distribution storage and reading). As a solution for storing binary data in MongoDB in a database, typically used to handle large files, there is a size limit for data (documents) stored in MongoDB's Bson format, up to 16M. However, in the actual system development, uploaded pictures or files may be large
Tags: database name decompression auto ble ref specify style show hrefInstallation under LinuxOpen Https://www.mongodb.com/download-center#community Select Linux and choose your own version copy download next to the linkOpen Terminal inputWget linksNext unzipTAR-ZXVF downloaded file nameMove to the specified directoryMv Added to the path pathIn UbuntuVim ~/.BASHRCAt the end of the addExport Path=/usr/local/mongodb/bin:$PATHCreate DB directory to put DBMkdir-p/data/dbThen run the service Mongod
Tags: sof return ali system error Specify yourself stuck get posWindows installation MongoDB First go to the official website (https://www.mongodb.com/download-center?jmp=nav#community) and download a MongoDB Windows client. I downloaded two versions of the 3.4.11 version, one is 3.6.2. Originally used MongoDB with Springboot learning, so first choose the latest version, but the installation of stuck, stuck in the compass Workaround: 1. Wait half an hour, or longer. (http://blog.csdn.net/only_y
Robomongo 0.9.0 Connection failed while connecting to MONGO database. (IP and port number determination is right)Basic points of attention:1, the MongoDB service opens, when opened, specify the port number, the default is 27017, using the default value, do not specify.2, firewall shutdown or allow port (6666) through the firewall3, the case of authentication, database connection and user name, password to match. The correspondence between the database
============================================================phil-prod-20141212, field add "-00" =========It is necessary to modify the data of the online advance treasure data and the easy loan related problem data (batch)MongodbBindingloanNeed to add '-00 ' to LoanaccountidMySQL requires the Select Loanaccountid from kypayaccountsLoanaccountid no-00 record plus '-00 '=========================mongo======db.bindingloan.find ({},{"Loanaccountid": 1}). P
Label:First, download MongoDB, then installHttp://downloads.mongodb.com/win32/mongodb-win32-x86_64-enterprise-windows-64-2.6.4-signed.msi?_ga= 1.238525191.607472782.1411452026Then, to the installation directory, create two folderscd to Bin directory, execute command mongod-dbpath "C:\Program files\mongodb 2.6 enterprise\bin" Start MongoDBOpen Mongodb.exe, create userInstalling MONGO VUEHttp://www.mongovue.com/Installer-1.6.9.zipThen use Vue to connect
from the file system
2. If you want to modify the document on the Gridfs, you can only delete the existing file, The entire document is then re-saved.
The
simplest way to use the GRIDFS is to use the Mongofiles tool, which is included in all MONGO DB distributions, and can be used to upload files, download files, view file lists, search for files, and delete files
Label:(1) Download the MongoDB C # driver. http://www.nuget.org/packages/mongocsharpdriver/. (2) Add Reference to C # driver DLLs 1mongodb.bson.dll
2mongodb.driver.dll
3mongodb.driver.core.dll or Nuget download VS 2012/13TOOLS---Library package manager–> Manage NuGet Package for solution, then select Online, Search MongoDB, and then download driver. (3) Connecting MONGO DB 1 ///
2 ///Database Connection3 ///
4 Private
composed of three layers: database, collection, and document. Mongodb does not have the concept of the relationship between rows and columns for tables in relational databases, which reflects the free features of the mode.
The syntax commands are shown in the following table.
MySQL
MongoDB
Description
Mysqld
Mongod
Server daemon
Mysql
Mongo
Client tools
Mysqldump
Mongodump
Logical backup too
No more nonsense, we're working directly ...Open the Black window directly under the directory:Then we'll start to look at the files we've created:Then we start to create the catalog under the project:From here we can clearly see that our catalogue is separated from the previous background, the introduction of the template is also very simple, as shown in:This allows Chen Gong access to our front end,,,Killing Thunder Dog---node. JS---16 project construction in Node+express+
Source: http://www.educity.cn/wenda/361741.htmlPymongo Delete data according to ObjectId _idWant to delete data, according to _ID, is the most reliable, concrete methodBecause _id is a objectid () object, you first have to introduce a pair of images, where are the objects?Reading, found is a Bson fragment generated Objectid, then will not put this object in Bson,Try it.From Bson import ObjectIdCollgroup.remove ({"_id": ObjectId (' _id string ')})PerformIt's OK ..."
Mongo java and/or multi-condition query, using java// And, or multi-condition joint Query// Age condition (and condition)BasicDBList condList = new BasicDBList ();BasicDBObject cond = new BasicDBObject ();Cond. put ("$ gt", 0 );Cond. put ("$ lte", 40 );BasicDBObject composeCod = new BasicDBObject ();ComposeCod. put ("age", cond );CondList. add (composeCod );// Name ConditionBasicDBObject nameCond = new BasicDBObject ();NameCond. put ("name", "name ");
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.