mongo slave 无法show dbs
来源:互联网 发布:从python开始学编程pdf 编辑:程序博客网 时间:2024/04/30 09:22
在SECONDARY节点无法show dbs
主从启动之后,连接slave可以成功连上,但是在slave中执行 show dbs 的时候就报错了:
QUERY Error: listDatabases failed:{ "note" : "from execCommand", "ok" : 0, "errmsg" : "not master" }
解决方法:
在报错的slave机器上执行 rs.slaveOk()方法即可。
解释一下具体slaveOk方法是什么意思?
Provides a shorthand for the following operation:db.getMongo().setSlaveOk()This allows the current connection to allow read operations to run on secondary members. See the readPref() method for more fine-grained control over read preference in the mongo shell.
0 0
- mongo slave 无法show dbs
- show slave status 解释
- SHOW SLAVE STATUS 详解
- show slave status 详解
- SHOW SLAVE STATUS详解
- SHOW SLAVE STATUS
- SHOW SLAVE STATUS 详解
- Show slave status 详解
- show slave status
- SHOW SLAVE STATUS 详解
- SHOW SLAVE STATUS 详解
- DBS
- show slave status 参数详解
- show slave status 参数详解
- show slave status\G 详解
- show slave status 参数详解
- show slave status \G 分析
- show slave status 参数详解
- Boot process(启动过程)
- iOS本地存储NSUserDefaults2
- callgraph 获取函数的调用栈
- 关于“应用图标更改,但是安装之后,图标未改变”总结
- 2013 Asia Regional Dhaka 解题报告
- mongo slave 无法show dbs
- 浅谈android的selector背景选择器
- 2015/9/9
- thinkphp phpexcel使用
- java应用程序利用Exe4j打包exe文件
- oracle imp exp 命令
- ./runInstaller: /download/database/install/.oui: /lib/ld-linux.so.2: bad ELF interpreter: No such fi
- 小白_最近浏览功能
- 统计静态库的代码数据大小