{"id":1168,"date":"2022-06-27T23:07:04","date_gmt":"2022-06-27T15:07:04","guid":{"rendered":"https:\/\/www.mustenaka.cn\/?p=1168"},"modified":"2022-06-28T11:25:32","modified_gmt":"2022-06-28T03:25:32","slug":"mysqlerror1045","status":"publish","type":"post","link":"https:\/\/www.mustenaka.cn\/index.php\/2022\/06\/27\/mysqlerror1045\/","title":{"rendered":"MYSQL\u4f5c\u5996\uff0cMySQL \u5ba2\u6237\u7aef\u8fde\u4e0d\u4e0a\uff081045 \u9519\u8bef\uff09"},"content":{"rendered":"<h1>MYSQL\u670d\u52a1\u7aef\u76f4\u63a5\u547d\u4ee4\u94fe\u63a5\u6b63\u5e38\uff0c\u672c\u5730\u5ba2\u6237\u7aef\u65e0\u6cd5\u94fe\u63a5\uff0c\u62a5\u95191045<\/h1>\n<p>\u53ef\u4ee5\u53bb\u53c2\u8003\u8fd9\u4e2a\u6587\u7ae0\uff1a<a href=\"https:\/\/opensource.actionsky.com\/20190715-mysql\/\">https:\/\/opensource.actionsky.com\/20190715-mysql\/<\/a><\/p>\n<h2>\u8865\u5145<\/h2>\n<p>\u4e0d\u77e5\u9053\u662f\u6211\u7684\u952e\u76d8\u539f\u56e0\u8fd8\u662f\u600e\u4e48\u6837\uff0cmysql\u7684sql\u8bed\u53e5\u76f4\u63a5\u518dSSH\u94fe\u63a5\u7684\u65f6\u5019\u672c\u5730\u6d4b\u8bd5\u5199\u4f1a\u51fa\u73b0\u6709\u4e9b\u5185\u5bb9\uff08\u5c24\u5176\u662f\u5bc6\u7801\u90e8\u5206\uff09\u5199\u9519\uff0c\u7136\u540e\u4e00\u4e0d\u5c0f\u5fc3\u53c8\u4fdd\u5b58\u5237\u65b0\u4e86\uff0c\u9020\u6210\u8fd9\u6837\u4f1a\u9020\u6210\u672c\u5730\u8bbf\u95ee\u8fdc\u7aef\u6570\u636e\u5e93\u7684\u65f6\u5019\u5b9a\u4f4d\u5230\u4e00\u4e2a\u9519\u8bef\u7684\u5730\u5740\uff0c\u56e0\u6b64\u6211\u4eec\u83b7\u53d6\u5bc6\u7801\u7528\u6237\u4fe1\u606f\u548chost\u4fe1\u606f\u3002<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">SELECT Host, User,password FROM mysql.user WHERE User='root';<\/code><\/pre>\n<p>\u8bbf\u95ee\u5f97\u5230\u7ed3\u679c\uff0c\u4f1a\u53d1\u73b0Host\u5217\u8868\u4e2d\u7684%\u5730\u5740\u6ca1\u6709\u914d\u7f6e<span>PASSWORD\uff0c\u5bfc\u81f4\u5916\u90e8\u65e0\u6cd5\u8bbf\u95ee\u3002<\/span><\/p>\n<p>\u8fd9\u4e2a\u65f6\u5019\u9700\u8981\u91cd\u7f6e%\uff08\u4e5f\u5c31\u662f\u5916\u90e8\u4efb\u610f\u8bbf\u95ee\uff09\u7684\u5bc6\u7801\u3002<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">set password for 'root'@'%' = '\u4f60\u7684mysql\u5bc6\u7801';<\/code><\/pre>\n<p>\u5927\u6982\u7387\u63a5\u4e0b\u6765\u4f1a\u9047\u5230\u8fd9\u4e2a\u9519\u8bef\uff1aERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number\uff0c\u662f\u56e0\u4e3aset password\u56e0\u4e3a\u7248\u672c\u673a\u5236\u7684\u95ee\u9898\u4e0d\u5141\u8bb8\u76f4\u63a5\u8f93\u5165\u5bc6\u7801\uff0c\u800c\u662f\u9700\u8981<span>\u4f7f\u7528mysql\u547d\u4ee4\u884c\uff1aselect password(&#8216;\u5bc6\u7801&#8217;); \uff0c\u67e5\u8be2\u5bc6\u7801\u5bf9\u5e94\u7684\u5341\u516d\u8fdb\u5236\u7801\uff0c\u7136\u540e\u4f7f\u7528\u5341\u516d\u8fdb\u5236\u7801\u8fdb\u884c\u4fee\u6539\u5219\u53ef\u4ee5\u89e3\u51b3\u3002<\/span><\/p>\n<p>\u6700\u540e\uff0c\u522b\u5fd8\u8bb0\u5237\u65b0\u7f13\u5b58\u3002<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">flush privileges;<\/code><\/pre>\n<p>\u8fd9\u4e2a\u9519\u8bef\u8fd8\u6709\u53ef\u80fd\u662fcentOS 7\u7cfb\u5217yum\u5b89\u88c5Mariadb\uff08\u5f00\u6e90\u7248\u672cmysql\uff09\u5e76\u4e14\u6267\u884c\u4e86\u81ea\u52a8\u914d\u7f6eroot\u7528\u6237\u540d\u79f0\u7684\u5173\u7cfb\uff0c\u4f1a\u5bfc\u81f4%\u5916\u90e8\u8bbf\u95ee\u65e0\u6cd5\u8bbf\u95ee\uff0c\u800c\u5373\u4f7f\u5728\u6d4b\u8bd5\u8bbe\u7f6e\u4e2d\u4e5f\u65e0\u6d4e\u4e8e\u4e8b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MYSQL\u670d\u52a1\u7aef\u76f4\u63a5\u547d\u4ee4\u94fe\u63a5\u6b63\u5e38\uff0c\u672c\u5730\u5ba2\u6237\u7aef\u65e0\u6cd5\u94fe\u63a5\uff0c\u62a5\u95191045 \u53ef\u4ee5\u53bb\u53c2\u8003\u8fd9\u4e2a\u6587\u7ae0\uff1ahttps: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[112,111],"tags":[110],"class_list":["post-1168","post","type-post","status-publish","format-standard","hentry","category-mysql","category-databases","tag-mysql"],"views":506,"_links":{"self":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/1168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1168"}],"version-history":[{"count":3,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/1168\/revisions"}],"predecessor-version":[{"id":1171,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/1168\/revisions\/1171"}],"wp:attachment":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}