{"id":1091,"date":"2019-01-30T16:59:37","date_gmt":"2019-01-30T08:59:37","guid":{"rendered":"http:\/\/www.ily22.com\/?p=1091"},"modified":"2019-01-30T16:59:37","modified_gmt":"2019-01-30T08:59:37","slug":"phpmyadmin%e7%99%bb%e5%bd%95%e5%90%8e%e6%8a%a5%e9%94%99error-1045-28000-access-denied-for-user-rootlocalhost-using-password-yes","status":"publish","type":"post","link":"https:\/\/www.geek2.xyz\/?p=1091","title":{"rendered":"phpmyadmin\u767b\u5f55\u540e\u62a5\u9519ERROR 1045 (28000): Access denied for user &#8216;root&#8217;@&#8217;localhost&#8217; (using password: YES)"},"content":{"rendered":"<p>ERROR 1045 (28000): Access denied for user &#8216;root&#8217;@&#8217;ily22.com&#8217; (using password: YES)<\/p>\n<p>\u6570\u636e\u5e93\u65e0\u6cd5\u767b\u5f55\uff0c\u5bc6\u7801\u4e5f\u662f\u5b89\u88c5\u65f6\u7684\uff0c\u51fa\u73b0\u8fd9\u79cd\u60c5\u51b5\uff0c\u53ea\u80fd\u91cd\u7f6e\u5bc6\u7801\u770b\u770b\u4e86\u3002<\/p>\n<p>\u901a\u8fc7\u8df3\u8fc7\u5bc6\u7801\u9a8c\u8bc1\u6765\u91cd\u7f6e\u5bc6\u7801\uff0c<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.geek2.xyz\/wp-content\/uploads\/2019\/01\/46c5148a4251ff1cba615d9912ee4a50.png\" \/><br \/>\nvim \/etc\/my.cnf<br \/>\n\u627e\u5230[mysqld]\u8fdb\u884c\u7f16\u8f91\u52a0\u5165skip-grant-tables<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.geek2.xyz\/wp-content\/uploads\/2019\/01\/35ef036c1c6f933ef765a8422bc9733d.png\" \/><br \/>\n:wq \u4fdd\u5b58\u6587\u6863\u5e76\u9000\u51fa<br \/>\n\u7136\u540e\u91cd\u542fMySQL( \u8f93\u5165\/etc\/init.d\/mysql restart\u6709\u7684\u662f\/etc\/init.d\/mysqld restart)<br \/>\n\u7531\u4e8e\u6211\u7684\u662f\u4e00\u952elnmp\u5b89\u88c5\u7684\uff0c\u6240\u6709\u70b9\u4e0d\u540cMySQL\u72b6\u6001\u7ba1\u7406\uff1a\/etc\/init.d\/mysql {start|stop|restart|reload|force-reload|status}<br \/>\n\u5c3d\u7ba1\u6211\u8f93\u5165\/etc\/init.d\/mysql restart\u91cd\u542f\u6216\u8005reload\u91cd\u8f7d\uff0cforce-reload\u5f3a\u5236\u91cd\u8f7d\u90fd\u6ca1\u6548\u679c<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.geek2.xyz\/wp-content\/uploads\/2019\/01\/c0427db7a06d181841fff47d89fd45ec.png\" \/><br \/>\n\u62a5\u9519Starting MySQL&#8230; ERROR! The server quit without updating PID file<\/p>\n<p>\u8fd9\u4e2a\u662f\u8bf4\u6709\u8fdb\u7a0b\u9700\u8981kill\u624d\u80fd\u91cd\u542f\uff0c\u6211\u6bd4\u8f83\u61d2\u76f4\u63a5\u91cd\u542flnmp\u8fd8\u662f\u4e0d\u884c\uff0c\u5c31\u76f4\u63a5lnmp kill\uff0c\u518d\u91cd\u542fmysql\u5c31\u6b63\u5e38\u4e86\u3002\uff08lnmp1.2+\u7248\u672c\u72b6\u6001\u7ba1\u7406: lnmp {start|stop|reload|restart|kill|status}\uff09<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.geek2.xyz\/wp-content\/uploads\/2019\/01\/42a7487ea01d3582a028798ff043f4a9.png\" \/><br \/>\n\u91cd\u542fmysql\u4e4b\u540e\u8f93\u5165mysql\u5373\u53ef\u8fdb\u5165mysql\u4e86\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.geek2.xyz\/wp-content\/uploads\/2019\/01\/1515f4ec18c052ac630609737ad8b485.png\" \/><\/p>\n<p>\u63a5\u4e0b\u6765\u5c31\u662f\u901a\u8fc7SQL\u8bed\u53e5\u6765\u91cd\u7f6e\u5bc6\u7801<\/p>\n<p>mysql&gt; use mysql;<br \/>\nmysql&gt; update user set password=password(&#8220;\u4f60\u7684\u65b0\u5bc6\u7801&#8221;) where user=&#8221;root&#8221;;<br \/>\nmysql&gt; flush privileges;<br \/>\nmysql&gt; quit<img decoding=\"async\" src=\"http:\/\/www.geek2.xyz\/wp-content\/uploads\/2019\/01\/f50e8ea5a3e784e3f8078af6373643b6.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.geek2.xyz\/wp-content\/uploads\/2019\/01\/f50e8ea5a3e784e3f8078af6373643b6.png\" \/>\u91cd\u7f6e\u5bc6\u7801\u5b8c\u6210\u5c31\u53ef\u4ee5\u76f4\u63a5\u767b\u9646phpmyadmin\u7ba1\u7406mysql\u6570\u636e\u5e93\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ERROR 1045 (28000): Access denied for user &#8216;root&#038; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1103,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[25],"class_list":["post-1091","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jsfx","tag-mysql"],"_links":{"self":[{"href":"https:\/\/www.geek2.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1091","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.geek2.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.geek2.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.geek2.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.geek2.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1091"}],"version-history":[{"count":0,"href":"https:\/\/www.geek2.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1091\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.geek2.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.geek2.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.geek2.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}