{"id":5242,"date":"2024-11-14T08:19:57","date_gmt":"2024-11-14T00:19:57","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5242\/"},"modified":"2024-11-14T08:19:57","modified_gmt":"2024-11-14T00:19:57","slug":"mysql%e6%80%8e%e4%b9%88%e6%9f%a5%e7%9c%8b%e7%89%88%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5242\/","title":{"rendered":"mysql\u600e\u4e48\u67e5\u770b\u7248\u672c"},"content":{"rendered":"<blockquote><p>\n  \u901a\u8fc7 show variables like &#8216;version%&#8217; \u547d\u4ee4\u53ef\u67e5\u770b mysql \u7248\u672c\uff0c\u663e\u793a\u7248\u672c\u53f7\u548c\u6ce8\u91ca\u3002\u5176\u4ed6\u65b9\u6cd5\u5305\u62ec\uff1amysql &#8211;version \u547d\u4ee4\u3001\u68c0\u67e5 mysql \u914d\u7f6e\u6587\u4ef6\u6216\u4f7f\u7528 php \u7684 mysql_get_server_info() \u51fd\u6570\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/26\/2024052617190677299.jpg\" class=\"aligncenter\" title=\"mysql\u600e\u4e48\u67e5\u770b\u7248\u672c\u63d2\u56fe\" alt=\"mysql\u600e\u4e48\u67e5\u770b\u7248\u672c\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 MySQL \u4e2d\u67e5\u770b\u7248\u672c\uff1f<\/strong><\/p>\n<p>\u67e5\u770b MySQL \u7248\u672c\u6700\u7b80\u5355\u5feb\u6377\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>SHOW VARIABLES LIKE 'version%';<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u663e\u793a\u6709\u5173 MySQL \u7248\u672c\u7684\u4fe1\u606f\uff0c\u5305\u62ec\uff1a<\/p>\n<ul>\n<li> <strong>version<\/strong>: MySQL \u670d\u52a1\u5668\u7684\u5b8c\u6574\u7248\u672c\u53f7\u3002<\/li>\n<li> <strong>version_comment<\/strong>: \u7248\u672c\u7684\u6ce8\u91ca\uff08\u5982\u679c\u5b58\u5728\uff09\u3002<\/li>\n<\/ul>\n<p><strong>\u5176\u4ed6\u65b9\u6cd5<\/strong><\/p>\n<p>\u9664\u4e0a\u8ff0\u65b9\u6cd5\u5916\uff0c\u60a8\u8fd8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u67e5\u770b MySQL \u7248\u672c\uff1a<\/p>\n<ul>\n<li>\n<p><strong>\u4f7f\u7528  &#8211;version \u547d\u4ee4\uff1a<\/strong><\/p>\n<p>\u8fd9\u5c06\u5728\u7ec8\u7aef\u7a97\u53e3\u4e2d\u6253\u5370 MySQL \u7248\u672c\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u68c0\u67e5 MySQL \u914d\u7f6e\u6587\u4ef6\uff1a<\/strong><\/p>\n<p>MySQL \u914d\u7f6e\u6587\u4ef6\uff08\u901a\u5e38\u79f0\u4e3a my.cnf \u6216 my.ini\uff09\u901a\u5e38\u5305\u542b\u7248\u672c\u4fe1\u606f\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u901a\u8fc7 PHP \u7684 mysql_get_server_info() \u51fd\u6570\uff1a<\/strong><\/p>\n<p>\u5982\u679c\u60a8\u6b63\u5728\u4f7f\u7528 PHP \u8fde\u63a5\u5230 MySQL \u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528 mysql_get_server_info() \u51fd\u6570\u83b7\u53d6\u7248\u672c\u4fe1\u606f\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u67e5\u770b\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>\u901a\u8fc7 show variables like &#8216;version%&#8217; \u547d\u4ee4\u53ef\u67e5\u770b mysql \u7248\u672c\uff0c\u663e\u793a\u7248\u672c\u53f7\u548c\u6ce8\u91ca\u3002\u5176\u4ed6\u65b9\u6cd5\u5305\u62ec\uff1amysql &#8211;version \u547d\u4ee4\u3001\u68c0\u67e5 mysql \u914d\u7f6e\u6587\u4ef6\u6216\u4f7f\u7528 php \u7684 mysql_get_server_info() \u51fd\u6570\u3002 \u5982\u4f55\u5728 MySQL \u4e2d\u67e5\u770b\u7248\u672c\uff1f \u67e5\u770b MySQL \u7248\u672c\u6700\u7b80\u5355\u5feb\u6377\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a SHOW VARIABLES LIKE &#8216;version%&#8217;; \u767b\u5f55\u540e\u590d\u5236 \u8fd9\u5c06\u663e\u793a\u6709\u5173 MySQL \u7248\u672c\u7684\u4fe1\u606f\uff0c\u5305\u62ec\uff1a version: MySQL \u670d\u52a1\u5668\u7684\u5b8c\u6574\u7248\u672c\u53f7\u3002 version_comment: \u7248\u672c\u7684\u6ce8\u91ca\uff08\u5982\u679c\u5b58\u5728\uff09\u3002 \u5176\u4ed6\u65b9\u6cd5 \u9664\u4e0a\u8ff0\u65b9\u6cd5\u5916\uff0c\u60a8\u8fd8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u67e5\u770b MySQL \u7248\u672c\uff1a \u4f7f\u7528 &#8211;version \u547d\u4ee4\uff1a \u8fd9\u5c06\u5728\u7ec8\u7aef\u7a97\u53e3\u4e2d\u6253\u5370 MySQL \u7248\u672c\u3002 \u68c0\u67e5 MySQL \u914d\u7f6e\u6587\u4ef6\uff1a MySQL \u914d\u7f6e\u6587\u4ef6\uff08\u901a\u5e38\u79f0\u4e3a my.cnf \u6216 my.ini\uff09\u901a\u5e38\u5305\u542b\u7248\u672c\u4fe1\u606f\u3002 \u901a\u8fc7 PHP [&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-5242","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5242","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=5242"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5242\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}