{"id":722,"date":"2023-04-21T15:50:46","date_gmt":"2023-04-21T07:50:46","guid":{"rendered":"http:\/\/www.inhhh.com\/blog\/?p=722"},"modified":"2023-11-03T15:17:43","modified_gmt":"2023-11-03T07:17:43","slug":"mysql%e4%bf%ae%e6%94%b9%e5%af%86%e7%a0%81%e6%97%b6%ef%bc%8c%e6%8a%a5%e9%94%99error-1064-42000%e3%80%90%e6%96%b0%e7%89%88mysql%e4%bf%ae%e6%94%b9%e5%af%86%e7%a0%81%e5%91%bd%e4%bb%a4%e6%9c%89%e6%89%80","status":"publish","type":"post","link":"http:\/\/www.inhhh.com\/blog\/?p=722","title":{"rendered":"MySQL\u4fee\u6539\u5bc6\u7801\u65f6\uff0c\u62a5\u9519ERROR 1064 (42000)\u3010\u65b0\u7248MySQL\u4fee\u6539\u5bc6\u7801\u547d\u4ee4\u6709\u6240\u53d8\u66f4\u3011"},"content":{"rendered":"\n<p>\u76f8\u4fe1\u5927\u5bb6\u90fd\u9047\u5230\u8fc7\u8fd9\u79cd\u60c5\u51b5\uff0c\u5728\u7528&nbsp;<strong>\u547d\u4ee4\u884c<\/strong>&nbsp;\u8fd0\u884c\u7684&nbsp;<strong>MySQL<\/strong>&nbsp;\u4e2d\u4fee\u6539\u5bc6\u7801\u65f6\uff0c\u51fa\u73b0\u4ee5\u4e0b\u9519\u8bef\uff1a<\/p>\n\n\n\n<p><strong>\u63a5\u4e0b\u6765\u7684\u5185\u5bb9\u5212\u91cd\u70b9\uff0c\u8bf7\u8ba4\u771f\u770b \uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01<\/strong><\/p>\n\n\n\n<p>\u8fd9\u5176\u5b9e\u662f MySQL \u7684&nbsp;<strong>\u7248\u672c\u4e0d\u540c<\/strong>&nbsp;\u6240\u5bfc\u81f4\u7684\u652f\u6301\u7684\u4fee\u6539\u5bc6\u7801\u7684&nbsp;<strong>\u8bed\u6cd5\u4e0d\u540c<\/strong>&nbsp;\u6240\u9020\u6210\u7684\u95ee\u9898\uff0c\u63a5\u4e0b\u6765\u5c31\u6765\u770b\u770b\u4e0d\u540c\u7248\u672c\u7684MySQL\u6240\u652f\u6301\u7684\u8bed\u6cd5\u3002\uff08\u4ee5\u4e0b\u5747\u4e3a\u5c06\u5bc6\u7801\u6539\u4e3a\u201c123465\u201d\u7684\u793a\u4f8b\uff09<\/p>\n\n\n\n<p><strong>5.6 \u7248\u672c<\/strong>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nuse mysql;\nupdate mysql.user set password=password('123456') where User=\"root\" and Host=\"localhost\";\nset password for root@localhost = password('123456');<\/code><\/pre>\n\n\n\n<p><strong>5.7 \u4ee5\u4e0a\u7248\u672c<\/strong>\uff0cpassword \u5b57\u6bb5\u88ab\u8bbe\u7f6e\u4e3a\u4e86authentication_string\uff0c\u56e0\u6b64\u66f4\u65b0\u547d\u4ee4\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nuse mysql;\nupdate mysql.user set authentication_string=password('123456') where user='root';\nset password for root@localhost ='123456';<\/code><\/pre>\n\n\n\n<p><strong>8.0 \u4ee5\u4e0a\u7684\u7248\u672c<\/strong>\uff0c\u4ee5\u4e0a\u7684\u547d\u4ee4\u90fd\u4e0d\u652f\u6301\uff0c\u6709\u4ee5\u4e0b\u4e24\u4e2a\u547d\u4ee4\u53ef\u7528\uff08<a href=\"https:\/\/blog.csdn.net\/weixin_45242865\/article\/details\/118226346?spm=1001.2014.3001.5501\">MySQL\u7684\u5b89\u88c5\u4e0e\u914d\u7f6e\u2014\u2014\u8be6\u7ec6\u6559\u7a0b\uff08\u8f6c\u8f7d\uff09<\/a><em>\u91cc\u9762\u4fee\u6539\u5bc6\u7801\u7528\u7684\u5c31\u662f\u8fd9\u4e2a\u6700\u65b0\u7684\u547d\u4ee4<\/em>\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nuse mysql;\nalter user 'root'@'localhost' identified by '123456';\nset password for root@localhost ='123456';\nFLUSH PRIVILEGES;\n<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76f8\u4fe1\u5927\u5bb6\u90fd\u9047\u5230\u8fc7\u8fd9\u79cd\u60c5\u51b5\uff0c\u5728\u7528&nbsp;\u547d\u4ee4\u884c&nbsp;\u8fd0\u884c\u7684&nbsp;MySQL&nbsp;\u4e2d\u4fee\u6539\u5bc6\u7801<\/p>\n<div class=\"more-link\">\n\t\t\t\t <a href=\"http:\/\/www.inhhh.com\/blog\/?p=722\" class=\"link-btn theme-btn\"><span>Read More <\/span> <i class=\"fa fa-caret-right\"><\/i><\/a>\n\t\t\t<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-722","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/722","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=722"}],"version-history":[{"count":2,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/722\/revisions"}],"predecessor-version":[{"id":785,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/722\/revisions\/785"}],"wp:attachment":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=722"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}