{"id":765,"date":"2009-11-29T12:33:00","date_gmt":"2009-11-29T04:33:00","guid":{"rendered":""},"modified":"2009-11-29T12:33:00","modified_gmt":"2009-11-29T04:33:00","slug":"","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/765.html","title":{"rendered":"\u5fd8\u8bb0MYSQL\u7684ROOT\u5bc6\u7801\u89e3\u51b3\u529e\u6cd5"},"content":{"rendered":"<p><html><head><meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/><title>\u5fd8\u8bb0MYSQL\u7684ROOT\u5bc6\u7801\u89e3\u51b3\u529e\u6cd5<\/title><\/head><body><\/p>\n<h1 style=\"display:none\">\u5fd8\u8bb0MYSQL\u7684ROOT\u5bc6\u7801\u89e3\u51b3\u529e\u6cd5<\/h1>\n<div>\n<p>\u5fd8\u8bb0MySQL ROOT\u5bc6\u7801\u662f\u5728MySQL\u4f7f\u7528\u4e2d\u5f88\u5e38\u89c1\u7684\u95ee\u9898\uff0c\u53ef\u662f\u6709\u5f88\u591a\u670b\u53cb\u5e76\u4e0d\u4f1a\u91cd\u7f6eROOT\u5bc6\u7801\uff0c\u90a3\u53eb\u82e6\u554a\uff0c\u6211\u6709\u6df1\u6709\u611f\u89e6\uff0c\u7279\u5199\u6b64\u6587\u7ae0\u4e0e\u5927\u5bb6\u4ea4\u6d41\uff1a<\/p>\n<p>1\u3001\u7f16\u8f91MySQL\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<p>windows\u73af\u5883\u4e2d\uff1a%MySQL_installdir%\\my.ini\u3000\/\/\u4e00\u822c\u5728MySQL\u5b89\u88c5\u76ee\u5f55\u4e0b\u6709my.ini\u5373MySQL\u7684\u914d\u7f6e\u6587\u4ef6\u3002 <br \/>\nlinux\u73af\u5883\u4e2d\uff1a\/etc\/my.cnf<\/p>\n<p>\u5728[MySQLd]\u914d\u7f6e\u6bb5\u6dfb\u52a0\u5982\u4e0b\u4e00\u884c\uff1a <br \/>\nskip-grant-tables<\/p>\n<p>\u4fdd\u5b58\u9000\u51fa\u7f16\u8f91\u3002<\/p>\n<p>2\u3001\u7136\u540e\u91cd\u542fMySQL\u670d\u52a1<\/p>\n<p>windows\u73af\u5883\u4e2d\uff1a <br \/>\nnet stop MySQL <br \/>\nnet start MySQL<\/p>\n<p>linux\u73af\u5883\u4e2d\uff1a <br \/>\n\/etc\/init.d\/MySQLd restart<\/p>\n<p>3\u3001\u8bbe\u7f6e\u65b0\u7684ROOT\u5bc6\u7801<\/p>\n<p>\u7136\u540e\u518d\u5728\u547d\u4ee4\u884c\u4e0b\u6267\u884c\uff1a <br \/>\nMySQL -uroot -p MySQL <br \/>\n\u76f4\u63a5\u56de\u8f66\u65e0\u9700\u5bc6\u7801\u5373\u53ef\u8fdb\u5165\u6570\u636e\u5e93\u4e86\u3002<\/p>\n<p>\u73b0\u5728\u6211\u4eec\u6267\u884c\u5982\u4e0b\u8bed\u53e5\u628aroot\u5bc6\u7801\u66f4\u65b0\u4e3a 7758521\uff1a <br \/>\nupdate user set password=PASSWORD(&quot;7758521&quot;) where user=&#8217;root&#8217;;<\/p>\n<p>quit \u9000\u51faMySQL\u3002<\/p>\n<p>4\u3001\u8fd8\u539f\u914d\u7f6e\u6587\u4ef6\u5e76\u91cd\u542f\u670d\u52a1<\/p>\n<p>\u7136\u540e\u4fee\u6539MySQL\u914d\u7f6e\u6587\u4ef6\u628a\u521a\u624d\u6dfb\u52a0\u7684\u90a3\u4e00\u884c\u5220\u9664\u3002<\/p>\n<p>\u518d\u6b21\u91cd\u8d77MySQL\u670d\u52a1\uff0c\u5bc6\u7801\u4fee\u6539\u5b8c\u6bd5\u3002<\/p>\n<p>\u4fee\u6539\u5b8c\u6bd5\u3002<\/p>\n<p>\u7528\u65b0\u5bc6\u78017758521\u8bd5\u4e00\u4e0b\u5427\uff0c\u53c8\u80fd\u767b\u5165MySQL\u7684\u611f\u89c9\u5c31\u662f\u4e0d\u4e00\u6837\u5427\uff1f<\/p>\n<p>Del.icio.us : mysql<\/p>\n<p><font color=\"#ff0000\">PS\uff1a\u672c\u4eba\u672a\u7ecf\u6d4b\u8bd5\uff0c\u4e0d\u77e5\u662f\u5426\u7ba1\u7528\u3002<\/font><\/p>\n<\/div>\n<p><\/body><\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5fd8\u8bb0MYSQL\u7684ROOT\u5bc6\u7801\u89e3\u51b3\u529e\u6cd5 \u5fd8\u8bb0MYSQL\u7684ROOT\u5bc6\u7801\u89e3\u51b3\u529e\u6cd5 \u5fd8\u8bb0MySQL ROOT\u5bc6\u7801\u662f\u5728M [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-765","post","type-post","status-publish","format-standard","hentry","category-skill"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=765"}],"version-history":[{"count":0,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/765\/revisions"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}