{"id":5730,"date":"2024-11-14T13:32:57","date_gmt":"2024-11-14T05:32:57","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5730\/"},"modified":"2024-11-14T13:32:57","modified_gmt":"2024-11-14T05:32:57","slug":"sql%e6%95%b0%e6%8d%ae%e5%ba%93%e7%ab%af%e5%8f%a3%e6%80%8e%e4%b9%88%e7%9c%8b","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5730\/","title":{"rendered":"sql\u6570\u636e\u5e93\u7aef\u53e3\u600e\u4e48\u770b"},"content":{"rendered":"<blockquote><p>\n  \u5982\u4f55\u67e5\u770b sql \u6570\u636e\u5e93\u7aef\u53e3\uff1a\u76f4\u63a5\u67e5\u770b\uff1awindows\uff1a\u4f7f\u7528\u8d44\u6e90\u76d1\u89c6\u5668\u68c0\u67e5 sql \u8fdb\u7a0b\u7684\u672c\u5730\u7aef\u53e3\u3002linux\uff1a\u4f7f\u7528 netstat \u547d\u4ee4\u67e5\u627e sql \u8fdb\u7a0b\u7684\u672c\u5730\u7aef\u53e3\u3002\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u67e5\u770b\uff1amicrosoft sql server\uff1a\u5728 tcp\/ip \u5c5e\u6027\u4e2d\u67e5\u770b\u201ctcp \u7aef\u53e3\u201d\u5b57\u6bb5\u3002mysql\uff1a\u5728 my.cnf \u914d\u7f6e\u6587\u4ef6\u4e2d\u67e5\u627e port= \u53c2\u6570\u3002postgresql\uff1a\u5728 postgresql.conf \u914d\u7f6e\u6587\u4ef6\u4e2d\u67e5\u627e port= \u53c2\u6570\u3002\u901a\u8fc7 sql \u8bed\u53e5\u67e5\u8be2\uff1amicrosoft sql server\uff1a\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/30\/2024053021333867297.jpg\" class=\"aligncenter\" title=\"sql\u6570\u636e\u5e93\u7aef\u53e3\u600e\u4e48\u770b\u63d2\u56fe\" alt=\"sql\u6570\u636e\u5e93\u7aef\u53e3\u600e\u4e48\u770b\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u67e5\u770b SQL \u6570\u636e\u5e93\u7aef\u53e3<\/strong><\/p>\n<p><strong>\u76f4\u63a5\u67e5\u770b\u65b9\u6cd5\uff1a<\/strong><\/p>\n<ul>\n<li>\n<p><strong>Windows \u7cfb\u7edf\uff1a<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00\u4efb\u52a1\u7ba1\u7406\u5668 &gt; \u6027\u80fd\u9009\u9879\u5361 &gt; \u6253\u5f00\u8d44\u6e90\u76d1\u89c6\u5668\u3002<\/li>\n<li>\u5728\u7f51\u7edc\u9009\u9879\u5361\u4e2d\uff0c\u627e\u5230\u76ee\u6807 SQL \u8fdb\u7a0b\u5e76\u68c0\u67e5\u5176\u672c\u5730\u7aef\u53e3\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Linux \u7cfb\u7edf\uff1a<\/strong><\/p>\n<ul>\n<li>\u8fd0\u884c netstat -anp | grep  \u3002  <\/li>\n<li>\u627e\u5230\u76ee\u6807 SQL \u8fdb\u7a0b\u7684\u884c\uff0c\u5176\u4e2d\u7684\u672c\u5730\u7aef\u53e3\u53f7\u5373\u4e3a\u6240\u8981\u627e\u7684\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u67e5\u770b\uff1a<\/strong><\/p>\n<ul>\n<li>\n<p><strong>Microsoft SQL Server\uff1a<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 SQL Server Configuration Manager\u3002<\/li>\n<li>\u5c55\u5f00 SQL Server \u7f51\u7edc\u914d\u7f6e &gt; \u534f\u8bae &gt; TCP\/IP\u3002<\/li>\n<li>\u9009\u4e2d\u5df2\u542f\u7528\u7684 TCP\/IP \u534f\u8bae\uff0c\u7136\u540e\u5355\u51fb\u5c5e\u6027\u3002<\/li>\n<li>\u5728 IP \u5730\u5740\u9009\u9879\u5361\u4e2d\uff0c\u627e\u5230\u201cTCP \u7aef\u53e3\u201d\u5b57\u6bb5\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>MySQL\uff1a<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 MySQL \u914d\u7f6e\u6587\u4ef6\uff08\u901a\u5e38\u4e3a \/etc\/my.cnf\uff09\u3002<\/li>\n<li>\u67e5\u627e port= \u53c2\u6570\uff0c\u5176\u540e\u7684\u6570\u5b57\u5373\u4e3a MySQL \u7aef\u53e3\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>PostgreSQL\uff1a<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 PostgreSQL \u914d\u7f6e\u6587\u4ef6\uff08\u901a\u5e38\u4e3a \/etc\/postgresql.conf\uff09\u3002<\/li>\n<li>\u67e5\u627e port= \u53c2\u6570\uff0c\u5176\u540e\u7684\u6570\u5b57\u5373\u4e3a PostgreSQL \u7aef\u53e3\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>\u5176\u4ed6\u65b9\u6cd5\uff1a<\/strong><\/p>\n<ul>\n<li>\n<p>\u4f7f\u7528\u4ee5\u4e0b SQL \u8bed\u53e5\u67e5\u8be2\u6570\u636e\u5e93\u7aef\u53e3\uff1a<\/p>\n<ul>\n<li> <strong>Microsoft SQL Server\uff1a<\/strong> SELECT SERVERPROPERTY(&#8216;Port&#8217;)<\/li>\n<li> <strong>MySQL\uff1a<\/strong> SELECT @@port<\/li>\n<li> <strong>PostgreSQL\uff1a<\/strong> SHOW port<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>\u6ce8\u610f\uff1a<\/strong><\/p>\n<ul>\n<li>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cSQL \u6570\u636e\u5e93\u7aef\u53e3\u4e3a\uff1a<\/p>\n<ul>\n<li>Microsoft SQL Server\uff1a1433<\/li>\n<li>MySQL\uff1a3306<\/li>\n<li>PostgreSQL\uff1a5432<\/li>\n<\/ul>\n<\/li>\n<li>\u4f46\u662f\uff0c\u8fd9\u4e9b\u7aef\u53e3\u53ef\u4ee5\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u8fdb\u884c\u4fee\u6539\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662fsql\u6570\u636e\u5e93\u7aef\u53e3\u600e\u4e48\u770b\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u67e5\u770b sql \u6570\u636e\u5e93\u7aef\u53e3\uff1a\u76f4\u63a5\u67e5\u770b\uff1awindows\uff1a\u4f7f\u7528\u8d44\u6e90\u76d1\u89c6\u5668\u68c0\u67e5 sql \u8fdb\u7a0b\u7684\u672c\u5730\u7aef\u53e3\u3002linux\uff1a\u4f7f\u7528 netstat \u547d\u4ee4\u67e5\u627e sql \u8fdb\u7a0b\u7684\u672c\u5730\u7aef\u53e3\u3002\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u67e5\u770b\uff1amicrosoft sql server\uff1a\u5728 tcp\/ip \u5c5e\u6027\u4e2d\u67e5\u770b\u201ctcp \u7aef\u53e3\u201d\u5b57\u6bb5\u3002mysql\uff1a\u5728 my.cnf \u914d\u7f6e\u6587\u4ef6\u4e2d\u67e5\u627e port= \u53c2\u6570\u3002postgresql\uff1a\u5728 postgresql.conf \u914d\u7f6e\u6587\u4ef6\u4e2d\u67e5\u627e port= \u53c2\u6570\u3002\u901a\u8fc7 sql \u8bed\u53e5\u67e5\u8be2\uff1amicrosoft sql server\uff1a \u5982\u4f55\u67e5\u770b SQL \u6570\u636e\u5e93\u7aef\u53e3 \u76f4\u63a5\u67e5\u770b\u65b9\u6cd5\uff1a Windows \u7cfb\u7edf\uff1a \u6253\u5f00\u4efb\u52a1\u7ba1\u7406\u5668 &gt; \u6027\u80fd\u9009\u9879\u5361 &gt; \u6253\u5f00\u8d44\u6e90\u76d1\u89c6\u5668\u3002 \u5728\u7f51\u7edc\u9009\u9879\u5361\u4e2d\uff0c\u627e\u5230\u76ee\u6807 SQL \u8fdb\u7a0b\u5e76\u68c0\u67e5\u5176\u672c\u5730\u7aef\u53e3\u3002 Linux \u7cfb\u7edf\uff1a \u8fd0\u884c netstat -anp | grep \u3002 \u627e\u5230\u76ee\u6807 SQL \u8fdb\u7a0b\u7684\u884c\uff0c\u5176\u4e2d\u7684\u672c\u5730\u7aef\u53e3\u53f7\u5373\u4e3a\u6240\u8981\u627e\u7684\u3002 \u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u67e5\u770b\uff1a Microsoft SQL Server\uff1a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-5730","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=5730"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5730\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}