{"id":6622,"date":"2024-11-14T11:21:43","date_gmt":"2024-11-14T03:21:43","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6622\/"},"modified":"2024-11-14T11:21:43","modified_gmt":"2024-11-14T03:21:43","slug":"%e6%80%8e%e4%b9%88%e5%af%bc%e5%85%a5mysql%e6%95%b0%e6%8d%ae%e5%ba%93%e6%96%87%e4%bb%b6-mysql%e6%95%b0%e6%8d%ae%e5%ba%93%e6%80%8e%e4%b9%88%e5%af%bc%e5%85%a5sql%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6622\/","title":{"rendered":"\u600e\u4e48\u5bfc\u5165mysql\u6570\u636e\u5e93\u6587\u4ef6 mysql\u6570\u636e\u5e93\u600e\u4e48\u5bfc\u5165sql\u6587\u4ef6"},"content":{"rendered":"<blockquote><p>\n  \u5bfc\u5165 sql \u6587\u4ef6\u5230 mysql \u6570\u636e\u5e93\u7684\u65b9\u6cd5\uff1a\u4f7f\u7528 mysql \u5ba2\u6237\u7aef\u6267\u884c source \u547d\u4ee4\uff0c\u540e\u8ddf\u6587\u4ef6\u8def\u5f84\u3002\u4f7f\u7528 mysql workbench \u6216 phpmyadmin \u7b49\u5de5\u5177\uff0c\u5bfc\u822a\u5230\u76ee\u6807\u6570\u636e\u5e93\u5e76\u901a\u8fc7\u201c\u5bfc\u5165\u201d\u9009\u9879\u5bfc\u5165\u6587\u4ef6\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202408\/13\/2024081315281312623.jpg\" class=\"aligncenter\" title=\"\u600e\u4e48\u5bfc\u5165mysql\u6570\u636e\u5e93\u6587\u4ef6 mysql\u6570\u636e\u5e93\u600e\u4e48\u5bfc\u5165sql\u6587\u4ef6\u63d2\u56fe\" alt=\"\u600e\u4e48\u5bfc\u5165mysql\u6570\u636e\u5e93\u6587\u4ef6 mysql\u6570\u636e\u5e93\u600e\u4e48\u5bfc\u5165sql\u6587\u4ef6\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5c06 SQL \u6587\u4ef6\u5bfc\u5165 MySQL \u6570\u636e\u5e93<\/strong><\/p>\n<p><strong>\u5bfc\u5165 MySQL \u6570\u636e\u5e93\u6587\u4ef6\u7684\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p><strong>\u4f7f\u7528 MySQL \u5ba2\u6237\u7aef<\/strong><\/p>\n<ol>\n<li>\u6253\u5f00 MySQL \u5ba2\u6237\u7aef\u5e76\u8fde\u63a5\u5230\u76ee\u6807\u6570\u636e\u5e93\u3002<\/li>\n<li>\u4f7f\u7528 SOURCE \u547d\u4ee4\uff0c\u540e\u8ddf\u8981\u5bfc\u5165\u7684 SQL \u6587\u4ef6\u8def\u5f84\uff1a<\/li>\n<\/ol>\n<pre>SOURCE \/path\/to\/database.sql;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u4f7f\u7528\u5bfc\u5165\u5de5\u5177<\/strong><\/p>\n<ol>\n<li>\u5728 MySQL Workbench \u6216 phpMyAdmin \u7b49\u5de5\u5177\u4e2d\uff0c\u5bfc\u822a\u5230\u76ee\u6807\u6570\u636e\u5e93\u3002<\/li>\n<li>\u627e\u5230\u201c\u5bfc\u5165\u201d\u9009\u9879\u5361\u6216\u6309\u94ae\u3002<\/li>\n<li>\u9009\u62e9\u8981\u5bfc\u5165\u7684 SQL \u6587\u4ef6\u5e76\u5355\u51fb\u201c\u5bfc\u5165\u201d\u6309\u94ae\u3002<\/li>\n<\/ol>\n<p><strong>\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/strong><\/p>\n<p><strong>\u4f7f\u7528 MySQL \u5ba2\u6237\u7aef<\/strong><\/p>\n<ol>\n<li>\u6253\u5f00 MySQL \u5ba2\u6237\u7aef\uff08\u4f8b\u5982\uff1aMySQL Command Line Client \u6216 MySQL Workbench\uff09\u3002<\/li>\n<li>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fde\u63a5\u5230\u76ee\u6807\u6570\u636e\u5e93\uff1a<\/li>\n<\/ol>\n<pre>mysql -u username -p password database_name<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ul>\n<li>\u5176\u4e2d username \u662f\u6570\u636e\u5e93\u7528\u6237\u540d\uff0cpassword \u662f\u5bc6\u7801\uff0cdatabase_name \u662f\u8981\u8fde\u63a5\u7684\u76ee\u6807\u6570\u636e\u5e93\u3002<\/li>\n<li>\u8f93\u5165\u5bc6\u7801\u5e76\u6309 Enter \u952e\u3002<\/li>\n<li>\u5bfc\u822a\u5230\u8981\u5bfc\u5165 SQL \u6587\u4ef6\u7684\u76ee\u5f55\u3002<\/li>\n<li>\u6267\u884c SOURCE \u547d\u4ee4\uff0c\u540e\u8ddf\u6587\u4ef6\u8def\u5f84\uff1a<\/li>\n<\/ul>\n<pre>SOURCE \/path\/to\/database.sql;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u4f7f\u7528 MySQL Workbench<\/strong><\/p>\n<ol>\n<li>\u6253\u5f00 MySQL Workbench\u3002<\/li>\n<li>\u8fde\u63a5\u5230\u76ee\u6807\u6570\u636e\u5e93\u3002<\/li>\n<li>\u5355\u51fb\u201cDatabase\u201d\u7a97\u683c\u4e2d\u7684\u201c\u7ba1\u7406\u201d\u9009\u9879\u5361\u3002<\/li>\n<li>\u627e\u5230\u201c\u5bfc\u5165\u201d\u90e8\u5206\uff0c\u7136\u540e\u5355\u51fb\u201c\u5bfc\u5165 .sql \u6587\u4ef6\u201d\u6309\u94ae\u3002<\/li>\n<li>\u9009\u62e9\u8981\u5bfc\u5165\u7684 SQL \u6587\u4ef6\u5e76\u5355\u51fb\u201c\u6253\u5f00\u201d\u6309\u94ae\u3002<\/li>\n<\/ol>\n<p><strong>\u4f7f\u7528 phpMyAdmin<\/strong><\/p>\n<ol>\n<li>\u6253\u5f00 phpMyAdmin \u7f51\u9875\u3002<\/li>\n<li>\u4ece\u5de6\u7a97\u683c\u4e2d\u9009\u62e9\u76ee\u6807\u6570\u636e\u5e93\u3002<\/li>\n<li>\u5355\u51fb\u9876\u90e8\u7684\u201c\u5bfc\u5165\u201d\u9009\u9879\u5361\u3002<\/li>\n<li>\u5355\u51fb\u201c\u6d4f\u89c8\u201d\u6309\u94ae\u9009\u62e9\u8981\u5bfc\u5165\u7684 SQL \u6587\u4ef6\u3002<\/li>\n<li>\u5355\u51fb\u201c\u6267\u884c\u201d\u6309\u94ae\u5f00\u59cb\u5bfc\u5165\u3002<\/li>\n<\/ol>\n<p><strong>\u6ce8\u610f\uff1a<\/strong><\/p>\n<ul>\n<li>\u786e\u4fdd\u60a8\u6709\u5bfc\u5165\u6587\u4ef6\u7684\u6743\u9650\u3002<\/li>\n<li>\u5982\u679c SQL \u6587\u4ef6\u5305\u542b\u591a\u4e2a\u8bed\u53e5\uff0c\u8bf7\u4f7f\u7528\u5206\u53f7\u5206\u9694\u5b83\u4eec\u3002<\/li>\n<li>\u5bfc\u5165\u5b8c\u6210\u540e\uff0c\u8bf7\u68c0\u67e5\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e\u4ee5\u786e\u4fdd\u6210\u529f\u5bfc\u5165\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6 mysql\u6570\u636e\u5e93\u600e\u4e48\u5bfc\u5165sql\u6587\u4ef6\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>\u5bfc\u5165 sql \u6587\u4ef6\u5230 mysql \u6570\u636e\u5e93\u7684\u65b9\u6cd5\uff1a\u4f7f\u7528 mysql \u5ba2\u6237\u7aef\u6267\u884c source \u547d\u4ee4\uff0c\u540e\u8ddf\u6587\u4ef6\u8def\u5f84\u3002\u4f7f\u7528 mysql workbench \u6216 phpmyadmin \u7b49\u5de5\u5177\uff0c\u5bfc\u822a\u5230\u76ee\u6807\u6570\u636e\u5e93\u5e76\u901a\u8fc7\u201c\u5bfc\u5165\u201d\u9009\u9879\u5bfc\u5165\u6587\u4ef6\u3002 \u5982\u4f55\u5c06 SQL \u6587\u4ef6\u5bfc\u5165 MySQL \u6570\u636e\u5e93 \u5bfc\u5165 MySQL \u6570\u636e\u5e93\u6587\u4ef6\u7684\u65b9\u6cd5\uff1a \u4f7f\u7528 MySQL \u5ba2\u6237\u7aef \u6253\u5f00 MySQL \u5ba2\u6237\u7aef\u5e76\u8fde\u63a5\u5230\u76ee\u6807\u6570\u636e\u5e93\u3002 \u4f7f\u7528 SOURCE \u547d\u4ee4\uff0c\u540e\u8ddf\u8981\u5bfc\u5165\u7684 SQL \u6587\u4ef6\u8def\u5f84\uff1a SOURCE \/path\/to\/database.sql; \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 \u4f7f\u7528\u5bfc\u5165\u5de5\u5177 \u5728 MySQL Workbench \u6216 phpMyAdmin \u7b49\u5de5\u5177\u4e2d\uff0c\u5bfc\u822a\u5230\u76ee\u6807\u6570\u636e\u5e93\u3002 \u627e\u5230\u201c\u5bfc\u5165\u201d\u9009\u9879\u5361\u6216\u6309\u94ae\u3002 \u9009\u62e9\u8981\u5bfc\u5165\u7684 SQL \u6587\u4ef6\u5e76\u5355\u51fb\u201c\u5bfc\u5165\u201d\u6309\u94ae\u3002 \u8be6\u7ec6\u6b65\u9aa4\uff1a \u4f7f\u7528 MySQL \u5ba2\u6237\u7aef \u6253\u5f00 MySQL \u5ba2\u6237\u7aef\uff08\u4f8b\u5982\uff1aMySQL [&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-6622","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6622","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=6622"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6622\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}