{"id":5240,"date":"2024-11-14T10:33:49","date_gmt":"2024-11-14T02:33:49","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5240\/"},"modified":"2024-11-14T10:33:49","modified_gmt":"2024-11-14T02:33:49","slug":"mysql%e6%80%8e%e4%b9%88%e7%99%bb%e5%bd%95","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5240\/","title":{"rendered":"mysql\u600e\u4e48\u767b\u5f55"},"content":{"rendered":"<blockquote><p>\n  \u767b\u5f55 mysql \u6570\u636e\u5e93\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u83b7\u53d6\u767b\u5f55\u4fe1\u606f\uff1a\u4e3b\u673a\u540d\u3001\u7aef\u53e3\u53f7\u3001\u7528\u6237\u540d\u3001\u5bc6\u7801\u3002\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u6216 gui \u5de5\u5177\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002\u8f93\u5165\u767b\u5f55\u4fe1\u606f\u5e76\u767b\u5f55\u3002\u767b\u5f55\u6210\u529f\u540e\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528 sql \u547d\u4ee4\u7ba1\u7406\u6570\u636e\u5e93\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/26\/2024052617182338679.jpg\" class=\"aligncenter\" title=\"mysql\u600e\u4e48\u767b\u5f55\u63d2\u56fe\" alt=\"mysql\u600e\u4e48\u767b\u5f55\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u767b\u5f55 MySQL \u6570\u636e\u5e93<\/strong><\/p>\n<p>\u767b\u5f55 MySQL \u6570\u636e\u5e93\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<p><strong>1. \u83b7\u53d6\u767b\u5f55\u4fe1\u606f<\/strong><\/p>\n<ul>\n<li>\u4e3b\u673a\u540d\uff1aMySQL \u670d\u52a1\u5668\u7684 IP \u5730\u5740\u6216\u57df\u540d\u3002<\/li>\n<li>\u7aef\u53e3\u53f7\uff1aMySQL \u670d\u52a1\u76d1\u542c\u7684\u7aef\u53e3\uff0c\u9ed8\u8ba4\u4e3a 3306\u3002<\/li>\n<li>\u7528\u6237\u540d\uff1a\u5177\u6709\u8bbf\u95ee MySQL \u6570\u636e\u5e93\u6743\u9650\u7684\u7528\u6237\u540d\u3002<\/li>\n<li>\u5bc6\u7801\uff1a\u8be5\u7528\u6237\u7684\u5bc6\u7801\u3002<\/li>\n<\/ul>\n<p><strong>2. \u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00\u547d\u4ee4\u884c\u7ec8\u7aef\uff08\u5982 cmd\u3001Terminal \u7b49\uff09\u3002<\/li>\n<li>\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/li>\n<\/ul>\n<pre>mysql -h &lt;\u4e3b\u673a\u540d&gt; -P &lt;\u7aef\u53e3\u53f7&gt; -u &lt;\u7528\u6237\u540d&gt; -p<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ul>\n<li>\u7cfb\u7edf\u5c06\u63d0\u793a\u4f60\u8f93\u5165\u5bc6\u7801\u3002\u8f93\u5165\u540e\uff0c\u56de\u8f66\u5373\u53ef\u3002<\/li>\n<\/ul>\n<p><strong>3. \u4f7f\u7528 GUI \u5de5\u5177<\/strong><\/p>\n<ul>\n<li>\u5b89\u88c5 MySQL Workbench \u6216\u5176\u4ed6 MySQL GUI \u5de5\u5177\u3002<\/li>\n<li>\u6253\u5f00 GUI \u5de5\u5177\u5e76\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002<\/li>\n<li>\u8f93\u5165\u4e3b\u673a\u540d\u3001\u7aef\u53e3\u53f7\u3001\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002<\/li>\n<li>\u5355\u51fb\u201c\u8fde\u63a5\u201d\u6309\u94ae\u3002<\/li>\n<\/ul>\n<p><strong>\u767b\u5f55\u6210\u529f\u540e<\/strong><\/p>\n<p>\u767b\u5f55\u6210\u529f\u540e\uff0c\u4f60\u5c06\u8fdb\u5165 MySQL \u547d\u4ee4\u884c\u754c\u9762\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528 SQL \u547d\u4ee4\u6765\u67e5\u8be2\u3001\u4fee\u6539\u548c\u7ba1\u7406\u6570\u636e\u5e93\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u4ee5\u4e0b\u547d\u4ee4\u663e\u793a\u6240\u6709\u6570\u636e\u5e93\uff1a<\/p>\n<pre>SHOW DATABASES;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u540d\u4e3a &#8220;my_database&#8221; \u7684\u6570\u636e\u5e93\uff1a<\/p>\n<pre>CREATE DATABASE my_database;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u901a\u8fc7\u9075\u5faa\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5730\u767b\u5f55\u5230 MySQL \u6570\u636e\u5e93\u5e76\u5f00\u59cb\u7ba1\u7406\u4f60\u7684\u6570\u636e\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u767b\u5f55\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>\u767b\u5f55 mysql \u6570\u636e\u5e93\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u83b7\u53d6\u767b\u5f55\u4fe1\u606f\uff1a\u4e3b\u673a\u540d\u3001\u7aef\u53e3\u53f7\u3001\u7528\u6237\u540d\u3001\u5bc6\u7801\u3002\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u6216 gui \u5de5\u5177\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002\u8f93\u5165\u767b\u5f55\u4fe1\u606f\u5e76\u767b\u5f55\u3002\u767b\u5f55\u6210\u529f\u540e\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528 sql \u547d\u4ee4\u7ba1\u7406\u6570\u636e\u5e93\u3002 \u5982\u4f55\u767b\u5f55 MySQL \u6570\u636e\u5e93 \u767b\u5f55 MySQL \u6570\u636e\u5e93\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\uff1a 1. \u83b7\u53d6\u767b\u5f55\u4fe1\u606f \u4e3b\u673a\u540d\uff1aMySQL \u670d\u52a1\u5668\u7684 IP \u5730\u5740\u6216\u57df\u540d\u3002 \u7aef\u53e3\u53f7\uff1aMySQL \u670d\u52a1\u76d1\u542c\u7684\u7aef\u53e3\uff0c\u9ed8\u8ba4\u4e3a 3306\u3002 \u7528\u6237\u540d\uff1a\u5177\u6709\u8bbf\u95ee MySQL \u6570\u636e\u5e93\u6743\u9650\u7684\u7528\u6237\u540d\u3002 \u5bc6\u7801\uff1a\u8be5\u7528\u6237\u7684\u5bc6\u7801\u3002 2. \u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177 \u6253\u5f00\u547d\u4ee4\u884c\u7ec8\u7aef\uff08\u5982 cmd\u3001Terminal \u7b49\uff09\u3002 \u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a mysql -h &lt;\u4e3b\u673a\u540d&gt; -P &lt;\u7aef\u53e3\u53f7&gt; -u &lt;\u7528\u6237\u540d&gt; -p \u767b\u5f55\u540e\u590d\u5236 \u7cfb\u7edf\u5c06\u63d0\u793a\u4f60\u8f93\u5165\u5bc6\u7801\u3002\u8f93\u5165\u540e\uff0c\u56de\u8f66\u5373\u53ef\u3002 3. \u4f7f\u7528 GUI \u5de5\u5177 \u5b89\u88c5 MySQL Workbench \u6216\u5176\u4ed6 MySQL GUI \u5de5\u5177\u3002 \u6253\u5f00 GUI [&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-5240","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5240","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=5240"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5240\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}