mongoDB跨平台图形管理工具
Shell-centric cross-platform MongoDB management tool
官方网站:
环境:
CentOS6.5 x64
mongoDB-3.2.0
问题
默认情况下,robomongo等第三方工具连接时无法认证成功
即使指定了认证方式,如下,仍然无法连接成功
--setParameter
authenticationMechanisms=MONGODB-CR
或
setParameter:
authenticationMechanisms: MONGODB-CR
原因
SCRAM-SHA-1¶
SCRAM-SHA-1 is the default
authentication mechanism for MongoDB. SCRAM-SHA-1 is
an IETF standard,RFC
5802, that defines best practice methods for implementation of
challenge-response mechanisms for authenticating users with
passwords.
SCRAM-SHA-1 verifies the supplied user
credentials against the user’s name, password andauthentication database.
The authentication database is the database where the user was
created, and together with the user’s name, serves to identify the
user.
NOTE
A driver upgrade
is necessary to
use the SCRAM-SHA-1 authentication
mechanism if your current driver version does not
support SCRAM-SHA-1.
See required
driver versions for details.
解决方案
mongoDB 官方jira给出了解决方案
I've applied the change you suggested
1) Start 3.0 without auth enabled
2) Run (on admin db):
> var schema = db.system.version.findOne({"_id" : "authSchema"})
|
> schema.currentVersion = 3
|
> db.system.version.save(schema)
|
3) restart with auth enabled.
Software with new drivers (only tested csharp driver) and legacy
software works fine.
1.非认证模式启动mongo
2.通过mongo
shell命令行进行schema降级,执行以下动作
use admin
var schema =
db.system.version.findOne({"_id" : "authSchema"})
schema.currentVersion =
3
db.system.version.save(schema)
db.dropAllUsers()
db.createUser(
{
user: "myUserAdmin",
pwd: "abc123",
roles: [ { role: "userAdminAnyDatabase", db: "admin" }
]
}
)
3.重启mongo并启用认证
说明: 切换到对应数据库,
修改并保存schema版本,删除掉之前不能正常登录的用户后重建该用户,至于为什么要删除己建的用户,是因为从3.0以后的版本默认采用SCRAM-SHA-1认证模式,没有降级schema之前建的用户都使用该模式,降级后新建的用户就采用的是MONGODB-CR
GUI工具
mongoDB官方推荐的GUI工具多如牛毛,有基于web的,有跨平台客户端的,有手机app
robomongo
注意: 需要安装32位的libstdc++库
yum -y install libstdc++.i686
rpm -ivh
robomongo-0.8.5-x86_64.rpm
umongo
mongobooster
MongoBooster can connect MongoDB server
and
fully support its mongo shell commands
from v2.2 to
3.2.
NoSQL Manager
只有windows版
mongobird
依赖JVA,RRDtool
1.tomcat,jdk安装配置
2.部署tetrad.war
3.配置rrd环境变量
mkdir -p
/opt/tomcat/webapps/tetrad/rrd/{data,img,xml}
vim /opt/tomcat/webapps/tetrad/WEB-INF/classes/tetrad_rrd.properties
rrd_path=/opt/tomcat/webapps/tetrad/rrd/data/
xml_path=/opt/tomcat/webapps/tetrad/rrd/xml/
img_path=/opt/tomcat/webapps/tetrad/rrd/img/
4.配置mongo环境变量
vim /opt/tomcat/webapps/tetrad/WEB-INF/classes/monad.properties
mongo.host=127.0.0.1
mongo.port=27017
mongo.username=myUserAdmin
mongo.password=abc123
mongo.database=admin
注意:mongoDB的基本信息请按实际填写,如果mongo没有启用认证则请相应留空
5.重启tomcat
6.访问
www.example.com:8080/tetrad
默认用户名和密码都为
admin
更多的细节,请自行把玩