{"id":113,"date":"2012-11-18T18:42:52","date_gmt":"2012-11-18T10:42:52","guid":{"rendered":"https:\/\/sdeno.com\/?p=113"},"modified":"2012-11-18T19:09:03","modified_gmt":"2012-11-18T11:09:03","slug":"%e8%a7%a3%e5%86%b3phpmyadmin%e4%b8%8b%e7%9a%84access-denied-for-user-rootlocalhost-using-password-no","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=113","title":{"rendered":"\u89e3\u51b3phpmyadmin\u4e0b\u7684Access denied for user 'root'@'localhost' (using password: NO)"},"content":{"rendered":"<p>\u9519\u8bef<\/p>\n<p><strong>MySQL \u8fd4\u56de\uff1a<\/strong><\/p>\n<p><code>#1045 - Access denied for user 'root'@'localhost' (using password: NO)<\/code><\/p>\n<p><code>\u6253\u5f00config.inc.php\u91cc\u770b\u5230\u91cc\u9762\u6709\u4e24\u884c\u5c31\u662f\u95ee\u9898\u7684\u5173\u952e\uff1a<\/code><\/p>\n<p><code><em><strong>$cfg['Servers'][$i]['user'] = 'root';<br \/>\n$cfg['Servers'][$i]['password'] = '';<\/strong><\/em><\/code><\/p>\n<p><!--more--><\/p>\n<p>\u8fd9\u4e00\u822c\u662fphpmyadmin\u91cc\u7684\u9ed8\u8ba4\u8bbe\u7f6e\uff0c\u7528\u6237\u540d\u4e3aroot\uff0c\u5bc6\u7801\u4e3a\u7a7a\uff0c\u5f53\u672c\u673a\u5efa\u7acbmysql\u6570\u636e\u5e93\u65f6\u53ef\u4ee5\u76f4\u63a5\u8fde\u63a5\u3002\u6240\u4ee5\u4e00\u822c\u7b2c\u4e00\u6b21\u7528phpmyadmin\u8fde\u63a5\u65f6\u90fd\u4f1a\u6210\u529f\uff0c\u4f46\u540e\u9762\u4e3a\u4ec0\u4e48\u4f1a\u63d0\u793a\u62d2\u7edd\u8fde\u63a5\u5462\uff1f\u56e0\u4e3aroot\u5bc6\u7801\uff08\u6216\u8005\u522b\u7684\u7528\u6237\u540d\uff09\u5df2\u7ecf\u4fee\u6539\u8fc7\u4e86\uff0c\u6709\u53ef\u4ee5\u5728\u662f\u547d\u4ee4\u884c\u91cc\u6539\u7684\u4e5f\u6709\u53ef\u4ee5\u662f\u5728phpmyadmin\u91cc\u6539\u7684\uff1a<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/sdeno.com\/wp-content\/uploads\/2012\/11\/28ea6d38b36aed06b9998f3b.png\"><figure class=\"mdx-lazyload-container\" style=\"max-width:300px\"><div style=\"padding-top:84.666666666667%\"><\/div><div class=\"mdx-img-loading-sp mdui-valign\"><div><div class=\"mdui-spinner\"><\/div><\/div><\/div><img width=\"300\" height=\"254\" class=\"size-medium wp-image-116 aligncenter lazyload\" title=\"\u89e3\u51b3phpmyadmin\u4e0b\u7684Access denied for user 'root'@'localhost' (using password: NO)\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/sdeno.com\/wp-content\/uploads\/2012\/11\/28ea6d38b36aed06b9998f3b-300x254.png\" alt=\"https:\/\/sdeno.com\/wp-content\/uploads\/2012\/11\/28ea6d38b36aed06b9998f3b-300x254.png\" data-srcset=\"https:\/\/sdeno.com\/wp-content\/uploads\/2012\/11\/28ea6d38b36aed06b9998f3b-300x254.png 300w, https:\/\/sdeno.com\/wp-content\/uploads\/2012\/11\/28ea6d38b36aed06b9998f3b-354x300.png 354w, https:\/\/sdeno.com\/wp-content\/uploads\/2012\/11\/28ea6d38b36aed06b9998f3b.png 705w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\"><\/figure><\/a><\/p>\n<p>\u5982\u679c\u8bbe\u7f6e\u4e86\u4f7f\u7528\u5bc6\u7801\u7684\u8bdd\u90a3\u4e48\u4e0b\u9762\u7684\u767b\u5165\u5bc6\u7801\u4e5f\u9700\u8981\u540c\u65f6\u4fee\u6539\uff0c\u5426\u5219\u53ea\u80fd\u6539\u914d\u7f6e\u6587\u4ef6config.inc.php<\/p>\n<p>\u6211\u8bb0\u5f97\u9ed8\u8ba4\u5bc6\u7801\u662f\u7a7a\u7684\uff0c\u540e\u6765\u52a0\u4e0a\u5c31\u8fde\u63a5\u62d2\u7edd\u4e86\uff0c\u73b0\u5728\u518d\u770b\u5230\u521a\u624d\u90a3\u4e24\u884c\u4ee3\u7801\uff1a<\/p>\n<p><em><strong>$cfg[&#8216;Servers&#8217;][$i][&#8216;user&#8217;] = &#8216;root&#8217;;<br \/>\n$cfg[&#8216;Servers&#8217;][$i][&#8216;password&#8217;] = &#8221;;<\/strong><\/em><\/p>\n<p>\u5176\u5b9e\u6307\u7684\u5c31\u662f\u767b\u5165\u4fe1\u606f\u91cc\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u5982\u679c\u7559\u7a7a\u90a3\u90a3\u4e48\u9519\u8bef\u63d0\u793a\u91cc\u5c31\u662f(using password: NO)\uff0c\u5982\u679c\u968f\u4fbf\u6253\u51e0\u4e2a\u5b57\u4e0a\u53bb\u5c31\u90a3\u5c31\u662f(using password: YES)\uff0c\u55ef\uff0c\u5982\u679c\u4f60\u628a\u6539\u8fc7\u7684\u5bc6\u7801\u6572\u4e0a\u53bb\uff0c\u90a3\u4e48\u5c31\u53ef\u4ee5\u767b\u5f55\u6210\u529f\u4e86\u3002\u5f53\u7136\u8fd9\u662f\u672c\u5730\u767b\u5f55\u65f6\u53ef\u4ee5\u8bbe\u7f6e\u56fa\u5b9a\u7528\u6237\u767b\u5f55\uff08\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6\uff09\uff0c\u5982\u679c\u60f3\u51fa\u73b0\u63d0\u793a\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\u7684\u5bf9\u8bdd\u6846\uff0c\u90a3\u4e48\u9700\u8981\u8bbe\u7f6e\u53e6\u4e00\u884c\u4ee3\u7801\uff1a<\/p>\n<p><em><strong>$cfg[&#8216;Servers&#8217;][$i][&#8216;auth_type&#8217;] = &#8216;config&#8217;; \/\/\u8fd8\u53ef\u4ee5\u7528http\u6216\u8005cookie\u65b9\u5f0f<\/strong><\/em><\/p>\n<p>\u5f53\u6539\u6210http\u65f6\u5c31\u4f1a\u51fa\u73b0\u5bf9\u8bdd\u6846\uff0c\u7528cookie\u5c31\u662f\u6309\u6d4f\u89c8\u5668\u8fdb\u7a0b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9519\u8bef MySQL \u8fd4\u56de\uff1a #1045 &#8211; Access denied for user &#8216;root&#8217;@&#8217;loc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"close","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-11"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=113"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}