{"id":1968,"date":"2017-09-13T15:09:08","date_gmt":"2017-09-13T07:09:08","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=1968"},"modified":"2017-09-13T15:17:12","modified_gmt":"2017-09-13T07:17:12","slug":"shell%e8%84%9a%e6%9c%ac%e5%ae%9e%e7%8e%b0%e5%ae%9a%e6%97%b6%e6%b8%85%e7%90%86postgres%e6%95%b0%e6%8d%ae%e5%ba%93%e4%b8%ad%e7%9a%84%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=1968","title":{"rendered":"shell\u811a\u672c\u5b9e\u73b0\u5b9a\u65f6\u6e05\u7406postgres\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e"},"content":{"rendered":"<p>\n\t\u7f51\u4e0a\u6709\u5f88\u591a\u5173\u4e8e <a href=\"https:\/\/www.xttblog.com\/?tag=MySQL\" name=\"MySQL\" target=\"_blank\" title=\"MySQL\">mysql<\/a> \u7684\u5b9a\u65f6\u6e05\u7406\u6570\u636e\u5e93\u5185\u5bb9\u7684\u811a\u672c\uff08shell\uff09\uff0c\u4f46\u662f\u9488\u5bf9 <a href=\"https:\/\/www.xttblog.com\/?tag=PostGreSQL\" name=\"PostGreSQL\" target=\"_blank\" title=\"PostGreSQL\">PostgreSQL<\/a> \u7684\u76f8\u5173\u5185\u5bb9\u51e0\u4e4e\u6ca1\u6709\u3002\u672c\u4eba\u66fe\u7ecf\u4f7f\u7528\u8fc7 mysql\uff0cOracle\uff0cPostgreSQL\uff0cSQL Server\uff0cgreeplum\u7b49\u6570\u636e\u5e93\uff0c\u4eca\u5929\u6211\u4eec\u4e3b\u8981\u8bb2\u89e3 PostgreSQL \u6570\u636e\u5e93\u7684\u5b9a\u65f6\u6e05\u7406\u6570\u636e\u5e93\u811a\u672c\u7684\u7f16\u5199\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"shell\u5b9a\u65f6\u6e05\u7406\u6570\u636e\u5e93\u811a\u672c\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/1543563A223.jpg\" style=\"width: 390px;height: 175px\" \/>\n<\/p>\n<p>\n\tmysql \u6570\u636e\u5e93\u5f88\u5e38\u7528\uff0c\u6240\u4ee5\u7f51\u4e0a\u7684\u7b54\u6848\u5f88\u591a\uff0cPostgreSQL \u6570\u636e\u5e93\u7528\u7684\u4eba\u8f83\u5c11\uff0c\u4f46\u6211\u4eec\u4e5f\u5fc5\u987b\u638c\u63e1\u3002\n<\/p>\n<p>\n\tPostgreSQL \u6570\u636e\u5e93\u6e05\u7406\u6570\u636e\u5e93\u7684\u547d\u4ee4\u5982\u4e0b\uff1a\n<\/p>\n<pre class=\"brush:sql;\">\r\npsql -h xxxx  -U dbuser  -p port -d dbname  -c &#039;UPDATE config SET value =&#039;500&#039; where id=312;&#039;<\/pre>\n<p>\n\t\u76f8\u5173\u53c2\u6570\u89e3\u91ca\u5982\u4e0b\uff1a\n<\/p>\n<ul>\n<li>\n\t\t-h \u540e\u9762\u63a5host\n\t<\/li>\n<li>\n\t\t-p \u540e\u9762\u63a5\u7aef\u53e3\n\t<\/li>\n<li>\n\t\t-d \u540e\u9762\u662f\u6570\u636e\u5e93\u540d\n\t<\/li>\n<\/ul>\n<p>\n\t\u73b0\u5728\u770b\u4e0a\u9762\u7684\u811a\u672c\u597d\u50cf\u6ca1\u6709\u8f93\u5165\u5bc6\u7801\u3002\u90a3\u662f\u56e0\u4e3a\u6211\u5728~\u76ee\u5f55\u4e0b.pgpass\u6587\u4ef6\u4e2d\u52a0\u5165\u9700\u8981\u767b\u5f55\u7684\u670d\u52a1\u5668\u7684\u4fe1\u606f\uff0c\u683c\u5f0f\uff1a\u5730\u5740:\u7aef\u53e3:\u7528\u6237\u540d:\u5bc6\u7801\u3002\n<\/p>\n<p>\n\t\u53e6\u5916\u5982\u679c\u4f60\u662froot\u7528\u6237\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u7f16\u5199\u811a\u672c\u3002\n<\/p>\n<pre class=\"brush:bash;\">\r\nsu -l postgres -s \/bin\/bash -c &quot;psql -h xxxx  -U dbuser  -p port -d dbname  -c &#039;UPDATE config SET value =&#039;500&#039; where id=312;&#039;&quot;\r\n<\/pre>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=1968\">shell\u811a\u672c\u5b9e\u73b0\u5b9a\u65f6\u6e05\u7406postgres\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u7f51\u4e0a\u6709\u5f88\u591a\u5173\u4e8e mysql \u7684\u5b9a\u65f6\u6e05\u7406\u6570\u636e\u5e93\u5185\u5bb9\u7684\u811a\u672c\uff08shell\uff09\uff0c\u4f46\u662f\u9488\u5bf9 PostgreSQL \u7684\u76f8\u5173\u5185 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118,12],"tags":[83,429,1130],"class_list":["post-1968","post","type-post","status-publish","format-standard","hentry","category-ndisdevelop","category-sql","tag-mysql","tag-postgresql","tag-shell-"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1968","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1968"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1968\/revisions"}],"predecessor-version":[{"id":1969,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1968\/revisions\/1969"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}