{"id":901,"date":"2012-07-15T01:59:24","date_gmt":"2012-07-14T17:59:24","guid":{"rendered":"http:\/\/www.huzs.top\/?p=901"},"modified":"2012-07-15T01:59:24","modified_gmt":"2012-07-14T17:59:24","slug":"mysql-%e9%94%99%e8%af%af%e3%80%80access-denied-for-user-debian-sys-maintlocalhost%e9%94%99%e8%af%af%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.huzs.top\/?p=901","title":{"rendered":"MySQL \u9519\u8bef\u3000Access denied for user \u2018debian-sys-maint\u2019@&#039;localhost\u2019\u9519\u8bef\u89e3\u51b3\u529e\u6cd5"},"content":{"rendered":"<div>\\n\\nDebian\u7684\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u4e86phpmyadmin\u540e\u53d1\u73b0\u591a\u4e2a\u201cdebian-sys-maint\u201d\u7528\u6237\u3002\u800c\u4e14\u662f\u8d85\u7ea7\u7ba1\u7406\u5458\u3002\u5220\u4e4b\uff0c\u7136\u540e\u5c31\u51fa\u73b0\u91cd\u542f\u4f1a\u62a5Access denied for user \u2018debian-sys-maint\u2019@&#8217;localhost\u2019\u201d\u3000\u4f46\u662f\u4f7f\u7528\u8fd8\u6ca1\u6709\u4ec0\u4e48\u95ee\u9898.\u4f46\u5907\u4efd\u3001\u91cd\u542f\u3001\u5173\u95ed\u3001\u91cd\u8f7d\u3001\u72b6\u6001\u529f\u80fd\u5168\u90e8\u65e0\u6cd5\u4f7f\u7528\u4e86\u3002\\n\\n\u67e5\u770b\u5982\u4e0b\u914d\u7f6e\u6587\u4ef6\uff0c\u53d1\u73b0\u6211\u5220\u9664\u4e86\u7528\u6237\u540e\uff0c\u8fd9\u91cc\u7684\u4fe1\u606f\u662f\u6ca1\u53d8\u7684\u3002\u6211\u4eec\u8981\u4e48\u6dfb\u52a0\u4e00\u4e2a\u8fd9\u6837\u7684\u8d26\u6237\uff0c\u8981\u4e48\u628a\u8fd9\u91cc\u7684\u7528\u6237\u5220\u9664\u3002\\n<\/p>\n<div>\\n<\/p>\n<div>\\n<\/p>\n<pre>~#cat \/etc\/mysql\/debian.cnf\\n# Automatically generated for Debian scripts. DO NOT TOUCH!\\n[client]\\nhost\u00a0\u00a0\u00a0\u00a0 = localhost\\nuser\u00a0\u00a0\u00a0\u00a0 = debian-sys-maint\\npassword = 4AiDYEIp8AJIwEe1\\nsocket\u00a0\u00a0 = \/var\/run\/mysqld\/mysqld.sock\\n[mysql_upgrade]\\nuser\u00a0\u00a0\u00a0\u00a0 = debian-sys-maint\\npassword = 4AiDYEIp8AJIwEe1\\nsocket\u00a0\u00a0 = \/var\/run\/mysqld\/mysqld.sock\\nbasedir\u00a0 = \/usr<\/pre>\n<p>\\n<\/p><\/div>\n<p>\\n<\/p><\/div>\n<p>\\n\u65b9\u6cd5\u4e00\uff1a\u8fdb\u5165MySQL\uff0c\u6dfb\u52a0\u8fd9\u4e48\u4e00\u4e2a\u7528\u6237\u3002\\n<\/p>\n<div>\\n<\/p>\n<div>\\n<\/p>\n<pre>mysql&gt; update mysql.user set Password = password(\"4AiDYEIp8AJIwEe1\") where User =\"debian-sys-maint\";\\nmysql&gt;flush privileges;\\nmysql&gt;quit\\n\/etc\/init.d\/mysql restart<\/pre>\n<p>\\n<\/p><\/div>\n<p>\\n<\/p><\/div>\n<p>\\n<\/p><\/div>\n<p>\\n<\/p>\n<div>\u65b9\u6cd5\u4e8c\uff0c\u7f16\u8f91\u6b21\u6587\u4ef6\uff0c\u4fee\u6539\u7528\u6237\u548c\u5bc6\u7801\u4e3a\u6211\u4eec\u719f\u6089\u7684root\uff1a<\/div>\n<p>\\n<\/p>\n<div>\n<pre>vi \/etc\/mysql\/debian.cnf<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\\n\\nDebian\u7684\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u4e86phpmyadmin\u540e\u53d1\u73b0\u591a\u4e2a\u201cdebian-sys-maint\u201d\u7528\u6237\u3002\u800c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-901","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/posts\/901","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=901"}],"version-history":[{"count":0,"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/posts\/901\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}