{"id":7550,"date":"2024-11-14T12:28:48","date_gmt":"2024-11-14T04:28:48","guid":{"rendered":"https:\/\/fwq.ai\/blog\/7550\/"},"modified":"2024-11-14T12:28:48","modified_gmt":"2024-11-14T04:28:48","slug":"mysql-%e8%ae%be%e7%bd%ae%e9%bb%98%e8%ae%a4%e5%80%bc%e6%97%b6%ef%bc%8c%e5%ad%97%e7%ac%a6%e4%b8%b2%e7%b1%bb%e5%9e%8b%e5%ad%97%e6%ae%b5%e4%b8%ba%e4%bb%80%e4%b9%88%e8%a6%81%e5%8a%a0%e5%bc%95%e5%8f%b7","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/7550\/","title":{"rendered":"MySQL \u8bbe\u7f6e\u9ed8\u8ba4\u503c\u65f6\uff0c\u5b57\u7b26\u4e32\u7c7b\u578b\u5b57\u6bb5\u4e3a\u4ec0\u4e48\u8981\u52a0\u5f15\u53f7\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173098038658020.jpg\" class=\"aligncenter\" title=\"MySQL \u8bbe\u7f6e\u9ed8\u8ba4\u503c\u65f6\uff0c\u5b57\u7b26\u4e32\u7c7b\u578b\u5b57\u6bb5\u4e3a\u4ec0\u4e48\u8981\u52a0\u5f15\u53f7\uff1f\u63d2\u56fe\" alt=\"MySQL \u8bbe\u7f6e\u9ed8\u8ba4\u503c\u65f6\uff0c\u5b57\u7b26\u4e32\u7c7b\u578b\u5b57\u6bb5\u4e3a\u4ec0\u4e48\u8981\u52a0\u5f15\u53f7\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong> \u8bed\u6cd5\uff1a\u8bbe\u7f6e\u9ed8\u8ba4\u503c\u65f6\u6dfb\u52a0\u5f15\u53f7\u7684\u5fc5\u8981\u6027<\/strong><\/p>\n<p>mysql \u4e2d\u8bbe\u7f6e\u9ed8\u8ba4\u503c\u65f6\uff0c\u8981\u4e0d\u8981\u52a0\u5f15\u53f7\u53d6\u51b3\u4e8e\u5b57\u6bb5\u7684\u6570\u636e\u7c7b\u578b\u3002\u5bf9\u4e8e\u5b57\u7b26\u4e32\u7c7b\u578b\u5b57\u6bb5\uff0c\u9ed8\u8ba4\u503c\u5fc5\u987b\u7528\u5355\u5f15\u53f7\u6216\u53cc\u5f15\u53f7\u62ec\u8d77\u6765\uff0c\u800c\u5bf9\u4e8e\u5176\u4ed6\u6570\u636e\u7c7b\u578b\uff08\u5982\u6570\u503c\u3001\u65e5\u671f\u6216\u679a\u4e3e\uff09\uff0c\u5219\u4e0d\u9700\u8981\u5f15\u53f7\u3002<\/p>\n<p>\u6765\u770b\u4e24\u4e2a\u793a\u4f8b\uff1a<\/p>\n<pre>-- \u5b57\u7b26\u4e32\u7c7b\u578b\u5b57\u6bb5\u7684\u6b63\u786e\u8bed\u6cd5\uff08\u4f7f\u7528\u5f15\u53f7\uff09\uff1a\nalter table qra_works add upgraded_time bigint unsigned not null default '3600' after created_time;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<pre>-- \u6570\u503c\u7c7b\u578b\u5b57\u6bb5\u7684\u6b63\u786e\u8bed\u6cd5\uff08\u4e0d\u4f7f\u7528\u5f15\u53f7\uff09\uff1a\nALTER TABLE qra_works ADD upgraded_time BIGINT UNSIGNED NOT NULL DEFAULT 3600 AFTER created_time;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u4e3a\u4ec0\u4e48\u5b57\u7b26\u7c7b\u578b\u5b57\u6bb5\u9700\u8981\u5f15\u53f7\uff1f<\/strong><\/p>\n<p>\u5b57\u7b26\u4e32\u7c7b\u578b\u5b57\u6bb5\u7684\u503c\u672c\u8d28\u4e0a\u662f\u6587\u672c\uff0c\u5fc5\u987b\u7528\u5f15\u53f7\u62ec\u8d77\u6765\u4ee5\u5c06\u5176\u4e0e\u6570\u5b57\u6216\u5176\u4ed6\u975e\u6587\u672c\u503c\u533a\u5206\u5f00\u6765\u3002\u5982\u679c\u6ca1\u6709\u5f15\u53f7\uff0cmysql \u5c06\u628a\u9ed8\u8ba4\u503c\u89c6\u4e3a\u4e00\u4e2a\u6570\u5b57\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bfc\u81f4\u610f\u5916\u7684\u884c\u4e3a\u3002<\/p>\n<p><strong>\u7ed3\u8bba<\/strong><\/p>\n<p>\u8bbe\u7f6e mysql \u5b57\u6bb5\u7684\u9ed8\u8ba4\u503c\u65f6\uff0c\u8bf7\u52a1\u5fc5\u8bb0\u4f4f\u5b57\u7b26\u4e32\u7c7b\u578b\u5b57\u6bb5\u9700\u8981\u7528\u5f15\u53f7\u62ec\u8d77\u6765\uff0c\u800c\u5176\u4ed6\u6570\u636e\u7c7b\u578b\u5219\u4e0d\u9700\u8981\u3002\u5982\u679c\u4e0d\u9075\u5b88\u8fd9\u4e00\u89c4\u5219\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u95ee\u9898\u6216\u610f\u5916\u7ed3\u679c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fMySQL \u8bbe\u7f6e\u9ed8\u8ba4\u503c\u65f6\uff0c\u5b57\u7b26\u4e32\u7c7b\u578b\u5b57\u6bb5\u4e3a\u4ec0\u4e48\u8981\u52a0\u5f15\u53f7\uff1f\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>\u8bed\u6cd5\uff1a\u8bbe\u7f6e\u9ed8\u8ba4\u503c\u65f6\u6dfb\u52a0\u5f15\u53f7\u7684\u5fc5\u8981\u6027 mysql \u4e2d\u8bbe\u7f6e\u9ed8\u8ba4\u503c\u65f6\uff0c\u8981\u4e0d\u8981\u52a0\u5f15\u53f7\u53d6\u51b3\u4e8e\u5b57\u6bb5\u7684\u6570\u636e\u7c7b\u578b\u3002\u5bf9\u4e8e\u5b57\u7b26\u4e32\u7c7b\u578b\u5b57\u6bb5\uff0c\u9ed8\u8ba4\u503c\u5fc5\u987b\u7528\u5355\u5f15\u53f7\u6216\u53cc\u5f15\u53f7\u62ec\u8d77\u6765\uff0c\u800c\u5bf9\u4e8e\u5176\u4ed6\u6570\u636e\u7c7b\u578b\uff08\u5982\u6570\u503c\u3001\u65e5\u671f\u6216\u679a\u4e3e\uff09\uff0c\u5219\u4e0d\u9700\u8981\u5f15\u53f7\u3002 \u6765\u770b\u4e24\u4e2a\u793a\u4f8b\uff1a &#8212; \u5b57\u7b26\u4e32\u7c7b\u578b\u5b57\u6bb5\u7684\u6b63\u786e\u8bed\u6cd5\uff08\u4f7f\u7528\u5f15\u53f7\uff09\uff1a alter table qra_works add upgraded_time bigint unsigned not null default &#8216;3600&#8217; after created_time; \u767b\u5f55\u540e\u590d\u5236 &#8212; \u6570\u503c\u7c7b\u578b\u5b57\u6bb5\u7684\u6b63\u786e\u8bed\u6cd5\uff08\u4e0d\u4f7f\u7528\u5f15\u53f7\uff09\uff1a ALTER TABLE qra_works ADD upgraded_time BIGINT UNSIGNED NOT NULL DEFAULT 3600 AFTER created_time; \u767b\u5f55\u540e\u590d\u5236 \u4e3a\u4ec0\u4e48\u5b57\u7b26\u7c7b\u578b\u5b57\u6bb5\u9700\u8981\u5f15\u53f7\uff1f \u5b57\u7b26\u4e32\u7c7b\u578b\u5b57\u6bb5\u7684\u503c\u672c\u8d28\u4e0a\u662f\u6587\u672c\uff0c\u5fc5\u987b\u7528\u5f15\u53f7\u62ec\u8d77\u6765\u4ee5\u5c06\u5176\u4e0e\u6570\u5b57\u6216\u5176\u4ed6\u975e\u6587\u672c\u503c\u533a\u5206\u5f00\u6765\u3002\u5982\u679c\u6ca1\u6709\u5f15\u53f7\uff0cmysql \u5c06\u628a\u9ed8\u8ba4\u503c\u89c6\u4e3a\u4e00\u4e2a\u6570\u5b57\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bfc\u81f4\u610f\u5916\u7684\u884c\u4e3a\u3002 \u7ed3\u8bba \u8bbe\u7f6e mysql \u5b57\u6bb5\u7684\u9ed8\u8ba4\u503c\u65f6\uff0c\u8bf7\u52a1\u5fc5\u8bb0\u4f4f\u5b57\u7b26\u4e32\u7c7b\u578b\u5b57\u6bb5\u9700\u8981\u7528\u5f15\u53f7\u62ec\u8d77\u6765\uff0c\u800c\u5176\u4ed6\u6570\u636e\u7c7b\u578b\u5219\u4e0d\u9700\u8981\u3002\u5982\u679c\u4e0d\u9075\u5b88\u8fd9\u4e00\u89c4\u5219\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u95ee\u9898\u6216\u610f\u5916\u7ed3\u679c\u3002 \u4ee5\u4e0a\u5c31\u662fMySQL \u8bbe\u7f6e\u9ed8\u8ba4\u503c\u65f6\uff0c\u5b57\u7b26\u4e32\u7c7b\u578b\u5b57\u6bb5\u4e3a\u4ec0\u4e48\u8981\u52a0\u5f15\u53f7\uff1f\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},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-7550","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7550","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=7550"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7550\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=7550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=7550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=7550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}