【MongoDB】The Access control of mongodb

In this blog we mainly talk about the access control including limitation of ip, setting listen port and usage of username and password. In the official document, mongodb server start without the argument , so once the connection
was created, the remote client could do everything. But in the productive environment it’s advisable to take security into consideration and to enhance the security protection. For the sake of lowing the potential risk, the above measures could be taken to
deal with these problems.

First, Binding IP address to access MongoDB.

Mongodb could put restriction on the ip address thought argument ‘bind_ip’ when being started. For example, now we only limit ip address[192.168.55.165] to access the server.

Secondly, use the certain port

Thirdly,  add user and password

时间: 2024-08-10 04:58:20

【MongoDB】The Access control of mongodb的相关文章

【转载】8天学通MongoDB——第八天 驱动实践

作为系列的最后一篇,得要说说C#驱动对mongodb的操作,目前驱动有两种:官方驱动和samus驱动,不过我个人还是喜欢后者, 因为提供了丰富的linq操作,相当方便. 官方驱动:https://github.com/mongodb/mongo-csharp-driver/downloads.下载后,还提供了一个酷似msdn的帮助文档. samus驱动:https://github.com/samus/mongodb-csharp/downloads. 下面就具体看看samus驱动,https:

【转载】8天学通MongoDB——第三天 细说高级操作

今天跟大家分享一下mongodb中比较好玩的知识,主要包括:聚合,游标. 一: 聚合 常见的聚合操作跟sql server一样,有:count,distinct,group,mapReduce. <1> count count是最简单,最容易,也是最常用的聚合工具,它的使用跟我们C#里面的count使用简直一模一样. <2> distinct 这个操作相信大家也是非常熟悉的,指定了谁,谁就不能重复,直接上图. <3> group 在mongodb里面做group操作有点

【转载】8天学通MongoDB——第四天 索引操作

这些天项目改版,时间比较紧,博客也就没跟得上,还望大家见谅. 好,今天分享下mongodb中关于索引的基本操作,我们日常做开发都避免不了要对程序进行性能优化,而程序的操作无非就是CURD,通常我们 又会花费50%的时间在R上面,因为Read操作对用户来说是非常敏感的,处理不好就会被人唾弃,呵呵. 从算法上来说有5种经典的查找,具体的可以参见我的算法速成系列,这其中就包括我们今天所说的“索引查找”,如果大家对sqlserver比较了解 的话,相信索引查找能给我们带来什么样的性能提升吧. 我们首先插

【解决方案】#1045 - Access denied for user &#39;root&#39;@&#39;localhost&#39; (using password: NO)

#1045 - Access denied for user 'root'@'localhost' (using password: NO) 解决方案: \wamp\apps\phpmyadmin4.1.14\config.inc.php $cfg['Servers'][$i]['password'] = '我的密码'; 作者:Jackson 出处:http://blog.csdn.net/jackson0714/article/details/44116991 本文版权归作者和CSDN博客共有

【MongoDB】Serveral common command of MongoDb

In the recent days, since the overwork made me exhaused, on arrival to home I will go to bed, which leads to loss of blogs that should have been written in the past days. Now  I make a summay to all the commond of operating mongoDB. First, you should

【MongoDB】The basic operation of Mongodb, Insert\Query\Delete\Update

1, Insert MongoDB is database storing document object, the type of which is called Bson.(like JSON); Example:  // document defination Now after using command[db.posts.insert(doc)], you will insert record successfully if seeing the The following pictu

【MongoDB】在windows平台下mongodb的分片集群(五)

本篇接着上面的四篇继续讲述在window平台下mongodb的分片集群搭建.在分片集群中也照样可以创建索引,创建索引的方式与在单独数据库中创建索引的方式一样.因此这不再多说.本篇主要聚焦在分片键的选取问题上. 分片键通俗来说就是分割海量数据的标记符. 如果更高效的划分海量数据往往依赖于分片键的选择. 分片键选得不好,应用程序就无法利用分片集群所提供的诸多优势.在这种情况下,查询和插入得系能都回显著下降. 一.低效的分片键 1.1 分布差 BSON对象ID是每个mongodb文档的默认主键.所有的

【MongoDB】在windows平台下mongodb的分片集群(三)

在上两篇博客中我们分别阐述了分片集群的工作原理以及搭建过程.在本篇博客中我们主要一起分析分片集群的测试结果: 首先看分片集群的各个状态,可以看的出复制集A和B都是正常的: 一.开启分片集合 开启一个数据库上的分片,这是对任何集合进行分片的先决条件. 假设测试数据库为slidetest. 分片集合定义注意:它看起来和索引定义有几分相似之处,尤其是有那个unique键.在对一个空集合进行分片时候,mongodb会在每个分片上创建一个与分片对应的索引.可以直接连上分片,运行getIndexs()进行验

【原创】大数据基础之Mongodb(2)常用查询命令

1 下载 https://www.mongodb.com/download-center/community 比如: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.9.tgz 2 连接 # cd $MONGODB_HOME# bin/mongo master:27017/database_name 3 查询 1 count >db.getCollection('table_name').find({}).count() 2 g