{"id":6681,"date":"2024-11-14T08:17:44","date_gmt":"2024-11-14T00:17:44","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6681\/"},"modified":"2024-11-14T08:17:44","modified_gmt":"2024-11-14T00:17:44","slug":"mysql%e5%ae%89%e8%a3%85%e6%95%99%e7%a8%8b5-5%e5%ae%89%e8%a3%85%e5%a5%bd%e4%ba%86%e5%9c%a8%e5%93%aa%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6681\/","title":{"rendered":"mysql\u5b89\u88c5\u6559\u7a0b5.5\u5b89\u88c5\u597d\u4e86\u5728\u54ea\u4f7f\u7528"},"content":{"rendered":"<blockquote><p>\n  mysql 5.5 \u7684\u5b89\u88c5\u6d41\u7a0b\u5305\u542b\u591a\u4e2a\u6b65\u9aa4\uff0c\u4f46\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u9700\u8981\u786e\u5b9a\u5b89\u88c5\u76ee\u5f55\u4ee5\u4f7f\u7528 mysql\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u5f15\u5bfc\u60a8\u627e\u5230 mysql 5.5 \u7684\u5b89\u88c5\u76ee\u5f55\uff0c\u4ee5\u4fbf\u60a8\u6210\u529f\u4f7f\u7528\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u3002\u6211\u4eec\u5c06\u9010\u6b65\u8bf4\u660e windows\u3001macos \u548c linux \u64cd\u4f5c\u7cfb\u7edf\u4e2d mysql \u7684\u5b89\u88c5\u76ee\u5f55\u4f4d\u7f6e\uff0c\u5e2e\u52a9\u60a8\u5feb\u901f\u5b9a\u4f4d\u5e76\u5f00\u59cb\u4f7f\u7528 mysql\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202410\/17\/2024101715331428051.jpg\" class=\"aligncenter\" title=\"mysql\u5b89\u88c5\u6559\u7a0b5.5\u5b89\u88c5\u597d\u4e86\u5728\u54ea\u4f7f\u7528\u63d2\u56fe\" alt=\"mysql\u5b89\u88c5\u6559\u7a0b5.5\u5b89\u88c5\u597d\u4e86\u5728\u54ea\u4f7f\u7528\u63d2\u56fe\" \/><\/p>\n<p style=\"margin-top: 0px;margin-bottom: 9px;font-family:\"><strong>MySQL 5.5 \u5b89\u88c5\u540e\u4f7f\u7528\u6559\u7a0b<\/strong><\/p>\n<p style=\"margin-top: 0px;margin-bottom: 9px;font-family:\"><strong>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u5728\u4ee5\u4e0b\u4f4d\u7f6e\u4f7f\u7528 MySQL 5.5\uff1a<\/strong><\/p>\n<ol>\n<li><strong>\u547d\u4ee4\u884c<\/strong><\/li>\n<\/ol>\n<ul>\n<li>\u6253\u5f00\u547d\u4ee4\u884c\u7ec8\u7aef\u3002<\/li>\n<li>\n<p style=\"margin-top: 0px;margin-bottom: 9px\">\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u8fde\u63a5\u5230 MySQL\uff1a<\/p>\n<pre>mysql&nbsp;-u&nbsp;root&nbsp;-p<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\u66ff\u6362&nbsp;root&nbsp;\u4e3a MySQL \u6839\u7528\u6237\u7684\u7528\u6237\u540d\uff0c\u5e76\u5728\u63d0\u793a\u7b26\u4e0b\u8f93\u5165\u5bc6\u7801\u3002<\/li>\n<\/ul>\n<ol>\n<li><strong>MySQL Workbench<\/strong><\/li>\n<\/ol>\n<ul>\n<li>\u542f\u52a8 MySQL Workbench\u3002<\/li>\n<li>\u5355\u51fb\u201c\u6570\u636e\u5e93\u201d&gt;\u201c\u8fde\u63a5\u5230\u6570\u636e\u5e93\u201d\u3002<\/li>\n<li>\u5728\u201c\u4e3b\u673a\u540d\/\u5730\u5740\u201d\u5b57\u6bb5\u4e2d\u8f93\u5165 MySQL \u670d\u52a1\u5668\u5730\u5740\uff08\u901a\u5e38\u4e3a&nbsp;localhost\uff09\u3002<\/li>\n<li>\u5728\u201c\u7528\u6237\u540d\u201d\u5b57\u6bb5\u4e2d\u8f93\u5165 MySQL \u6839\u7528\u6237\u7684\u7528\u6237\u540d\u3002<\/li>\n<li>\u5728\u201c\u5bc6\u7801\u201d\u5b57\u6bb5\u4e2d\u8f93\u5165\u5bc6\u7801\u3002<\/li>\n<li>\u5355\u51fb\u201c\u786e\u5b9a\u201d\u8fde\u63a5\u5230 MySQL \u6570\u636e\u5e93\u670d\u52a1\u5668\u3002<\/li>\n<\/ul>\n<ol>\n<li><strong>\u7b2c\u4e09\u65b9\u5e94\u7528\u7a0b\u5e8f<\/strong><\/li>\n<\/ol>\n<ul>\n<li>\u8bb8\u591a\u5e94\u7528\u7a0b\u5e8f\u548c\u5de5\u5177\u652f\u6301\u8fde\u63a5\u5230 MySQL \u6570\u636e\u5e93\u3002\u8fd9\u4e9b\u5e94\u7528\u7a0b\u5e8f\u901a\u5e38\u5177\u6709\u81ea\u5df1\u7684\u8fde\u63a5\u8bbe\u7f6e\u3002<\/li>\n<li>\u6309\u7167\u5e94\u7528\u7a0b\u5e8f\u6587\u6863\u4e2d\u7684\u8bf4\u660e\u8fde\u63a5\u5230 MySQL \u6570\u636e\u5e93\u3002<\/li>\n<\/ul>\n<p style=\"margin-top: 0px;margin-bottom: 9px;font-family:\"><strong>\u4f7f\u7528 MySQL<\/strong><\/p>\n<p style=\"margin-top: 0px;margin-bottom: 9px;font-family:\">\u4e00\u65e6\u8fde\u63a5\u5230 MySQL\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6267\u884c\u4efb\u52a1\uff1a<\/p>\n<ul>\n<li>\n<p style=\"margin-top: 0px;margin-bottom: 9px\"><strong>\u521b\u5efa\u6570\u636e\u5e93\uff1a<\/strong><\/p>\n<pre>CREATE&nbsp;DATABASE&nbsp;databasename;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p style=\"margin-top: 0px;margin-bottom: 9px\"><strong>\u9009\u62e9\u6570\u636e\u5e93\uff1a<\/strong><\/p>\n<pre>USE&nbsp;databasename;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p style=\"margin-top: 0px;margin-bottom: 9px\"><strong>\u521b\u5efa\u8868\uff1a<\/strong><\/p>\n<pre>CREATE&nbsp;TABLE&nbsp;tablename&nbsp;(\n&nbsp;&nbsp;column1&nbsp;datatype,\n&nbsp;&nbsp;column2&nbsp;datatype,\n&nbsp;&nbsp;...\n);<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p style=\"margin-top: 0px;margin-bottom: 9px\"><strong>\u63d2\u5165\u6570\u636e\uff1a<\/strong><\/p>\n<pre>INSERT&nbsp;INTO&nbsp;tablename&nbsp;(column1,&nbsp;column2,&nbsp;...)&nbsp;VALUES&nbsp;(value1,&nbsp;value2,&nbsp;...);<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p style=\"margin-top: 0px;margin-bottom: 9px\"><strong>\u67e5\u8be2\u6570\u636e\uff1a<\/strong><\/p>\n<pre>SELECT&nbsp;column1,&nbsp;column2,&nbsp;...&nbsp;FROM&nbsp;tablename&nbsp;WHERE&nbsp;condition;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p style=\"margin-top: 0px;margin-bottom: 9px\"><strong>\u66f4\u65b0\u6570\u636e\uff1a<\/strong><\/p>\n<pre>UPDATE&nbsp;tablename&nbsp;SET&nbsp;column1&nbsp;=&nbsp;newvalue,&nbsp;column2&nbsp;=&nbsp;newvalue,&nbsp;...&nbsp;WHERE&nbsp;condition;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p style=\"margin-top: 0px;margin-bottom: 9px\"><strong>\u5220\u9664\u6570\u636e\uff1a<\/strong><\/p>\n<pre>DELETE&nbsp;FROM&nbsp;tablename&nbsp;WHERE&nbsp;condition;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ul>\n<p style=\"margin-top: 0px;margin-bottom: 9px;font-family:\"><strong>\u5176\u4ed6\u8d44\u6e90<\/strong><\/p>\n<ul>\n<li>[MySQL \u5b98\u65b9\u6587\u6863](https:\/\/dev..com\/doc\/)<\/li>\n<li>[MySQL Workbench \u7528\u6237\u624b\u518c](https:\/\/dev.mysql.com\/doc\/workbench\/)<\/li>\n<li>[MySQL \u547d\u4ee4\u884c\u53c2\u8003](https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/)<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5b89\u88c5\u6559\u7a0b5.5\u5b89\u88c5\u597d\u4e86\u5728\u54ea\u4f7f\u7528\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>mysql 5.5 \u7684\u5b89\u88c5\u6d41\u7a0b\u5305\u542b\u591a\u4e2a\u6b65\u9aa4\uff0c\u4f46\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u9700\u8981\u786e\u5b9a\u5b89\u88c5\u76ee\u5f55\u4ee5\u4f7f\u7528 mysql\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u5f15\u5bfc\u60a8\u627e\u5230 mysql 5.5 \u7684\u5b89\u88c5\u76ee\u5f55\uff0c\u4ee5\u4fbf\u60a8\u6210\u529f\u4f7f\u7528\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u3002\u6211\u4eec\u5c06\u9010\u6b65\u8bf4\u660e windows\u3001macos \u548c linux \u64cd\u4f5c\u7cfb\u7edf\u4e2d mysql \u7684\u5b89\u88c5\u76ee\u5f55\u4f4d\u7f6e\uff0c\u5e2e\u52a9\u60a8\u5feb\u901f\u5b9a\u4f4d\u5e76\u5f00\u59cb\u4f7f\u7528 mysql\u3002 MySQL 5.5 \u5b89\u88c5\u540e\u4f7f\u7528\u6559\u7a0b \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u5728\u4ee5\u4e0b\u4f4d\u7f6e\u4f7f\u7528 MySQL 5.5\uff1a \u547d\u4ee4\u884c \u6253\u5f00\u547d\u4ee4\u884c\u7ec8\u7aef\u3002 \u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u8fde\u63a5\u5230 MySQL\uff1a mysql&nbsp;-u&nbsp;root&nbsp;-p \u767b\u5f55\u540e\u590d\u5236 \u66ff\u6362&nbsp;root&nbsp;\u4e3a MySQL \u6839\u7528\u6237\u7684\u7528\u6237\u540d\uff0c\u5e76\u5728\u63d0\u793a\u7b26\u4e0b\u8f93\u5165\u5bc6\u7801\u3002 MySQL Workbench \u542f\u52a8 MySQL Workbench\u3002 \u5355\u51fb\u201c\u6570\u636e\u5e93\u201d&gt;\u201c\u8fde\u63a5\u5230\u6570\u636e\u5e93\u201d\u3002 \u5728\u201c\u4e3b\u673a\u540d\/\u5730\u5740\u201d\u5b57\u6bb5\u4e2d\u8f93\u5165 MySQL \u670d\u52a1\u5668\u5730\u5740\uff08\u901a\u5e38\u4e3a&nbsp;localhost\uff09\u3002 \u5728\u201c\u7528\u6237\u540d\u201d\u5b57\u6bb5\u4e2d\u8f93\u5165 MySQL \u6839\u7528\u6237\u7684\u7528\u6237\u540d\u3002 \u5728\u201c\u5bc6\u7801\u201d\u5b57\u6bb5\u4e2d\u8f93\u5165\u5bc6\u7801\u3002 \u5355\u51fb\u201c\u786e\u5b9a\u201d\u8fde\u63a5\u5230 MySQL \u6570\u636e\u5e93\u670d\u52a1\u5668\u3002 \u7b2c\u4e09\u65b9\u5e94\u7528\u7a0b\u5e8f \u8bb8\u591a\u5e94\u7528\u7a0b\u5e8f\u548c\u5de5\u5177\u652f\u6301\u8fde\u63a5\u5230 MySQL \u6570\u636e\u5e93\u3002\u8fd9\u4e9b\u5e94\u7528\u7a0b\u5e8f\u901a\u5e38\u5177\u6709\u81ea\u5df1\u7684\u8fde\u63a5\u8bbe\u7f6e\u3002 \u6309\u7167\u5e94\u7528\u7a0b\u5e8f\u6587\u6863\u4e2d\u7684\u8bf4\u660e\u8fde\u63a5\u5230 MySQL \u6570\u636e\u5e93\u3002 \u4f7f\u7528 MySQL \u4e00\u65e6\u8fde\u63a5\u5230 [&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-6681","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6681","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=6681"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6681\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}