{"id":6456,"date":"2024-11-14T09:26:40","date_gmt":"2024-11-14T01:26:40","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6456\/"},"modified":"2024-11-14T09:26:40","modified_gmt":"2024-11-14T01:26:40","slug":"%e6%80%8e%e4%b9%88%e6%9f%a5mysql%e6%95%b0%e6%8d%ae%e5%ba%93%e7%89%88%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6456\/","title":{"rendered":"\u600e\u4e48\u67e5mysql\u6570\u636e\u5e93\u7248\u672c"},"content":{"rendered":"<blockquote><p>\n  \u8981\u67e5\u8be2 mysql \u6570\u636e\u5e93\u7248\u672c\uff0c\u6709\u4ee5\u4e0b\u4e09\u79cd\u65b9\u6cd5\uff1a\u4f7f\u7528 select version() \u547d\u4ee4\u4f7f\u7528 show variables like &#8216;version&#8217; \u547d\u4ee4\u4f7f\u7528 mysqld &#8211;version \u547d\u4ee4\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202408\/05\/2024080507514336548.jpg\" class=\"aligncenter\" title=\"\u600e\u4e48\u67e5mysql\u6570\u636e\u5e93\u7248\u672c\u63d2\u56fe\" alt=\"\u600e\u4e48\u67e5mysql\u6570\u636e\u5e93\u7248\u672c\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u67e5\u8be2 MySQL \u6570\u636e\u5e93\u7248\u672c<\/strong><\/p>\n<p>\u8981\u67e5\u8be2 MySQL \u6570\u636e\u5e93\u7248\u672c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\uff1a<\/p>\n<p><strong>1. \u4f7f\u7528 SELECT VERSION() \u547d\u4ee4<\/strong><\/p>\n<pre>SELECT VERSION();<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6b64\u547d\u4ee4\u5c06\u8fd4\u56de MySQL \u670d\u52a1\u5668\u7684\u7248\u672c\u53f7\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre>mysql&gt; SELECT VERSION();\n+---------------+\n| VERSION()     |\n+---------------+\n| 8.0.26-mysql  |\n+---------------+\n1 row in set (0.00 sec)<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>2. \u4f7f\u7528 SHOW VARIABLES LIKE &#8216;version&#8217; \u547d\u4ee4<\/strong><\/p>\n<p>\u6b64\u547d\u4ee4\u5c06\u663e\u793a\u5305\u542b MySQL \u7248\u672c\u53f7\u7684 version \u7cfb\u7edf\u53d8\u91cf\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre>SHOW VARIABLES LIKE 'version';<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u8fd4\u56de\u4ee5\u4e0b\u8f93\u51fa\uff1a<\/p>\n<pre>mysql&gt; SHOW VARIABLES LIKE 'version';\n+---------------+-----------------+\n| Variable_name | Value            |\n+---------------+-----------------+\n| version        | 8.0.26-mysql      |\n+---------------+-----------------+\n1 row in set (0.00 sec)<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>3. \u4f7f\u7528 d &#8211;version \u547d\u4ee4<\/strong><\/p>\n<p>\u6b64\u547d\u4ee4\u5c06\u663e\u793a MySQL \u670d\u52a1\u5668\u7684\u7248\u672c\u4fe1\u606f\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre>$ mysqld --version\nmysql  Ver 8.0.26-mysql for Linux on x86_64 (MySQL Community Server - GPL)<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u67e5\u6570\u636e\u5e93\u7248\u672c\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>\u8981\u67e5\u8be2 mysql \u6570\u636e\u5e93\u7248\u672c\uff0c\u6709\u4ee5\u4e0b\u4e09\u79cd\u65b9\u6cd5\uff1a\u4f7f\u7528 select version() \u547d\u4ee4\u4f7f\u7528 show variables like &#8216;version&#8217; \u547d\u4ee4\u4f7f\u7528 mysqld &#8211;version \u547d\u4ee4 \u5982\u4f55\u67e5\u8be2 MySQL \u6570\u636e\u5e93\u7248\u672c \u8981\u67e5\u8be2 MySQL \u6570\u636e\u5e93\u7248\u672c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\uff1a 1. \u4f7f\u7528 SELECT VERSION() \u547d\u4ee4 SELECT VERSION(); \u767b\u5f55\u540e\u590d\u5236 \u6b64\u547d\u4ee4\u5c06\u8fd4\u56de MySQL \u670d\u52a1\u5668\u7684\u7248\u672c\u53f7\uff0c\u5982\u4e0b\u6240\u793a\uff1a mysql&gt; SELECT VERSION(); +&#8212;&#8212;&#8212;&#8212;&#8212;+ | VERSION() | +&#8212;&#8212;&#8212;&#8212;&#8212;+ | 8.0.26-mysql | +&#8212;&#8212;&#8212;&#8212;&#8212;+ 1 row in set (0.00 sec) \u767b\u5f55\u540e\u590d\u5236 2. \u4f7f\u7528 SHOW VARIABLES LIKE [&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-6456","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6456","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=6456"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6456\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}