<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mongodb &#8211; moneyslow.com</title>
	<atom:link href="https://moneyslow.com/tag/mongodb/feed" rel="self" type="application/rss+xml" />
	<link>https://moneyslow.com</link>
	<description>making money with technology</description>
	<lastBuildDate>Fri, 24 Jul 2020 07:11:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.4</generator>
	<item>
		<title>mongodb2.6的member顺序错乱？</title>
		<link>https://moneyslow.com/mongodb2-6%e7%9a%84member%e9%a1%ba%e5%ba%8f%e9%94%99%e4%b9%b1%ef%bc%9f.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Fri, 24 Jul 2020 07:11:04 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[mongodb]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=11391</guid>

					<description><![CDATA[mongodb主从切换注意事项。]]></description>
		
		
		
			</item>
		<item>
		<title>mongodb 建库建用户</title>
		<link>https://moneyslow.com/mongodb-%e5%bb%ba%e5%ba%93%e5%bb%ba%e7%94%a8%e6%88%b7.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Fri, 08 Mar 2019 03:59:34 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[mongo]]></category>
		<category><![CDATA[mongodb]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=8492</guid>

					<description><![CDATA[进入admin库 use admin 创建adminfinance用户 角色：userAdminAnyDatabase （这是一个账号管理员的角色） adminfinance 用户用于管理账号，不能进行关闭数据库等操作，目标数据库是admin db.createUser( { user: "adminfinance", pwd: "JDhru78E3", roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] } ) 使用： use admin db.auth("adminfinance", "JDhru78E3") 在moni库和ds库，建一个相同账号 stock &#62; use ds switched to db ds &#62; db.dropUser("haha") true db.createUser({user:"haha",pwd:"JDhru78E3",roles:[{role:"dbOwner",db:"ds"}]}) &#62; use moni switched to db moni &#62; db.dropUser("haha") true db.createUser({user:"haha",pwd:"JDhru78E3",roles:[{role:"dbOwner",db:"moni"}]}) mongo [&#8230;]]]></description>
		
		
		
			</item>
		<item>
		<title>删除mongodb 的默认test库 db.dropDatabase() 方法</title>
		<link>https://moneyslow.com/%e5%88%a0%e9%99%a4mongodb-%e7%9a%84%e9%bb%98%e8%ae%a4test%e5%ba%93-db-dropdatabase-%e6%96%b9%e6%b3%95.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Wed, 06 Mar 2019 01:53:04 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[mongodb]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=8485</guid>

					<description><![CDATA[db.dropDatabase() 方法 MongoDB中的 db.dropDatabase()命令用于删除现有的数据库。 db.dropDatabase() Shell 这将删除当前所选数据库。 如果没有选择任何数据库，那么它将删除默认的’test‘数据库。 示例 首先，使用命令show dbs检查可用数据库的列表。 &#62;show dbs local 0.00025GB newdb 0.0002GB test 0.00012GB &#62; Shell 如果要删除新数据库&#60;newdb&#62;，那么dropDatabase()命令将如下所示： &#62;use newdb switched to db newdb &#62;db.dropDatabase() &#62;{ "dropped" : "newdb", "ok" : 1 } &#62; Shell 现在检查数据库列表，如下 - &#62;show dbs local 0.00025GB test 0.0002GB &#62;]]></description>
		
		
		
			</item>
		<item>
		<title>基于MongoDB2.6版本配置MongoDB主从复制集群架构</title>
		<link>https://moneyslow.com/%e5%9f%ba%e4%ba%8emongodb2-6%e7%89%88%e6%9c%ac%e9%85%8d%e7%bd%aemongodb%e4%b8%bb%e4%bb%8e%e5%a4%8d%e5%88%b6%e9%9b%86%e7%be%a4%e6%9e%b6%e6%9e%84.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Tue, 11 Sep 2018 05:06:32 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[mongodb]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=8209</guid>

					<description><![CDATA[1：集群环境说明：mongodb1：192.168.43.10、mongodb2：192.168.43.11、mongodb3：192.168.43.12。且基于主机名相互通信/etc/hosts文件（为了集群信息同步不出现问题，先关闭认证功能anth） 2：编辑mongodb1的/etc/mongod.conf文件，注释auth指令，添加如下内容 指定副本集的名称 replSet=uplooking 指定预拷贝的索引，这里只拷贝id那个系统自动生成的索引 replIndexPrefetch=_id_only noauth=true 3：将mongodb1的配置文件拷贝到mongodb2、mongodb3 scp /etc/mongod.conf 192.168.43.11:/etc/ scp /etc/mongod.conf 192.168.43.12:/etc/ 3：启动mongodb1、mongodb2、mongodb3 4：登入mongodb1的shell接口 rs.status(); （查看集群中的节点状态） rs.initiate();（初始化副本集） rs.status();（再次查看集群中的节点状态） uplooking:PRIMARY&#62; （此时的提示符已经变了） 5：当初始化了主节点以后，需要添加其他的从节点到mongodb集群中来 uplooking:PRIMARY&#62; rs.add("192.168.43.11") uplooking:PRIMARY&#62; rs.add("192.168.43.12") 6：添加了其他节点以后，就可以查看配置信息和副本集的状态信息 uplooking:PRIMARY&#62; rs.conf() { "_id" : "uplooking", "version" : 3, "members" : [ { "_id" : 0, "host" : "mongodb1:27017" }, { "_id" : 1, "host" : "192.168.43.11:27017" [&#8230;]]]></description>
		
		
		
			</item>
		<item>
		<title>mongodb2.6.12 cluster 集群配置</title>
		<link>https://moneyslow.com/mongodb2-6-12-cluster-%e9%9b%86%e7%be%a4%e9%85%8d%e7%bd%ae.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Mon, 04 Jun 2018 01:44:36 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[mongodb]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=8066</guid>

					<description><![CDATA[使用的版本： $ ./mongo --version MongoDB shell version: 2.6.12 下载地址： wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.12.tgz 创建用户mongo&#160; 解压后拷贝到用户目录： /usr/local/mongodb27017 $ id uid=1010(mongo) gid=1010(mongo) groups=1010(mongo) $ pwd /usr/local/mongodb27017 $ ls bin&#160; GNU-AGPL-3.0&#160; mongodb-keyfile&#160; mongod.conf&#160; mongod.log&#160; mongod.pid&#160; README&#160; THIRD-PARTY-NOTICES 配置文件：/usr/local/mongodb27017/mongod.conf maxConns=655360 logpath=/usr/local/mongodb27017/mongod.log logappend=true fork=true dbpath=/data/mongodata27017 pidfilepath=/usr/local/mongodb27017/mongod.pid bind_ip=192.168.137.131 auth=true replSet=rs1 keyFile=/usr/local/mongodb27017/mongodb-keyfile 启动服务 /usr/local/mongodb27017/bin/mongod -f /usr/local/mongodb27017/mongod.conf 以超级用户管理员登陆 bin/mongo admin --host 192.168.137.132 -u "siteRootAdmin" -p [&#8230;]]]></description>
		
		
		
			</item>
		<item>
		<title>php mongo报错：’Failed to connect to: XXXXX: Remote server has closed the connection’的解决方法</title>
		<link>https://moneyslow.com/php-mongo%e6%8a%a5%e9%94%99%ef%bc%9afailed-to-connect-to-xxxxx-remote-server-has-closed-the-connection%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Wed, 23 May 2018 12:59:08 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[mongodb]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=8026</guid>

					<description><![CDATA[重启了php-fpm]]></description>
		
		
		
			</item>
	</channel>
</rss>
