{"id":21826,"date":"2024-01-02T15:57:24","date_gmt":"2024-01-02T15:57:24","guid":{"rendered":"https:\/\/server.hk\/blog\/21826\/"},"modified":"2024-11-14T10:26:27","modified_gmt":"2024-11-14T02:26:27","slug":"how-to-fix-mongodb-error-code-243-incompatiblewithupgradedserver","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/21826\/","title":{"rendered":"\u5982\u4f55\u4fee\u5fa9 MongoDB \u932f\u8aa4\u78bc &#8211; 243 &#8211; IncompatibleWithUpgradedServer"},"content":{"rendered":"<h1 id=\"how-to-fix-mongodb-error-code-243-incompatiblewithupgradedserver-TXqSNHMPYU\">\u5982\u4f55\u4fee\u5fa9 MongoDB \u932f\u8aa4\u78bc &#8211; 243 &#8211; IncompatibleWithUpgradedServer<\/h1>\n<p>MongoDB \u662f\u4e00\u500b\u53d7\u6b61\u8fce\u7684\u958b\u6e90 NoSQL \u6578\u64da\u5eab\uff0c\u63d0\u4f9b\u9ad8\u6027\u80fd\u3001\u53ef\u64f4\u5c55\u6027\u548c\u9748\u6d3b\u6027\u3002\u7136\u800c\uff0c\u8207\u4efb\u4f55\u8edf\u4ef6\u4e00\u6a23\uff0c\u5b83\u53ef\u80fd\u6703\u9047\u5230\u9700\u8981\u89e3\u6c7a\u7684\u932f\u8aa4\u3002\u5176\u4e2d\u4e00\u500b\u932f\u8aa4\u662f MongoDB \u932f\u8aa4\u78bc &#8211; 243 &#8211; IncompatibleWithUpgradedServer\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u5011\u5c07\u63a2\u8a0e\u9019\u500b\u932f\u8aa4\u7684\u539f\u56e0\u4e26\u63d0\u4f9b\u9010\u6b65\u89e3\u6c7a\u65b9\u6848\u4f86\u4fee\u5fa9\u5b83\u3002<\/p>\n<h2 id=\"understanding-mongodb-error-code-243-incompatiblewithupgradedserver-TXqSNHMPYU\">\u4e86\u89e3 MongoDB \u932f\u8aa4\u78bc &#8211; 243 &#8211; IncompatibleWithUpgradedServer<\/h2>\n<p>MongoDB \u932f\u8aa4\u78bc &#8211; 243 &#8211; IncompatibleWithUpgradedServer \u767c\u751f\u5728\u60a8\u8a66\u5716\u4f7f\u7528\u8207\u4f3a\u670d\u5668\u7248\u672c\u4e0d\u76f8\u5bb9\u7684\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u9023\u63a5\u5230 MongoDB \u4f3a\u670d\u5668\u6642\u3002\u901a\u5e38\u5728\u5c07 MongoDB \u4f3a\u670d\u5668\u5347\u7d1a\u81f3\u66f4\u65b0\u7248\u672c\u5f8c\uff0c\u800c\u4f7f\u7528\u904e\u6642\u7684\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u6642\u6703\u51fa\u73fe\u6b64\u932f\u8aa4\u3002<\/p>\n<p>\u7576\u6b64\u932f\u8aa4\u767c\u751f\u6642\uff0c\u60a8\u53ef\u80fd\u6703\u770b\u5230\u985e\u4f3c\u4ee5\u4e0b\u7684\u932f\u8aa4\u6d88\u606f\uff1a<\/p>\n<p><code>Server at xx.xx.xx.xx:27017 reports wire version 2, but this version of the Node.js Driver requires at least 3 (MongoDB 3.6)<\/code><\/p>\n<h2 id=\"causes-of-mongodb-error-code-243-incompatiblewithupgradedserver-TXqSNHMPYU\">MongoDB \u932f\u8aa4\u78bc &#8211; 243 &#8211; IncompatibleWithUpgradedServer \u7684\u539f\u56e0<\/h2>\n<p>\u6b64\u932f\u8aa4\u7684\u4e3b\u8981\u539f\u56e0\u662f\u4f7f\u7528\u4e0d\u652f\u6301\u5347\u7d1a MongoDB \u4f3a\u670d\u5668\u7684\u7dda\u8def\u5354\u8b70\u7248\u672c\u7684\u904e\u6642\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u3002\u7dda\u8def\u5354\u8b70\u662f MongoDB \u8207\u5ba2\u6236\u7aef\u61c9\u7528\u7a0b\u5e8f\u901a\u4fe1\u7684\u683c\u5f0f\u3002<\/p>\n<p>\u7576\u60a8\u5347\u7d1a MongoDB \u4f3a\u670d\u5668\u6642\uff0c\u53ef\u80fd\u6703\u5c0d\u7dda\u8def\u5354\u8b70\u9032\u884c\u66f4\u6539\u4ee5\u652f\u63f4\u65b0\u529f\u80fd\u6216\u6539\u9032\u3002\u5982\u679c\u60a8\u7684\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u4e0d\u652f\u6301\u65b0\u7684\u7dda\u8def\u5354\u8b70\u7248\u672c\uff0c\u5c31\u6703\u5c0e\u81f4 IncompatibleWithUpgradedServer \u932f\u8aa4\u3002<\/p>\n<h2 id=\"fixing-mongodb-error-code-243-incompatiblewithupgradedserver-TXqSNHMPYU\">\u4fee\u5fa9 MongoDB \u932f\u8aa4\u78bc &#8211; 243 &#8211; IncompatibleWithUpgradedServer<\/h2>\n<p>\u8981\u4fee\u5fa9\u6b64\u932f\u8aa4\uff0c\u60a8\u9700\u8981\u5c07\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u5347\u7d1a\u5230\u652f\u63f4\u5347\u7d1a MongoDB \u4f3a\u670d\u5668\u7dda\u8def\u5354\u8b70\u7684\u7248\u672c\u3002\u8acb\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u9032\u884c\uff1a<\/p>\n<h3 id=\"step-1-identify-the-client-driver-version-TXqSNHMPYU\">\u6b65\u9a5f 1\uff1a\u78ba\u5b9a\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u7248\u672c<\/h3>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u78ba\u5b9a\u60a8\u7576\u524d\u4f7f\u7528\u7684\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u7248\u672c\u3002\u9019\u4e9b\u4fe1\u606f\u901a\u5e38\u53ef\u4ee5\u5728\u60a8\u7684\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u7684\u6587\u4ef6\u6216\u767c\u884c\u8aaa\u660e\u4e2d\u627e\u5230\u3002<\/p>\n<h3 id=\"step-2-check-mongodb-server-version-TXqSNHMPYU\">\u6b65\u9a5f 2\uff1a\u6aa2\u67e5 MongoDB \u4f3a\u670d\u5668\u7248\u672c<\/h3>\n<p>\u63a5\u4e0b\u4f86\uff0c\u6aa2\u67e5\u60a8\u7684 MongoDB \u4f3a\u670d\u5668\u7248\u672c\u3002\u60a8\u53ef\u4ee5\u901a\u904e\u4f7f\u7528 MongoDB shell \u9023\u63a5\u5230\u4f3a\u670d\u5668\u6216\u6aa2\u67e5\u4f3a\u670d\u5668\u65e5\u8a8c\u4f86\u5b8c\u6210\u9019\u4e00\u6b65\u9a5f\u3002<\/p>\n<h3 id=\"step-3-update-the-client-driver-TXqSNHMPYU\">\u6b65\u9a5f 3\uff1a\u5347\u7d1a\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f<\/h3>\n<p>\u4e00\u65e6\u78ba\u5b9a\u4e86\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u7248\u672c\u548c MongoDB \u4f3a\u670d\u5668\u7248\u672c\uff0c\u8acb\u6aa2\u67e5\u662f\u5426\u6709\u652f\u63f4\u4f3a\u670d\u5668\u7dda\u8def\u5354\u8b70\u7248\u672c\u7684\u65b0\u7248\u672c\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u53ef\u7528\u3002<\/p>\n<p>\u8acb\u8a2a\u554f\u60a8\u7684\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u7684\u5b98\u65b9\u7db2\u7ad9\u6216\u6587\u4ef6\u4ee5\u627e\u5230\u6700\u65b0\u7248\u672c\u3002\u4e0b\u8f09\u4e26\u5b89\u88dd\u66f4\u65b0\u7684\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u3002<\/p>\n<h3 id=\"step-4-test-the-connection-TXqSNHMPYU\">\u6b65\u9a5f 4\uff1a\u6e2c\u8a66\u9023\u63a5<\/h3>\n<p>\u5728\u5347\u7d1a\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u5f8c\uff0c\u6e2c\u8a66\u8207 MongoDB \u4f3a\u670d\u5668\u7684\u9023\u63a5\uff0c\u4ee5\u78ba\u4fdd\u932f\u8aa4\u5df2\u88ab\u89e3\u6c7a\u3002\u5982\u679c\u9023\u63a5\u6210\u529f\uff0c\u60a8\u5df2\u7d93\u4fee\u5fa9\u4e86 MongoDB \u932f\u8aa4\u78bc &#8211; 243 &#8211; IncompatibleWithUpgradedServer\u3002<\/p>\n<h2 id=\"summary-TXqSNHMPYU\">\u7e3d\u7d50<\/h2>\n<p>MongoDB \u932f\u8aa4\u78bc &#8211; 243 &#8211; IncompatibleWithUpgradedServer \u767c\u751f\u5728\u60a8\u8a66\u5716\u4f7f\u7528\u4e0d\u652f\u6301\u4f3a\u670d\u5668\u7dda\u8def\u5354\u8b70\u7248\u672c\u7684\u904e\u6642\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u9023\u63a5\u5230 MongoDB \u4f3a\u670d\u5668\u6642\u3002\u8981\u4fee\u5fa9\u6b64\u932f\u8aa4\uff0c\u60a8\u9700\u8981\u5c07\u5ba2\u6236\u7aef\u9a45\u52d5\u7a0b\u5e8f\u5347\u7d1a\u5230\u8207\u5347\u7d1a\u5f8c\u7684 MongoDB \u4f3a\u670d\u5668\u76f8\u5bb9\u7684\u7248\u672c\u3002\u901a\u904e\u9075\u5faa\u672c\u6587\u4e2d\u6982\u8ff0\u7684\u6b65\u9a5f\uff0c\u60a8\u53ef\u4ee5\u89e3\u6c7a\u6b64\u932f\u8aa4\uff0c\u4e26\u78ba\u4fdd\u8207\u60a8\u7684 MongoDB \u4f3a\u670d\u5668\u4e4b\u9593\u7684\u9806\u66a2\u9023\u63a5\u3002<\/p>\n<p>\u6b32\u4e86\u89e3\u66f4\u591a\u6709\u95dc VPS \u4e3b\u6a5f\u89e3\u6c7a\u65b9\u6848\u7684\u8cc7\u8a0a\uff0c\u8acb\u8a2a\u554f<a href=\"https:\/\/server.hk\">Server.HK<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4fee\u5fa9 MongoDB \u932f\u8aa4\u78bc&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-21826","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=21826"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21826\/revisions"}],"predecessor-version":[{"id":23530,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21826\/revisions\/23530"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=21826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=21826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=21826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}