{"id":426567,"date":"2021-04-07T23:56:11","date_gmt":"2021-04-07T15:56:11","guid":{"rendered":"http:\/\/4563.org\/?p=426567"},"modified":"2021-04-07T23:56:11","modified_gmt":"2021-04-07T15:56:11","slug":"%e6%b1%82%e5%8a%a9%ef%bc%8c%e9%98%bf%e9%87%8c%e4%ba%91-%e4%ba%91%e5%bc%80%e5%8f%91%e5%b9%b3%e5%8f%b0%e8%bf%9e%e6%8e%a5%e9%98%bf%e9%87%8c%e4%ba%91-rds-%e5%a4%b1%e8%b4%a5","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=426567","title":{"rendered":"\u6c42\u52a9\uff0c\u963f\u91cc\u4e91-\u4e91\u5f00\u53d1\u5e73\u53f0\u8fde\u63a5\u963f\u91cc\u4e91 RDS \u5931\u8d25"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6c42\u52a9\uff0c\u963f\u91cc\u4e91-\u4e91\u5f00\u53d1\u5e73\u53f0\u8fde\u63a5\u963f\u91cc\u4e91 RDS \u5931\u8d25               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : GDouble <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u4e91\u5f00\u53d1\u5e73\u53f0\u4e0a\u7684\u90e8\u7f72\u914d\u7f6e\u6709 vpc \u53ef\u4ee5\u9009\u62e9\uff0c\u73af\u5883\u53d8\u91cf\u4e5f\u914d\u7f6e\u4e86<\/p>\n<p>https:\/\/i.loli.net\/2021\/04\/08\/Zt7fTKYGdxJ4jSB.jpg<\/p>\n<p>https:\/\/i.loli.net\/2021\/04\/08\/xVeLg96XQ8nIDSG.jpg<\/p>\n<p>\u7528\u7684\u662f node.js \u8fde\u63a5 mysql \u6570\u636e\u5e93<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b<br \/>var mysql = require(&#8216;mysql&#8217;);<br \/>var connection = mysql.createConnection({<br \/> user : &#8216;x x x&#8217;,<br \/> password : &#8216;x x x&#8217;,<br \/> database : &#8216;x x x&#8217;<br \/>});<br \/>connection.connect(function(err){<br \/> if(err){<br \/> console.log(err);<br \/> return;<br \/> }<br \/>})<br \/>var addSql = &#8216;INSERT INTO user(id,name) VALUES(0,?)&#8217;;<br \/>var addSqlParams = [&#8216;\u83dc\u9e1f\u5de5\u5177&#8217;];<br \/>connection.query(addSql,addSqlParams);<br \/>connection.end();<\/p>\n<p>\u62a5\u9519\u4fe1\u606f<br \/>2021-04-08T14:17:15.241Z d85da8ef-17b2-4c29-bb54-60f23ea39070 [verbose] Error: connect ECONNREFUSED 127.0.0.1:3306<\/p>\n<p> errno: &#8216;ECONNREFUSED&#8217;,<br \/> code: &#8216;ECONNREFUSED&#8217;,<br \/> syscall: &#8216;connect&#8217;,<br \/> address: &#8216;127.0.0.1&#8217;,<br \/> port: 3306,<br \/> fatal: true      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>9<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5723540\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : GDouble <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e5f\u7528\u8fc7\u8fd9\u79cd\u5e94\u7528\u914d\u7f6e\u65b9\u6cd5<br \/>#\u5185\u7f51\u8bbf\u95ee\u914d\u7f6e<br \/>url=jdbc:mysql:\/\/rm-xxxxxxxxxxxxx.mysql.rds.aliyuncs.com:3306\/taskmanager<br \/>username=taskmanager<br \/>password=task!23456                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5723541\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : GDouble <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @GDouble \u540c\u6837\u62a5\u9519                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5723542\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ss098 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f46\u4f60\u7684 Address \u586b\u7684\u4e0d\u662f 127.0.0.1 \uff1f<\/p>\n<p>\u7ed9\u7684\u6570\u636e\u5e93\u4e0d\u662f\u8fd9\u4e2a\u5730\u5740\u5427\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5723543\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : GDouble <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ss098 \u5916\u9762\u5df2\u7ecf\u914d\u7f6e\u4e86 rds \u7684\u5185\u7f51\u5730\u5740\uff0crm-xxxxxxxxxxxxx.mysql.rds.aliyuncs.com                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5723544\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : GDouble <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ss098 \u611f\u89c9\u53ef\u80fd\u662f\u56e0\u4e3a\u6211\u4ee3\u7801 new connection \u7684\u65f6\u5019 host \u6ca1\u5199\u9ed8\u8ba4\u4e3a localhost \u7684\u4e86\u3002\u4f46\u6211\u4e0d\u77e5\u9053\u8be5\u600e\u4e48\u6539\u554a\uff0c\u76f4\u63a5\u5199\u90a3\u5185\u7f51\u5730\u5740\u76f4\u63a5\u4e0d\u7b26\u5408\u8bed\u6cd5\uff0crm-\u5f00\u5934\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5723545\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ss098 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/github.com\/mysqljs\/mysql<\/p>\n<p>\u6587\u6863\u91cc\u9762\u6709\u7684\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5723546\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ch2 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             mysql.createConnection({<br \/>user : &#8216;x x x&#8217;,<br \/>password : &#8216;x x x&#8217;,<br \/>database : &#8216;x x x&#8217;<br \/>});<\/p>\n<p>\u52a0\u4e0a host:\u4f60\u7684\u5185\u7f51\u57df\u540d                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5723547\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : GDouble <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ch2 \u8fd9\u56de\u53d8 ETIMEOUT \u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5723548\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : GDouble <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ch2 \u95ee\u9898\u5df2\u89e3\u51b3\uff0c\u8c22\u8c22\u5927\u4f6c\u56de\u590d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6c42\u52a9\uff0c\u963f\u91cc\u4e91-\u4e91\u5f00\u53d1\u5e73\u53f0\u8fde\u63a5\u963f\u91cc\u4e91&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/426567"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=426567"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/426567\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=426567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=426567"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=426567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}