First, the preface
Recently began to learn the MongoDB database, but in the blog Park can not find a comparative system of tutorials, a lot of information to go to the English site, the efficiency is relatively low. I am not, by the opportunity to self-study experience are recorded to facilitate the interest of children's shoes sharing discussions. Some resources from other blogs, the purpose of the scattered knowledge points together, if there is in
The Windows platform uses a MongoDB shell to connect to a MONGODB server and create a database
command line into the bin directory of MongoDB run Mongod.exe
mongod --dbpath c:\data\dbOr find the bin directory of MongoDB and double-click Run Mongod.exe. To outpu
(. \ means that you need to show trust under Windows PowerShell on the server to perform this command before it will be executed, or you can remove it if you use it on your computer.)On-premises use does not require permission to turn on the security mode on the server, so you need to have the original command plus--auth (user name and password when connecting) to enable permissions.Now that you need a user
MongoDB replica set converts an existing single-node server to a replica set
Server Status:
Existing single-node Primary 192.168.126.9: 27017
New node Secondry 192.168.126.8: 27017
Arbitration node ARBITER 192.168.126.8: 27018
Mongo version 3.2.4
1. Stop the Mongo service for a Single-node Primary
1 > use admin; 2 switched to db admin 3 > db.shutdownServer()
2
The operating system recommends using the CentOS 5.7 X64 version. When I use the CentOS 6 version, when I go to the gem install bundler, there will be a file not found, Google's solution is not many, but I found that can use the find after the root directory, and then copy the file to the parent directory can be resolved. I have obsessive-compulsive disorder, so I recommend using the CentOS 5.7 X64 version.Three. Install and configure the MongoDB
Unable to connect to server 127.0.0.1: 27017: Unable to connect because the target machine is actively rejected. 127.0.0.1: 27017. type: MongoDB. driver. mongoConnectionExceptionStack: at MongoDB. driver. internal. directConnector. connect (TimeSpan timeout) at MongoDB. driver. login
[[email protected] log]# ls Mongodb.log 2.4 Connect Service [Email protected] log]# MONGO MongoDB Shell version v3.6.3 Connecting to:mongodb://127.0.0.1:27017 MongoDB Server version:3.6.3 .............. 2018-07-07t10:49:21.013+0800 I CONTROL [initandlisten] * * We suggest setting it to ' never ' 2018-07-07t10:49:21.013+0800 I CONTROL [Initandlisten]
Sh
/bin/mongodb.conf execreload=/bin/kill-shup $MAINPID execstop=/home/mongodb/bin/mongod-- shutdown--config/home/mongodb/bin/mongodb.conf privatetmp=true [install] wantedby=multi-user.target #为moNgodb.service Set permissions chmod754mongodb.service #设置开机启动 systemctl enable Mongodb.service #开启服务 Systemctl Restart Mongodb.service Note: If you have started after
Install MongoDB 3.0 server on CentOS71. Download and install
MongoDB 3.0 official version released! This marks a new development stage for MongoDB databases, providing a powerful, flexible, and easy-to-manage database management system. MongoDB claims that the new version 3.
MongoDB-based file server
Recently, I complained about the company's file server. The existing file server saves the files to the server hard disk through the interface provided by the server and divides the files by ID. After re
10002--replset firstset--oplogsize--rest--fork--logpath/data/example/firstset2/firstset2.log- -nojournal--directoryperdb
mongod--dbpath/data/example/firstset3--port 10003--replset firstset--oplogSize 700 --rest--fork--logpath/data/example/firstset3/firstset3.log--logappend--nojournal--directoryperdb
The--oplog option forces each MongoDB instance action log to be 700M, and not using this parameter defaults to 5% of the partition space, limiting
Node. js remotely connects to the MongoDB database server on another host
My MongoDB is installed in linux.
First, add a user
1. First, run the terminal command line on the MongoDB server host and enter
Mongo
2. Enter use admin to access the user management database.
3. db.
This article describes how to build a Node based on zero infrastructure. js, Express, Ejs, Mongodb server, and application development. This article provides a cost tutorial for Windows 8 systems. For other systems, see, if you need a Node, refer to the Introduction Guide for front-end developers in this article. in js, Express, Jade, and Mongodb
This article describes how to build a Node based on zero infrastructure. js, Express, Ejs, Mongodb server, and application development. This article provides a cost tutorial for Windows 8 systems. for other systems, see, if you need a Node, refer to the introduction guide for front-end developers in this article. in js, Express, Jade, and Mongodb
]
Name = 10gen Repository
Baseurl = http:// Downloads-distro.mongodb.org/repo/RedHat/ OS /x86_64
Gpgcheck =0
After configuring the yum source, if the configuration is correct, execute the following command to query MongoDB-related information:
View mongoDB server package information
[Root @ localhost geffzhang] # yum info mongo-10gen-
Connect time out occurs in mongodb on the java linked server. mongodbconnect
Exception Information
December 22 5:27:58 PM com. mongodb. DBTCPConnector initDirectConnectionWarning Exception executing isMaster command on/192.168.1.249: 10003Java. io. IOException: couldn't connect to [/192.168.1.249: 10003] bc: java.net. SocketTimeoutException: connect timed outAt c
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.