<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ### 4、Mongodb 啟動和停止服務 Mongodb 啟動: 1、mongod --fork --port 12345 --dbpath /srv/mongodb/ 2、mongod -f /data/mongodb/conf/mongodb.conf 推薦第二種方式把配置寫進文件啟動。 Mongodb停止: >1、kill -2 (mongod process ID) 2、kill (mongod process ID) 3、mongod --shutdown 4、db.shutdownServer() 切勿使用kill -9(即SIGKILL)終止mongod實例。 前兩種方式就不介紹了: 3、 --shutdown ``` [root@10-1-1-159 ~]# sudo -u mongod /data/mongodb-4.2.2/bin/mongod -f /data/mongodb/conf/mongodb.conf --shutdown killing process with pid: 28761 ``` 4、db.shutdownServer() ``` [root@10-1-1-159 ~]# sudo -u mongod /data/mongodb-4.2.2/bin/mongo 10.1.1.159:27010 rs02:SECONDARY> db.getMongo().setSlaveOk() rs02:SECONDARY> use admin switched to db admin rs02:SECONDARY> db.shutdownServer() 2020-03-20T14:37:28.602+0800 E QUERY [js] Error: shutdownServer failed: { "operationTime" : Timestamp(1584686240, 1), "ok" : 0, "errmsg" : "shutdown must run from localhost when running db without auth", "code" : 13, "codeName" : "Unauthorized", "$clusterTime" : { "clusterTime" : Timestamp(1584686240, 1), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } } } : _getErrorWithCode@src/mongo/shell/utils.js:25:13 DB.prototype.shutdownServer@src/mongo/shell/db.js:426:19 @(shell):1:1 rs02:SECONDARY> ``` 需要使用localhost連接mongo實例,在配置文件啟動時候添加: >bindIp: 10.1.1.159,localhost ``` [root@10-1-1-159 ~]# sudo -u mongod /data/mongodb-4.2.2/bin/mongo localhost:27020 > use admin switched to db admin > db.shutdownServer() 2020-03-20T14:47:49.186+0800 I NETWORK [js] DBClientConnection failed to receive message from localhost:27020 - HostUnreachable: Connection closed by peer server should be down... ``` 官網詳細介紹地址:https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes/ ![](https://s4.51cto.com/images/blog/202004/23/cd8bca9a63d2a1af57ccb81fc79762c0.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看