您好,登录后才能下订单哦!
这期内容当中小编将会给大家带来有关MonogoDB中怎么查看配置的参数值,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。
怎样在MongoDB实现mysql show variables like 'xx';
例如:
1.查看所有参数值:
C:\Users\duansf>mongo
MongoDB shell version: 2.6.6
connecting to: test
> use admin
switched to db admin
> db.adminCommand({getParameter:"*"})
{
"journalCommitInterval" : 0,
"traceExceptions" : false,
"replMonitorMaxFailedChecks" : 30,
"_forceLegacyShardWriteMode" : false,
"authSchemaVersion" : 3,
"clusterAuthMode" : "undefined",
"connPoolMaxConnsPerHost" : 200,
"connPoolMaxShardedConnsPerHost" : 200,
"enableLocalhostAuthBypass" : true,
"enableTestCommands" : 0,
"failIndexKeyTooLong" : true,
"internalQueryCacheFeedbacksStored" : 20,
"internalQueryCacheSize" : 5000,
"internalQueryCacheStdDeviations" : 2,
"internalQueryCacheWriteOpsBetweenFlush" : 1000,
"internalQueryEnumerationMaxIntersectPerAnd" : 3,
"internalQueryEnumerationMaxOrSolutions" : 10,
"internalQueryForceIntersectionPlans" : false,
"internalQueryMaxScansToExplode" : 200,
"internalQueryPlanEvaluationCollFraction" : 0.3,
"internalQueryPlanEvaluationMaxResults" : 101,
"internalQueryPlanEvaluationWorks" : 10000,
"internalQueryPlanOrChildrenIndependently" : true,
"internalQueryPlannerEnableHashIntersection" : false,
"internalQueryPlannerEnableIndexIntersection" : true,
"internalQueryPlannerMaxIndexedSolutions" : 64,
"internalSCCAllowFastestAuthConfigReads" : false,
"internalSCCAllowFastestMetadataConfigReads" : false,
"logLevel" : 0,
"logUserIds" : false,
"maxSyncSourceLagSecs" : 30,
"newCollectionsUsePowerOf2Sizes" : true,
"notablescan" : false,
"queueForMigrationCommit" : true,
"quiet" : false,
"releaseConnectionsAfterResponse" : true,
"replApplyBatchSize" : 1,
"replIndexPrefetch" : "uninitialized",
"skipCorruptDocumentsWhenCloning" : false,
"sslMode" : "disabled",
"supportCompatibilityFormPrivilegeDocuments" : true,
"syncdelay" : 60,
"textSearchEnabled" : true,
"ttlMonitorEnabled" : true,
"verboseQueryLogging" : false,
"ok" : 1
}
>
2.查看数据文件和日志文件路径:
> db.runCommand("getCmdLineOpts")
{
"argv" : [
"C:\\Users\\duansf\\Desktop\\mongodb\\mongodb-2.6.6\\bin\\mongod.exe",
"-journal",
"--dbpath",
"d:\\db\\data\\db",
"--logpath",
"d:\\db\\data\\log\\MongoDB.log",
"--logappend",
"--service"
],
"parsed" : {
"service" : true,
"storage" : {
"dbPath" : "d:\\db\\data\\db",
"journal" : {
"enabled" : true
}
},
"systemLog" : {
"destination" : "file",
"logAppend" : true,
"path" : "d:\\db\\data\\log\\MongoDB.log"
}
},
"ok" : 1
}
>
上述就是小编为大家分享的MonogoDB中怎么查看配置的参数值了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注亿速云行业资讯频道。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。