{"id":1724,"date":"2023-03-26T19:48:11","date_gmt":"2023-03-26T11:48:11","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1724"},"modified":"2023-04-23T21:35:36","modified_gmt":"2023-04-23T13:35:36","slug":"mysql-8-winx64-installation-under-windows","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/26\/mysql-8-winx64-installation-under-windows\/","title":{"rendered":"Windows\u4e0b mysql-8.x-winx64 \u5b89\u88c5"},"content":{"rendered":"<h3>\u4e0b\u8f7d\u89e3\u538b<\/h3>\n<p>MySQL Windows 64 bits \u4e0b\u8f7d\u5730\u5740\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/cdn.mysql.com\/\/Downloads\/MySQL-8.0\/mysql-8.0.21-winx64.zip\">https:\/\/cdn.mysql.com\/\/Downloads\/MySQL-8.0\/mysql-8.0.21-winx64.zip<\/a><\/p>\n<h3>\u521d\u59cb\u5316\u811a\u672c my.ini\uff0c\u653e\u5230 mysql \u7684\u89e3\u538b\u76ee\u5f55\uff0c\u4e0e bin \u76ee\u5f55\u5e73\u7ea7<\/h3>\n<p><!-- more --><\/p>\n<pre><code class=\"language-bash\">[mysqld]\n# \u8bbe\u7f6e3306\u7aef\u53e3\nport=3306\n# \u8bbe\u7f6emysql\u7684\u5b89\u88c5\u76ee\u5f55\n# basedir=C:\\Server\\mysql-8.0.25-winx64\n# \u8bbe\u7f6emysql\u6570\u636e\u5e93\u7684\u6570\u636e\u7684\u5b58\u653e\u76ee\u5f55\ndatadir=C:\\Server\\mysql-8.0.25-winx64\\data\n# \u5141\u8bb8\u6700\u5927\u8fde\u63a5\u6570\nmax_connections=200\n# \u5141\u8bb8\u8fde\u63a5\u5931\u8d25\u7684\u6b21\u6570\u3002\nmax_connect_errors=10\n# \u670d\u52a1\u7aef\u4f7f\u7528\u7684\u5b57\u7b26\u96c6\u9ed8\u8ba4\u4e3autf8mb4\ncharacter-set-server=utf8mb4\n# \u521b\u5efa\u65b0\u8868\u65f6\u5c06\u4f7f\u7528\u7684\u9ed8\u8ba4\u5b58\u50a8\u5f15\u64ce\ndefault-storage-engine=INNODB\n# \u9ed8\u8ba4\u4f7f\u7528\u201cmysql_native_password\u201d\u63d2\u4ef6\u8ba4\u8bc1\n#mysql_native_password\ndefault_authentication_plugin=mysql_native_password\n\n[client]\n# \u8bbe\u7f6emysql\u5ba2\u6237\u7aef\u8fde\u63a5\u670d\u52a1\u7aef\u65f6\u9ed8\u8ba4\u4f7f\u7528\u7684\u7aef\u53e3\nport=3306\n# \u8bbe\u7f6emysql\u5ba2\u6237\u7aef\u9ed8\u8ba4\u5b57\u7b26\u96c6\ndefault-character-set=utf8mb4<\/code><\/pre>\n<h3>\u4ee5\u7ba1\u7406\u5458\u65b9\u5f0f\u542f\u52a8 CMD<\/h3>\n<h3>\u5728 mysql \u8def\u5f84\u7684 bin \u76ee\u5f55\uff0c\u6267\u884c\u5b89\u88c5\u547d\u4ee4<\/h3>\n<pre><code class=\"language-bash\">mysqld --initialize --console<\/code><\/pre>\n<p>\u82e5\u672c\u5730\u62a5\u9519\uff1a\u65e0\u6cd5\u542f\u52a8\u6b64\u7a0b\u5e8f\uff0c\u56e0\u4e3a\u8ba1\u7b97\u673a\u4e2d\u4e22\u5931 VCRUNTIME140_1.dll\u3002\u5c1d\u8bd5\u91cd\u65b0\u5b89\u88c5\u8be5\u7a0b\u5e8f\u4ee5\u89e3\u51b3\u6b64\u95ee\u9898<\/p>\n<p>\u4ece\u7f51\u4e0a\u4e0b\u8f7d<code>vcruntime140_1.dll<\/code>\u6587\u4ef6\u5e76\u653e\u5230<code>C:\\Windows\\System32<\/code>\u76ee\u5f55\u4e0b<\/p>\n<p>\u7ee7\u7eed\u6267\u884c\u5b89\u88c5\u6307\u4ee4\uff1a<\/p>\n<pre><code class=\"language-bash\">mysqld --initialize --console<\/code><\/pre>\n<h3>\u5b89\u88c5\u6210\u529f\uff0c\u751f\u6210 root \u7528\u6237\u7684\u4e34\u65f6\u5bc6\u7801<\/h3>\n<h3>\u5b89\u88c5\u670d\u52a1<\/h3>\n<pre><code class=\"language-bash\">mysqld --install<\/code><\/pre>\n<p>\u82e5\u670d\u52a1\u5df2\u5b58\u5728\u9700\u8981\u5220\u9664\uff1a<\/p>\n<pre><code class=\"language-bash\">sc delete mysql<\/code><\/pre>\n<h3>\u542f\u52a8\u670d\u52a1<\/h3>\n<pre><code class=\"language-bash\">net start mysql<\/code><\/pre>\n<h3>\u8fde\u63a5 mysql\uff0c\u4fee\u6539\u5bc6\u7801<\/h3>\n<pre><code class=\"language-bash\">mysql -u root -p<\/code><\/pre>\n<p>\u8f93\u5165\u4e34\u65f6\u5bc6\u7801<\/p>\n<h3>\u4fee\u6539 localhost \u7684 root \u5bc6\u7801<\/h3>\n<pre><code class=\"language-bash\">ALTER USER &#039;root&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;appblog.cn&#039;;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u8f7d\u89e3\u538b MySQL Windows 64 bits \u4e0b\u8f7d\u5730\u5740\uff1ahttps:\/\/cdn.mysql.com\/\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-1724","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1724","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1724"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1724\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}