{"id":6467,"date":"2024-11-14T08:40:45","date_gmt":"2024-11-14T00:40:45","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6467\/"},"modified":"2024-11-14T08:40:45","modified_gmt":"2024-11-14T00:40:45","slug":"%e6%80%8e%e4%b9%88%e6%9f%a5%e7%9c%8bmysql%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%86%e7%a0%81","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6467\/","title":{"rendered":"\u600e\u4e48\u67e5\u770bmysql\u6570\u636e\u5e93\u5bc6\u7801"},"content":{"rendered":"<blockquote><p>\n  \u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u6cd5\u67e5\u770b mysql \u6570\u636e\u5e93\u5bc6\u7801\uff1a\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684 password= \u884c\uff0c\u5bc6\u7801\u4ee5\u52a0\u5bc6\u683c\u5f0f\u663e\u793a\u3002\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u6267\u884c select password from mysql.user where user = &#8216;your_username&#8217;;\uff0c\u5bc6\u7801\u540c\u6837\u4e3a\u52a0\u5bc6\u683c\u5f0f\u3002\u5728 mysql \u7ba1\u7406\u5de5\u5177\u4e2d\u5bfc\u822a\u5230 &#8220;\u7528\u6237&#8221; \u9009\u9879\u5361\u5e76\u70b9\u51fb &#8220;\u7f16\u8f91&#8221;\uff0c\u5bc6\u7801\u4f1a\u663e\u793a\u5728 &#8220;\u5bc6\u7801&#8221; \u5b57\u6bb5\uff0c\u4ecd\u4e3a\u52a0\u5bc6\u683c\u5f0f\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202408\/05\/2024080508071374118.jpg\" class=\"aligncenter\" title=\"\u600e\u4e48\u67e5\u770bmysql\u6570\u636e\u5e93\u5bc6\u7801\u63d2\u56fe\" alt=\"\u600e\u4e48\u67e5\u770bmysql\u6570\u636e\u5e93\u5bc6\u7801\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u67e5\u770b MySQL \u6570\u636e\u5e93\u5bc6\u7801\uff1f<\/strong><\/p>\n<p><strong>\u65b9\u6cd5 1\uff1a\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6<\/strong><\/p>\n<ul>\n<li>\u5b9a\u4f4d MySQL \u914d\u7f6e\u6587\u4ef6\uff08\u901a\u5e38\u4e3a \/etc\/\/my.cnf\uff09\u3002<\/li>\n<li>\u6253\u5f00\u6587\u4ef6\u5e76\u5728 [mysqld] \u90e8\u5206\u627e\u5230 password= \u884c\u3002<\/li>\n<li>\u5bc6\u7801\u5c06\u4ee5\u52a0\u5bc6\u683c\u5f0f\u663e\u793a\u3002<\/li>\n<\/ul>\n<p><strong>\u65b9\u6cd5 2\uff1a\u4f7f\u7528\u547d\u4ee4\u884c<\/strong><\/p>\n<ul>\n<li>\u767b\u5f55\u5230 MySQL \u547d\u4ee4\u884c\u5de5\u5177\u3002<\/li>\n<li>\u952e\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/li>\n<\/ul>\n<pre>SELECT password FROM mysql.user WHERE User = 'your_username';<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ul>\n<li>\u5176\u4e2d your_username \u66ff\u6362\u4e3a\u60a8\u7684\u7528\u6237\u540d\u3002<\/li>\n<li>\u5bc6\u7801\u5c06\u4ee5\u52a0\u5bc6\u683c\u5f0f\u663e\u793a\u3002<\/li>\n<\/ul>\n<p><strong>\u65b9\u6cd5 3\uff1a\u4f7f\u7528\u7ba1\u7406\u5de5\u5177<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 MySQL \u7ba1\u7406\u5de5\u5177\uff08\u4f8b\u5982\uff0cPHPMyAdmin\uff09\u3002<\/li>\n<li>\u5bfc\u822a\u5230 &#8220;\u7528\u6237&#8221; \u9009\u9879\u5361\u3002<\/li>\n<li>\u627e\u5230\u60a8\u7684\u7528\u6237\u540d\u5e76\u5355\u51fb &#8220;\u7f16\u8f91&#8221; \u6309\u94ae\u3002<\/li>\n<li>\u5bc6\u7801\u5c06\u663e\u793a\u5728 &#8220;\u5bc6\u7801&#8221; \u5b57\u6bb5\u4e2d\u5e76\u4ee5\u52a0\u5bc6\u683c\u5f0f\u663e\u793a\u3002<\/li>\n<\/ul>\n<p><strong>\u6ce8\u610f\uff1a<\/strong><\/p>\n<ul>\n<li>\u8fd9\u4e9b\u65b9\u6cd5\u663e\u793a\u7684\u5bc6\u7801\u662f\u52a0\u5bc6\u7684\uff0c\u65e0\u6cd5\u76f4\u63a5\u4f7f\u7528\u3002<\/li>\n<li>\u5982\u679c\u60a8\u9700\u8981\u91cd\u7f6e\u5bc6\u7801\uff0c\u8bf7\u53c2\u8003 MySQL \u6587\u6863\u3002<\/li>\n<li>\u786e\u4fdd\u60a8\u7684\u6570\u636e\u5e93\u5bc6\u7801\u5b89\u5168\u5e76\u5b9a\u671f\u66f4\u6539\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u67e5\u770b\u6570\u636e\u5e93\u5bc6\u7801\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>\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u6cd5\u67e5\u770b mysql \u6570\u636e\u5e93\u5bc6\u7801\uff1a\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684 password= \u884c\uff0c\u5bc6\u7801\u4ee5\u52a0\u5bc6\u683c\u5f0f\u663e\u793a\u3002\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u6267\u884c select password from mysql.user where user = &#8216;your_username&#8217;;\uff0c\u5bc6\u7801\u540c\u6837\u4e3a\u52a0\u5bc6\u683c\u5f0f\u3002\u5728 mysql \u7ba1\u7406\u5de5\u5177\u4e2d\u5bfc\u822a\u5230 &#8220;\u7528\u6237&#8221; \u9009\u9879\u5361\u5e76\u70b9\u51fb &#8220;\u7f16\u8f91&#8221;\uff0c\u5bc6\u7801\u4f1a\u663e\u793a\u5728 &#8220;\u5bc6\u7801&#8221; \u5b57\u6bb5\uff0c\u4ecd\u4e3a\u52a0\u5bc6\u683c\u5f0f\u3002 \u5982\u4f55\u67e5\u770b MySQL \u6570\u636e\u5e93\u5bc6\u7801\uff1f \u65b9\u6cd5 1\uff1a\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6 \u5b9a\u4f4d MySQL \u914d\u7f6e\u6587\u4ef6\uff08\u901a\u5e38\u4e3a \/etc\/\/my.cnf\uff09\u3002 \u6253\u5f00\u6587\u4ef6\u5e76\u5728 [mysqld] \u90e8\u5206\u627e\u5230 password= \u884c\u3002 \u5bc6\u7801\u5c06\u4ee5\u52a0\u5bc6\u683c\u5f0f\u663e\u793a\u3002 \u65b9\u6cd5 2\uff1a\u4f7f\u7528\u547d\u4ee4\u884c \u767b\u5f55\u5230 MySQL \u547d\u4ee4\u884c\u5de5\u5177\u3002 \u952e\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a SELECT password FROM mysql.user WHERE User = &#8216;your_username&#8217;; \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d your_username \u66ff\u6362\u4e3a\u60a8\u7684\u7528\u6237\u540d\u3002 \u5bc6\u7801\u5c06\u4ee5\u52a0\u5bc6\u683c\u5f0f\u663e\u793a\u3002 \u65b9\u6cd5 [&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-6467","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6467","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=6467"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6467\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}