{"id":15433,"date":"2024-11-17T21:07:10","date_gmt":"2024-11-17T13:07:10","guid":{"rendered":"https:\/\/fwq.ai\/blog\/?p=15433"},"modified":"2024-11-17T21:07:10","modified_gmt":"2024-11-17T13:07:10","slug":"mysql-5-7-%e7%9a%84%e6%96%b0%e7%89%b9%e6%80%a7","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/15433\/","title":{"rendered":"MySQL 5.7 \u7684\u65b0\u7279\u6027"},"content":{"rendered":"<p>\u672c\u6587\u7ffb\u8bd1\u81ea\u5b98\u65b9mysql 5.7\u4f7f\u7528\u624b\u518c\uff0c\u53c2\u8003\u539f\u6587\u5730\u5740\uff1ahttps:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/mysql-nutshell.html<\/p>\n<h1>\u4e00\u3001\u65b0\u589e\u7279\u6027<\/h1>\n<h4>1\u3001\u5b89\u5168\u63d0\u5347<\/h4>\n<p>1.1 \u8981\u6c42<code class=\"literal\">mysql.user\u8868\u4e2dplug\u5b57\u6bb5\u4e0d\u80fd\u4e3a\u7a7a\uff0c\u5982\u679c\u4e3a\u7a7a\uff0c\u5219\u8be5\u7528\u6237\u88ab\u7981\u6b62\u4f7f\u7528\u3002<\/code><\/p>\n<p>1.2 \u589e\u52a0\u5bc6\u7801\u8fc7\u671f\u7b56\u7565<\/p>\n<p>1.3 \u5e10\u6237\u53ef\u4ee5\u52a0\u9501\u89e3\u9501<\/p>\n<p>1.4 \u4f7f\u7528<code>mysql_ssl_rsa_setup<\/code>\u5de5\u5177\u80fd\u591f\u66f4\u5bb9\u6613\u521b\u5efa\u4f7f\u7528ssl<\/p>\n<p>&nbsp;<\/p>\n<p>1.5 \u521d\u59cb\u5316\u6570\u636e\u5e93\u65f6\u7528mysqld \u2013initialize\u66ff\u6362\u4ee5\u524d\u7684\u00a0<code>mysql_install_db<\/code><\/p>\n<h4><strong>2\u3001SQL mode changes<\/strong><\/h4>\n<p>\u9ed8\u8ba4\u542f\u7528 ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, and NO_ENGINE_SUBSTITUTION.<\/p>\n<h4>3\u3001 ONLINE DDL\u652f\u6301rename index<\/h4>\n<h4>4\u3001 \u5168\u6587\u7d22\u5f15\u652f\u6301\u4e2d\u6587\uff0c\u65e5\u8bed\uff0c\u97e9\u6587<\/h4>\n<h4>5\u3001innodb\u63d0\u5347<\/h4>\n<p>5.1 \u5728\u7ebf\u4fee\u6539varchar\u957f\u5ea6\uff0c\u652f\u6301in-place\u7b97\u6cd5\uff0c\u4f46\u8fd9\u662f\u6761\u4ef6\u7684\uff0c\u53ea\u652f\u63012\u79cd\u60c5\u51b5\uff0c\u4e00\u79cd\u662f\u957f\u5ea6\u57280\u5230-255\u4e4b\u95f4\u589e\u52a0\uff0c\u53e6\u4e00\u79cd\u662f\u5728256\u5230\u66f4\u5927\u4e4b\u95f4\u3002\u4e0d\u652f\u6301\u7531255\u4e4b\u524d\u7684\u4e00\u4e2a\u957f\u5ea6\u8df3\u5230256\u4e4b\u540e\u7684\u957f\u5ea6\u3002\u4e5f\u4e0d\u652f\u6301\u51cf\u957f\u5ea6\u3002 \u4e0d\u652f\u6301\u7684\u60c5\u51b5\u7528\u7684\u662fcopy\u7b97\u6cd5\u3002 \u6240\u4ee5\u3002\u5728\u5b9avarchar\u957f\u5ea6\u7684\u65f6\u5019\uff0c\u5982\u679c\u957f\u5ea6\u662f\u5927\u4e8e200\u4e86\uff0c\u4f46\u662f\u4e0d\u786e\u5b9a\u4ee5\u540e\u4f1a\u4e0d\u4f1a\u6539\u7684\u60c5\u51b5\u4e0b\uff0c\u5c31\u76f4\u63a5\u5199\u4e2a256\u3002<\/p>\n<p>5.2 \u4e34\u65f6\u8868TEMPORARY table\u4f18\u5316\u4e86DDL\u64cd\u4f5c\u7684\u6027\u80fd<\/p>\n<p>5.3 \u4e34\u65f6\u8868\u7684\u5143\u6570\u636e\u4e0d\u518d\u5b58innodb\u7684\u7cfb\u7edf\u8868\uff0c\u5355\u72ec\u5b58\u5728INNODB_TEMP_TABLE_INFO\u6307\u5b9a\u7684\u8868\u91cc\u3002\u5305\u542b\u6240\u6709\u7528\u6237\u7684\u4e34\u65f6\u8868\u4fe1\u606f\u3002\u8fd9\u4e2a\u8868\u5728\u7b2c\u4e00\u6b21\u6267\u884cselect\u67e5\u8be2\u65f6\u521b\u5efa\u3002<\/p>\n<p>5.4 MySQL\u652f\u6301\u5730\u7406\u7a7a\u95f4\u6570\u636e\u7c7b\u578b\uff0c \u5728\u6b64\u4e4b\u95f4\uff0cmysql\u5b58\u5728blob\u7c7b\u578b\u4e2d\u3002 \u5730\u7406\u7a7a\u95f4\u6570\u636e\uff0c\u73b0\u5728\u6620\u5c04\u6210\u5185\u90e8\u7684\u6570\u636e\u7c7b\u578bDATA_GEOMETRY<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u7ffb\u8bd1\u81ea\u5b98\u65b9mysql 5.7\u4f7f\u7528\u624b\u518c\uff0c\u53c2\u8003\u539f\u6587\u5730\u5740\uff1ahttps:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/mysql-nutshell.html \u4e00\u3001\u65b0\u589e\u7279\u6027 1\u3001\u5b89\u5168\u63d0\u5347 1.1 \u8981\u6c42mysql.user\u8868\u4e2dplug\u5b57\u6bb5\u4e0d\u80fd\u4e3a\u7a7a\uff0c\u5982\u679c\u4e3a\u7a7a\uff0c\u5219\u8be5\u7528\u6237\u88ab\u7981\u6b62\u4f7f\u7528\u3002 1.2 \u589e\u52a0\u5bc6\u7801\u8fc7\u671f\u7b56\u7565 1.3 \u5e10\u6237\u53ef\u4ee5\u52a0\u9501\u89e3\u9501 1.4 \u4f7f\u7528mysql_ssl_rsa_setup\u5de5\u5177\u80fd\u591f\u66f4\u5bb9\u6613\u521b\u5efa\u4f7f\u7528ssl &nbsp; 1.5 \u521d\u59cb\u5316\u6570\u636e\u5e93\u65f6\u7528mysqld \u2013initialize\u66ff\u6362\u4ee5\u524d\u7684\u00a0mysql_install_db 2\u3001SQL mode changes \u9ed8\u8ba4\u542f\u7528 ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, and NO_ENGINE_SUBSTITUTION. 3\u3001 ONLINE DDL\u652f\u6301rename index 4\u3001 \u5168\u6587\u7d22\u5f15\u652f\u6301\u4e2d\u6587\uff0c\u65e5\u8bed\uff0c\u97e9\u6587 5\u3001innodb\u63d0\u5347 5.1 \u5728\u7ebf\u4fee\u6539varchar\u957f\u5ea6\uff0c\u652f\u6301in-place\u7b97\u6cd5\uff0c\u4f46\u8fd9\u662f\u6761\u4ef6\u7684\uff0c\u53ea\u652f\u63012\u79cd\u60c5\u51b5\uff0c\u4e00\u79cd\u662f\u957f\u5ea6\u57280\u5230-255\u4e4b\u95f4\u589e\u52a0\uff0c\u53e6\u4e00\u79cd\u662f\u5728256\u5230\u66f4\u5927\u4e4b\u95f4\u3002\u4e0d\u652f\u6301\u7531255\u4e4b\u524d\u7684\u4e00\u4e2a\u957f\u5ea6\u8df3\u5230256\u4e4b\u540e\u7684\u957f\u5ea6\u3002\u4e5f\u4e0d\u652f\u6301\u51cf\u957f\u5ea6\u3002 \u4e0d\u652f\u6301\u7684\u60c5\u51b5\u7528\u7684\u662fcopy\u7b97\u6cd5\u3002 \u6240\u4ee5\u3002\u5728\u5b9avarchar\u957f\u5ea6\u7684\u65f6\u5019\uff0c\u5982\u679c\u957f\u5ea6\u662f\u5927\u4e8e200\u4e86\uff0c\u4f46\u662f\u4e0d\u786e\u5b9a\u4ee5\u540e\u4f1a\u4e0d\u4f1a\u6539\u7684\u60c5\u51b5\u4e0b\uff0c\u5c31\u76f4\u63a5\u5199\u4e2a256\u3002 5.2 \u4e34\u65f6\u8868TEMPORARY table\u4f18\u5316\u4e86DDL\u64cd\u4f5c\u7684\u6027\u80fd 5.3 \u4e34\u65f6\u8868\u7684\u5143\u6570\u636e\u4e0d\u518d\u5b58innodb\u7684\u7cfb\u7edf\u8868\uff0c\u5355\u72ec\u5b58\u5728INNODB_TEMP_TABLE_INFO\u6307\u5b9a\u7684\u8868\u91cc\u3002\u5305\u542b\u6240\u6709\u7528\u6237\u7684\u4e34\u65f6\u8868\u4fe1\u606f\u3002\u8fd9\u4e2a\u8868\u5728\u7b2c\u4e00\u6b21\u6267\u884cselect\u67e5\u8be2\u65f6\u521b\u5efa\u3002 5.4 MySQL\u652f\u6301\u5730\u7406\u7a7a\u95f4\u6570\u636e\u7c7b\u578b\uff0c \u5728\u6b64\u4e4b\u95f4\uff0cmysql\u5b58\u5728blob\u7c7b\u578b\u4e2d\u3002 \u5730\u7406\u7a7a\u95f4\u6570\u636e\uff0c\u73b0\u5728\u6620\u5c04\u6210\u5185\u90e8\u7684\u6570\u636e\u7c7b\u578bDATA_GEOMETRY<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-15433","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/15433","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=15433"}],"version-history":[{"count":1,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/15433\/revisions"}],"predecessor-version":[{"id":15434,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/15433\/revisions\/15434"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=15433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=15433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=15433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}