List some commonly used MongoDB state viewing methods.1.mongostatIs the MONGDB's own condition detection tool,
INSERTS/S number of insertions per second
QUERY/S number of queries per second
UPDATE/S Update times per second
DELETE/S number of deletions per second
GETMORE/S number of Getmore executed per second
command/s command number per second, more than the above insert, find, UPDATE, delete more comprehensive, also counted other commands
FLUSHS/S the number of
This article mainly introduces the export MONGO library to the local, has a certain reference value, now share to everyone, the need for friends can refer to
Demand:
Under the YII framework, export the data from the production MONGO library to the JSON file and download to the local
Call:
1. Quoting under/web/controllers/testcontroller.php
Public Function Actionexport () {public $target = '/www/w
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
directly ... May be I find the Help class has a problem, anyway, has not found a way to update directly. Because of this problem, and the Redis itself cannot be indexed, the company decided to get a MongoDB server (16G). Next said is the company's other needs, is the app to integrate the IM function, QQ chat is the kind, there is a problem, push the problem, this is too complex, so we decided to use a third party, I do not say the name, lest there is a suspicion of advertising. However, another
In the case of parameters, get the directory path where the bat file is located, which can be used:%~dp0Description01. The so-called pass-through situation refers to dragging a file onto the bat file and releasing it. The bat command executed in this case is a parameter.02. The 0 at the end of the above refers to the No. 0 parameter, which is actually the
servers are Windows Server environments, all of which were written in Python with a monitoring script, and recently came across a need to add a Zabbix monitoring project, and I was thinking about using the bat batch I was doing my best to finish the project.
No surprises, but with the help of the SQL Server command-line tool, the code is as follows:
@echo off title Zabbix database query Bat script
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.