{"id":5517,"date":"2024-11-14T12:25:47","date_gmt":"2024-11-14T04:25:47","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5517\/"},"modified":"2024-11-14T12:25:47","modified_gmt":"2024-11-14T04:25:47","slug":"mysql%e6%80%8e%e4%b9%88%e6%9f%a5%e8%af%a2%e6%89%80%e6%9c%89%e7%9a%84%e8%a1%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5517\/","title":{"rendered":"mysql\u600e\u4e48\u67e5\u8be2\u6240\u6709\u7684\u8868"},"content":{"rendered":"<blockquote><p>\n  \u4f7f\u7528 show tables \u67e5\u8be2 mysql \u4e2d\u7684\u6240\u6709\u8868\u3002 \u5176\u4ed6\u65b9\u6cd5\uff1a 1. select name from information_schema.tables; 2. select * from mysql.tables;\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/29\/2024052907272050572.jpg\" class=\"aligncenter\" title=\"mysql\u600e\u4e48\u67e5\u8be2\u6240\u6709\u7684\u8868\u63d2\u56fe\" alt=\"mysql\u600e\u4e48\u67e5\u8be2\u6240\u6709\u7684\u8868\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u67e5\u8be2 MySQL \u4e2d\u6240\u6709\u7684\u8868<\/strong><\/p>\n<p>\u5728 MySQL \u4e2d\u67e5\u8be2\u6240\u6709\u8868\u7684\u6700\u5feb\u6377\u65b9\u5f0f\u662f\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>SHOW TABLES;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u8be6\u7ec6\u6267\u884c\u6b65\u9aa4\uff1a<\/strong><\/p>\n<ol>\n<li> <strong>\u6253\u5f00 MySQL \u63a7\u5236\u53f0\u3002<\/strong>\u60a8\u53ef\u4ee5\u5728\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165  \u6765\u542f\u52a8 MySQL \u63a7\u5236\u53f0\u3002<\/li>\n<li>\n<p><strong>\u8fde\u63a5\u5230 MySQL \u6570\u636e\u5e93\u3002<\/strong>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fde\u63a5\u5230\u6240\u9700\u7684\u6570\u636e\u5e93\uff1a<\/p>\n<pre>USE &lt;database_name&gt;;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p><strong>\u6267\u884c SHOW TABLES \u547d\u4ee4\u3002<\/strong>\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u67e5\u8be2\u6240\u6709\u8868\uff1a<\/p>\n<pre>SHOW TABLES;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li> <strong>\u67e5\u770b\u7ed3\u679c\u3002<\/strong>\u8be5\u547d\u4ee4\u5c06\u8fd4\u56de\u6240\u6709\u8868\u7684\u540d\u79f0\u4f5c\u4e3a\u5217\u8868\u3002<\/li>\n<\/ol>\n<p><strong>\u5176\u4ed6\u9009\u9879\uff1a<\/strong><\/p>\n<p>\u9664\u4e86 SHOW TABLES \u547d\u4ee4\uff0c\u8fd8\u6709\u4e00\u4e9b\u5176\u4ed6\u65b9\u6cd5\u53ef\u4ee5\u67e5\u8be2 MySQL \u4e2d\u7684\u8868\uff1a<\/p>\n<ul>\n<li> <strong>SELECT name FROM information_schema.tables;\uff1a<\/strong>\u4f7f\u7528 information_schema \u6570\u636e\u5e93\u83b7\u53d6\u8868\u4fe1\u606f\u3002<\/li>\n<li> <strong>SELECT * FROM mysql.tables;\uff1a<\/strong>\u4f7f\u7528 MySQL \u7cfb\u7edf\u6570\u636e\u5e93\u83b7\u53d6\u8868\u4fe1\u606f\u3002<\/li>\n<\/ul>\n<p><strong>\u6ce8\u610f\uff1a<\/strong><\/p>\n<ul>\n<li>\u8fd9\u4e9b\u547d\u4ee4\u5bf9\u4e8e\u67e5\u8be2\u672c\u5730\u6570\u636e\u5e93\u4e2d\u7684\u8868\u662f\u6709\u6548\u7684\u3002\u5982\u679c\u60a8\u8fde\u63a5\u5230\u8fdc\u7a0b\u6570\u636e\u5e93\uff0c\u53ef\u80fd\u9700\u8981\u8c03\u6574\u547d\u4ee4\u3002<\/li>\n<li>\u67e5\u8be2\u7ed3\u679c\u53ef\u80fd\u56e0\u6570\u636e\u5e93\u548c\u7528\u6237\u6743\u9650\u800c\u5f02\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u67e5\u8be2\u6240\u6709\u7684\u8868\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>\u4f7f\u7528 show tables \u67e5\u8be2 mysql \u4e2d\u7684\u6240\u6709\u8868\u3002 \u5176\u4ed6\u65b9\u6cd5\uff1a 1. select name from information_schema.tables; 2. select * from mysql.tables; \u5982\u4f55\u67e5\u8be2 MySQL \u4e2d\u6240\u6709\u7684\u8868 \u5728 MySQL \u4e2d\u67e5\u8be2\u6240\u6709\u8868\u7684\u6700\u5feb\u6377\u65b9\u5f0f\u662f\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a SHOW TABLES; \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 \u8be6\u7ec6\u6267\u884c\u6b65\u9aa4\uff1a \u6253\u5f00 MySQL \u63a7\u5236\u53f0\u3002\u60a8\u53ef\u4ee5\u5728\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165 \u6765\u542f\u52a8 MySQL \u63a7\u5236\u53f0\u3002 \u8fde\u63a5\u5230 MySQL \u6570\u636e\u5e93\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fde\u63a5\u5230\u6240\u9700\u7684\u6570\u636e\u5e93\uff1a USE &lt;database_name&gt;; \u767b\u5f55\u540e\u590d\u5236 \u6267\u884c SHOW TABLES \u547d\u4ee4\u3002\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u67e5\u8be2\u6240\u6709\u8868\uff1a SHOW TABLES; \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 \u67e5\u770b\u7ed3\u679c\u3002\u8be5\u547d\u4ee4\u5c06\u8fd4\u56de\u6240\u6709\u8868\u7684\u540d\u79f0\u4f5c\u4e3a\u5217\u8868\u3002 \u5176\u4ed6\u9009\u9879\uff1a \u9664\u4e86 SHOW TABLES \u547d\u4ee4\uff0c\u8fd8\u6709\u4e00\u4e9b\u5176\u4ed6\u65b9\u6cd5\u53ef\u4ee5\u67e5\u8be2 MySQL [&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-5517","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5517","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=5517"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5517\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}