Install Moogodb can refer to my previous bloghttp://blog.51cto.com/1767340368/20925461. Log in to the database[Email protected] bin]# pwd/opt/mongodb/bin[[email protected] bin]# ./mongo> use adminswitched to db admin> db.createuser ({User: "root",
MongoDB is scalable and can be run in a distributed platform cluster environment, that is, sharding.Different parts of the data can be assigned to different servers using indexes. For example, the customer in the index record is placed on a group of
1 Viewing the documentation for the current databaseInput:Db.media.find ()System returns:{"_id": ObjectId ("5aa490f053350e04ddbd6fa6"), "Type": "Book", "Title": "Definitive Guide to MongoDB 3rd ed.", "ISBN": "978-1-4842-1183-0", "Publisher": "Apress"
Replica setAuthority authenticationA keyfile file is to be used for authentication of permissions between nodes.
Mkdir-p/mnt/mongodb/rs/config
Cd/mnt/mongodb/rs/config
OpenSSL rand-base64 741 > Mongodb-keyfile
chmod
MongoDB Replica Set
Earlier versions used Master-slave, a master one from and MySQL similar, but slave in this architecture is read-only, when the main library down, from the library can not automatically switch to primary
The Master-slave
ObjectivePersonal understanding, a primary function of a replica set is when the master library fails, and one of the salve from the library is elected to become the new master. The frame diagram is as follows:Among them, the electors do not
ExampleThe following mapping is an example of the following document:{ _id:ObjectId("509a8fb2f3f4948bd2f983a0"), user_id:"abc123", age:55, status:'A'}Create or Altercreate table or collectionCREATETABLE people (
First, the basicMongoDB does not need to explicitly create a database like a relational database, and can be created directly using the USE statement:> use fooInsert a document into the collection using the Insert method:> db.blog. Insert
Took a week to finally fix, across the various pits, finally debugging success, recorded as follows:1. First build the Douban crawler project in cmd with command lineScrapy Startproject Douban2, I use the pycharm, after importing the project,1)
1. The installation command is as followsFeatured Blogs About1.https://www.jianshu.com/p/2d0a1ecd0c822. http://blog.csdn.net/moumaobuchiyu/article/details/548853063.http://blog.csdn.net/u013310075/article/details/28703009Brew Install MongoDB (see
Download URL http://dl.mongodb.org/dl/win32/x86_64Mongodb-win32-x86_64-2008plus-ssl-v3.4-latest.zipUnzip D-Disk named MongoDBNew Data folder under MongoDB folderCreate db,log two folders under Data folderCreate a log file under the log folder
Chapter II Basic command one, MongoDB command说明:Mongodb命令是区分大小写的,使用的命名规则是驼峰命名法。 对于database和collection无需主动创建,在插入数据时,如果database和collection不存在则会自动创建。Common commandsHelp commandWith this command you can see some of the most basic commands,Use
MongoDB The database defaults to no user name and password, that is, no access restrictions. To facilitate database management and security, database users need to be created. User-created syntax format {user: " " , pwd : " " ,customdata: {
MongoDB Database BackupMongodump--host mongodb.example.net--port 27017Backup path SelectionMongodump--out/data/backup/Select the databases and collections to back upMongodump--collection mycollection--db testCreate a non-local database
The previous article describes the MongoDB replica set and shard cluster practices, and below provides a small summary of the daily maintenance operations of the MongoDB cluster:mongdb replica set failover feature benefits from its electoral
How to obtain the details of a user table in DB2
1. Get the User Name of the current user
SELECT CURRENT SCHEMA FROM SYSIBM.SYSDUMMY1
2. Obtain the names of all tables under a user.
Select creator, TYPE, NAME, remarks from sysibm. Variables Ables
On the centos 7.3 interactive interface, install mariadb10.2.8 in binary mode,Mariadb Introduction
The MariaDB database management system is a branch of MySQL and is mainly maintained by the open-source community. The purpose of using GPL to
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