{"id":422,"date":"2014-07-08T22:25:02","date_gmt":"2014-07-08T14:25:02","guid":{"rendered":"http:\/\/www.withonly.com\/?p=422"},"modified":"2014-07-09T15:01:37","modified_gmt":"2014-07-09T07:01:37","slug":"%e4%b8%80%e7%a7%8dmysql-%e6%97%a0%e6%b3%95%e7%99%bb%e9%99%86%e7%9a%84%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95","status":"publish","type":"post","link":"https:\/\/blog.5danyuan.com\/?p=422","title":{"rendered":"\u4e00\u79cdmysql \u65e0\u6cd5\u767b\u9646\u7684\u89e3\u51b3\u529e\u6cd5"},"content":{"rendered":"<p>\u7531\u4e8e\u5de5\u4f5c\u9700\u8981\uff0c\u5728\u5185\u7f51\u91cc\u5047\u8bbe\u8bba\u575b\uff0c\u672c\u6765\u662f\u6253\u7b97\u4f7f\u7528windows\u7cfb\u7edf\u7684\uff0c\u53ef\u662f\u4e0b\u8f7d\u6570\u636e\u5e93\uff0c\u5f88\u4e45\u90fd\u6ca1\u6709\u4e0b\u8f7d\u56de\u6765\uff0c\u53ea\u597d\u653e\u5f03\u800c\u6539\u7528linux\u670d\u52a1\u5668\u3002<\/p>\n<p>\u670d\u52a1\u5668\u5c45\u7136\u662fRedhat \u7684\u7cfb\u7edf\uff0c\u4e00\u8def\u5404\u79cd\u5b89\u88c5\uff0c\u4f46\u662f\u5728\u5b89\u88c5mysql\u65f6\u51fa\u9519\u4e86\u3002<\/p>\n<p>\u5b89\u88c5mysql\u540e\uff0c\u4f7f\u7528\u547d\u4ee4\u767b\u5f55mysql\u5c45\u7136\u62a5\u9519\u4e86\uff0cMysql ERROR 1045 (28000): Access denied for user &#8216;root&#8217;@&#8217;localhost'(using password: NO)\uff0c\u8fd9\u4e2a\u9519\u8bef\u641e\u5f97\u5f88\u90c1\u95f7\uff0c\u53ef\u80fd\u662f\u5bc6\u7801\u5728\u914d\u7f6emysql\u7684\u65f6\u5019\u5f02\u5e38\uff0c\u6240\u4ee5\u5bfc\u81f4\u6211\u4eec\u6ca1\u6709\u6b63\u786e\u7684\u5bc6\u7801\uff0c\u77e5\u9053\u95ee\u9898\u540e\uff0c\u7acb\u5373\u60f3\u5230\u89e3\u51b3\u529e\u6cd5\u4e86\uff0c\u90a3\u5c31\u662f\u91cd\u65b0\u8bbe\u7f6e\u4e00\u4e2a\u5bc6\u7801\uff0c\u65b9\u6cd5\u5982\u4e0b<\/p>\n<p>1.\u5148\u5173\u95edmysql\u5e76\u8bbe\u7f6e\u5bc6\u7801<br \/>\n1.#sudo \/etc\/init.d\/mysql stop<br \/>\n2.#sudo mysqld_safe &#8211;user=mysql &#8211;skip-grant-tables &#8211;skip-networking &amp;<br \/>\n3.#sudo mysql -u root mysql<br \/>\n4.mysql&gt; UPDATE user SET Password=PASSWORD(&#8216;pas&#8217;) where USER=&#8217;root&#8217;;<br \/>\n5.mysql&gt; FLUSH PRIVILEGES;<br \/>\n6.mysql&gt; quit<\/p>\n<p>2.\u91cd\u542fmysql\u5e76\u5c1d\u8bd5\u767b\u5f55<br \/>\n1.#sudo \/etc\/init.d\/mysql restart<br \/>\n2.#sudo mysql -u root -p<br \/>\n3.Enter password:<br \/>\n4.#\u8f93\u5165\u5bc6\u7801\uff0c\u51fa\u73b0\u4e0b\u9762\u8fd9\u4e2a\u5c31\u8868\u793a\u767b\u5f55\u6b63\u5e38\u4e86<br \/>\n5.mysql&gt;<\/p>\n<p>Mysql ERROR 1045 (28000): Access denied for user &#8216;root&#8217;@&#8217;localhost'(using password: NO)\u8fd9\u4e2a\u9519\u8bef\u5728\u4f7f\u7528phpmyadmin\u767b\u5f55\u7684\u65f6\u5019\u53ea\u63d0\u793a(28000)\uff0c\u540c\u65f6phpmyadmin\u4e5f\u4f1a\u63d0\u793a\u5bc6\u7801\u51fa\u9519\uff0c\u6309\u4ee5\u4e0a\u65b9\u6cd5\u8bbe\u7f6e\u4e4b\u540e\u5c31\u53ef\u4ee5\u7528\u65b0\u5bc6\u7801\u767b\u5f55phpmyadmin\u4e86\u3002<\/p>\n<p>\u767b\u9646\u6210\u529f\uff0c\u5269\u4e0b\u7684\u5c31\u662f\u62f7\u8d1d\u6587\u4ef6\uff0c\u7136\u540e\u8fdb\u884c\u8bba\u575b\u7684\u521d\u59cb\u5316\u64cd\u4f5c\u4e86\uff0c\u8fd9\u91cc\u5c31\u4e0d\u63d0\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7531\u4e8e\u5de5\u4f5c\u9700\u8981\uff0c\u5728\u5185\u7f51\u91cc\u5047\u8bbe\u8bba\u575b\uff0c\u672c\u6765\u662f\u6253\u7b97\u4f7f\u7528windows\u7cfb\u7edf\u7684\uff0c\u53ef\u662f\u4e0b\u8f7d\u6570\u636e\u5e93\uff0c\u5f88\u4e45\u90fd\u6ca1\u6709\u4e0b\u8f7d\u56de\u6765\uff0c\u53ea\u597d\u653e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[176,175],"class_list":["post-422","post","type-post","status-publish","format-standard","hentry","category-daily","tag-linux","tag-mysql"],"_links":{"self":[{"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=\/wp\/v2\/posts\/422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=422"}],"version-history":[{"count":0,"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=\/wp\/v2\/posts\/422\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}