{"id":5722,"date":"2024-11-14T13:49:41","date_gmt":"2024-11-14T05:49:41","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5722\/"},"modified":"2024-11-14T13:49:41","modified_gmt":"2024-11-14T05:49:41","slug":"sql%e6%9c%ac%e5%9c%b0%e6%95%b0%e6%8d%ae%e5%ba%93%e6%80%8e%e4%b9%88%e8%bf%9e%e6%8e%a5","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5722\/","title":{"rendered":"sql\u672c\u5730\u6570\u636e\u5e93\u600e\u4e48\u8fde\u63a5"},"content":{"rendered":"<blockquote><p>\n  \u8fde\u63a5\u5230\u672c\u5730 sql \u6570\u636e\u5e93\u7684\u6b65\u9aa4\uff1a\u9009\u62e9\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u3002\u5b89\u88c5 dbms\u3002\u521b\u5efa\u6570\u636e\u5e93\u3002\u521b\u5efa\u7528\u6237\u5e76\u6388\u4e88\u6743\u9650\u3002\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u6216 gui \u5ba2\u6237\u7aef\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002\uff08\u53ef\u9009\uff09\u4f7f\u7528 gui \u5de5\u5177\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/30\/2024053021241781721.jpg\" class=\"aligncenter\" title=\"sql\u672c\u5730\u6570\u636e\u5e93\u600e\u4e48\u8fde\u63a5\u63d2\u56fe\" alt=\"sql\u672c\u5730\u6570\u636e\u5e93\u600e\u4e48\u8fde\u63a5\u63d2\u56fe\" \/><\/p>\n<p><strong>SQL \u672c\u5730\u6570\u636e\u5e93\u8fde\u63a5\u65b9\u6cd5<\/strong><\/p>\n<p>\u8fde\u63a5\u5230\u672c\u5730 SQL \u6570\u636e\u5e93\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<p><strong>\u7b2c\u4e00\u6b65\uff1a\u9009\u62e9\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf (DBMS)<\/strong><\/p>\n<ul>\n<li>\u6700\u5e38\u89c1\u7684 DBMS \u662f MySQL\u3001PostgreSQL\u3001SQL Server \u548c Oracle\u3002<\/li>\n<li>\u9009\u62e9\u4e00\u4e2a\u4e0e\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\u548c\u7528\u9014\u517c\u5bb9\u7684 DBMS\u3002<\/li>\n<\/ul>\n<p><strong>\u7b2c\u4e8c\u6b65\uff1a\u5b89\u88c5 DBMS<\/strong><\/p>\n<ul>\n<li>\u4e0b\u8f7d\u5e76\u5b89\u88c5 DBMS \u7684\u6700\u65b0\u7248\u672c\u3002<\/li>\n<li>\u6309\u7167\u5b89\u88c5\u5411\u5bfc\u8fdb\u884c\u64cd\u4f5c\u3002<\/li>\n<\/ul>\n<p><strong>\u7b2c\u4e09\u6b65\uff1a\u521b\u5efa\u6570\u636e\u5e93<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528 DBMS \u7684\u547d\u4ee4\u884c\u6216 GUI \u5de5\u5177\u521b\u5efa\u6570\u636e\u5e93\u3002<\/li>\n<li>\u4f8b\u5982\uff0c\u5728 MySQL \u4e2d\uff1aCREATE DATABASE my_database;<\/li>\n<\/ul>\n<p><strong>\u7b2c\u56db\u6b65\uff1a\u521b\u5efa\u7528\u6237\u5e76\u6388\u4e88\u6743\u9650<\/strong><\/p>\n<ul>\n<li>\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93\u7528\u6237\u5e76\u4e3a\u5176\u5206\u914d\u8bbf\u95ee\u6743\u9650\u3002<\/li>\n<li>\u4f8b\u5982\uff0c\u5728 MySQL \u4e2d\uff1aCREATE USER my_user@localhost IDENTIFIED BY &#8216;my_password&#8217;;<\/li>\n<li>GRANT ALL PRIVILEGES ON my_database.* TO my_user;<\/li>\n<\/ul>\n<p><strong>\u7b2c\u4e94\u6b65\uff1a\u8fde\u63a5\u5230\u6570\u636e\u5e93<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u6216 GUI \u5ba2\u6237\u7aef\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002<\/li>\n<li>\u4f8b\u5982\uff0c\u5728 MySQL \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a -u my_user -p my_password my_database<\/li>\n<\/ul>\n<p><strong>\u7b2c\u516d\u6b65\uff08\u53ef\u9009\uff09\uff1a\u4f7f\u7528 GUI \u5de5\u5177<\/strong><\/p>\n<ul>\n<li>\u4e5f\u53ef\u4ee5\u4f7f\u7528 GUI \u5de5\u5177\uff08\u4f8b\u5982 MySQL Workbench \u6216 pgAdmin\uff09\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002<\/li>\n<li>\u8fd9\u4e9b\u5de5\u5177\u63d0\u4f9b\u7528\u6237\u53cb\u597d\u7684\u754c\u9762\uff0c\u7528\u4e8e\u7ba1\u7406\u6570\u636e\u5e93\u548c\u6267\u884c\u67e5\u8be2\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662fsql\u672c\u5730\u6570\u636e\u5e93\u600e\u4e48\u8fde\u63a5\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>\u8fde\u63a5\u5230\u672c\u5730 sql \u6570\u636e\u5e93\u7684\u6b65\u9aa4\uff1a\u9009\u62e9\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u3002\u5b89\u88c5 dbms\u3002\u521b\u5efa\u6570\u636e\u5e93\u3002\u521b\u5efa\u7528\u6237\u5e76\u6388\u4e88\u6743\u9650\u3002\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u6216 gui \u5ba2\u6237\u7aef\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002\uff08\u53ef\u9009\uff09\u4f7f\u7528 gui \u5de5\u5177\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002 SQL \u672c\u5730\u6570\u636e\u5e93\u8fde\u63a5\u65b9\u6cd5 \u8fde\u63a5\u5230\u672c\u5730 SQL \u6570\u636e\u5e93\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a \u7b2c\u4e00\u6b65\uff1a\u9009\u62e9\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf (DBMS) \u6700\u5e38\u89c1\u7684 DBMS \u662f MySQL\u3001PostgreSQL\u3001SQL Server \u548c Oracle\u3002 \u9009\u62e9\u4e00\u4e2a\u4e0e\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\u548c\u7528\u9014\u517c\u5bb9\u7684 DBMS\u3002 \u7b2c\u4e8c\u6b65\uff1a\u5b89\u88c5 DBMS \u4e0b\u8f7d\u5e76\u5b89\u88c5 DBMS \u7684\u6700\u65b0\u7248\u672c\u3002 \u6309\u7167\u5b89\u88c5\u5411\u5bfc\u8fdb\u884c\u64cd\u4f5c\u3002 \u7b2c\u4e09\u6b65\uff1a\u521b\u5efa\u6570\u636e\u5e93 \u4f7f\u7528 DBMS \u7684\u547d\u4ee4\u884c\u6216 GUI \u5de5\u5177\u521b\u5efa\u6570\u636e\u5e93\u3002 \u4f8b\u5982\uff0c\u5728 MySQL \u4e2d\uff1aCREATE DATABASE my_database; \u7b2c\u56db\u6b65\uff1a\u521b\u5efa\u7528\u6237\u5e76\u6388\u4e88\u6743\u9650 \u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93\u7528\u6237\u5e76\u4e3a\u5176\u5206\u914d\u8bbf\u95ee\u6743\u9650\u3002 \u4f8b\u5982\uff0c\u5728 MySQL \u4e2d\uff1aCREATE USER my_user@localhost IDENTIFIED BY &#8216;my_password&#8217;; GRANT ALL PRIVILEGES ON [&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-5722","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5722","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=5722"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5722\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5722"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}