Basic operationsbasic "additions and deletions", in the DOS environment input MONGO command to open the shell, in fact, this shell is the client of MongoDB , but also a JS compiler , the default connection is "test" Database . "Error"first, when
Before the start of MongoDB is normal, do not know the start error later, the paste out query. Finally know is due to their abnormal shutdown caused by this situation.--Excerpt: MongoDB abnormal shutdown after repair recordMongod no background
Deploy MongoDB's production server and give the following recommendations:
Use of virtualized environments;
System Configuration
1) Recommended RAID configurationRAID (Redundant array of independent disk, redundant array of
1. Download MongoDB version of Windows, there are 32-bit and 64-bit version, according to the system download,: Http://www.mongodb.org/downloads2. Unzip to the amount E:/mongodb3. Create a storage location for the database files, such as
Group It takes about a few parameters.
Key: The field used to group the document. And Keyf both must have a
KEYF: You can accept a JavaScript function. The field used to dynamically determine the grouped document. And key both must
slow query log in MongoDB1. turn on the query log .(1) Dynamic Open , can be selective to the specified DB turn on slow query log , However, the slow query log is manually opened after the server restarts. Db.setprofilinglevel (1,300)The
1. Add the user to the TD database using use TD and then execute Db.adduser ("name", "password"); can be added;2. Enable users to use Db.auth ("name", "password");3. Generally in the project we want to enable security checks, in the configuration of
1, MONGOsMONGOs is a point of interaction between the user and the cluster, whose duty is to hide the complexity inside the Shard and provide the user with a simple single-server interface, and there are gaps in the abstraction layer, but in most
After the installation of MongoDB, has been the following start, specify Dbpath,logpath, verify auth, etc../mongod--dbpath=/usr/bin/mongodb/mongodb/data--logpath=/usr/bin/mongodb/mongodb/log/mongodb.log--authBut more and more trouble, write more
First, downloadHttp://www.mongodb.org/downloadsChoose the right download for your systemDownload path:/DATA/SRCIf none: Mkdir-p/DATA/SRC Second, decompression Tar zxvf ... (Omit file name here, tab supplement) Third, install MongoDB Note:
Recently has been learning the Node.js,nodejs Development Guide has a microblog web development project, because the book is relatively early (2012 out), so far the use of Nodejs web development of various combinations of technologies have undergone
MongoDB installation deployment in Windowstest Environment :Microsoft Windows 7 (Ultimate Edition 64-bit)MongoDB 3.0.2 (Windows 64-bit r2+)installation files:Mongodb-win32-x86_64-2008plus-ssl-3.0.2-signed.msiTips:1. MongoDB does not support Windows
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.9.tgzExtractTar xvf mongodb-linux-x86_64-2.6.9.tgzChange Folder nameMV Mongodb-linux-x86_64-1.8.5/mongodbMove to the Data directoryMV Mongodb/dataNew Data File storage
First, insertThe INSERT statement for MongoDB is in this format:db.collection.insert(document)Where documents are document data, collection is a collection of document data. If collection exists, the document is added to the collection directory,
After the successful start of MongoDB, and then open a command line window input MONGO, you can do some of the database operations.Enter help to see the basic Operations Command:Show DBS: Display Database listShow Collections: Displays a collection
Recently in the look at MongoDB, found really good, nosql type of database relative to the traditional MySQL, etc., because there are no many additional features, and it seems to be exceptionally useful. This feeling is the difference between JSON
Adding parameters to the configuration fileLogpath=/data/app_data/mongodb/log/mongodb.log Logappend=trueOnly this kind of log rotation in Windows> Use admin;switched to DB admin> Db.runcommand ({logrotate:1}) {"OK": 1}Linux can also be set by
Mongodb can follow the subscript to isolate the elements of an inline array, but cannot query the subscript by the value of the element. For example, the elements in the array are the names of the people in the order of rank, andMongoDB can find
01. Getting started with JDBCI. Getting started with JDBC 1. JDBC IntroductionJDBC is Java Database Connectivity. JDBC provides a standard API for tools/Database developers to write Database applications using pure Java APIs. Java database
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.