{"id":1800,"date":"2019-01-17T00:51:43","date_gmt":"2019-01-16T16:51:43","guid":{"rendered":"http:\/\/www.youthtribe.com\/?p=1800"},"modified":"2019-01-17T01:01:31","modified_gmt":"2019-01-16T17:01:31","slug":"mysql5-7%e4%b8%8b%e8%bd%bd%e6%9d%a5%e7%9a%84zip%e6%a0%bc%e5%bc%8f%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"http:\/\/www.youthtribe.com\/archives\/1800","title":{"rendered":"mysql5.7\u4e0b\u8f7d\u6765\u7684zip\u683c\u5f0f\u5982\u4f55\u914d\u7f6e[windows]"},"content":{"rendered":"\n

\u914d\u7f6e\u4e2a\u73af\u5883\u771f\u70e6\u3002\u6d6a\u8d39\u592a\u591a\u65f6\u95f4\u4e86\u3002<\/p>\n\n\n\n

\u4ecemysql\u5b98\u7f51\u4e0b\u8f7d\u6765\u7684\u662f\u4e00\u4e2azip\u683c\u5f0f\u7684\u538b\u7f29\u5305\uff0c\u672c\u4ee5\u4e3a\u662fexe\u7684\u5b89\u88c5\u5305\u3002\u4f46\u4e0d\u662f\u3002\u7248\u672c\u662fmysql-5.7.24-winx64 <\/p>\n\n\n\n

\u89e3\u538b\u5230\u4e00\u4e2a\u8def\u5f84\uff0c\u6700\u597d\u4e0d\u8981\u6709\u4e2d\u6587\uff0c\u4ee5\u514d\u51fa\u4ec0\u4e48\u5e7a\u86fe\u5b50\u3002<\/p>\n\n\n\n

\u5728\u6587\u4ef6\u5939\u91cc\u5efa\u7acb\u4e00\u4e2amy.ini\u6587\u4ef6\uff0c\u6709\u4e00\u4e9b\u57fa\u672c\u914d\u7f6e<\/p>\n\n\n\n

[mysql]
\u8bbe\u7f6emysql\u5ba2\u6237\u7aef\u9ed8\u8ba4\u5b57\u7b26\u96c6
default-character-set=utf8
[mysqld]
\u8bbe\u7f6e3306\u7aef\u53e3
port = 3306
\u8bbe\u7f6emysql\u7684\u5b89\u88c5\u76ee\u5f55
basedir=F:\\image_server\\mysql-5.7.24-winx64
\u5141\u8bb8\u6700\u5927\u8fde\u63a5\u6570
max_connections=200
\u670d\u52a1\u7aef\u4f7f\u7528\u7684\u5b57\u7b26\u96c6\u9ed8\u8ba4\u4e3a8\u6bd4\u7279\u7f16\u7801\u7684latin1\u5b57\u7b26\u96c6
character-set-server=utf8
\u521b\u5efa\u65b0\u8868\u65f6\u5c06\u4f7f\u7528\u7684\u9ed8\u8ba4\u5b58\u50a8\u5f15\u64ce
default-storage-engine=INNODB
datadir=F:\\image_server\\mysql-5.7.24-winx64\\data<\/pre>\n\n\n\n

\u91cc\u8fb9\u7684\u8def\u5f84\u8bb0\u5f97\u81ea\u5df1\u6539\u3002<\/p>\n\n\n\n

\u7136\u540e\u6dfb\u52a0\u4e00\u4e2amysql\u7684\u73af\u5883\u53d8\u91cf\u3002<\/p>\n\n\n\n

\u7136\u540e\u6267\u884c\u4e00\u4e0bmysql\u7684\u521d\u59cb\u5316\uff0c\u5c31\u662f\u5728data\u6587\u4ef6\u5939\u91cc\u751f\u6210\u4e00\u4e9b\u57fa\u672c\u7684\u8868\u76f8\u5173\u5185\u5bb9\u3002<\/p>\n\n\n\n

mysqld --initialize\n\n<\/pre>\n\n\n\n

<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

\u7136\u540e\u5b89\u88c5\u4e00\u4e0b\u670d\u52a1\uff0c\u6ce8\u610f\u8fd9\u4e00\u53e5\u5fc5\u987bcd\u5230mysql\u7684bin\u8def\u5f84\uff0c\u4e0d\u7136\u4f1a\u51fa\u9519\u3002<\/p>\n\n\n\n

mysqld install MySQL --defaults-file=\"F:\\image_server\\mysql-5.7.24-winx64\\my.ini\"<\/pre>\n\n\n\n
\"\"<\/figure>\n\n\n\n

\u542f\u52a8\u670d\u52a1\uff0cnet start MySQL<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

\u5c1d\u8bd5\u767b\u5f55\uff0c\u4f46\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u5c31\u662froot\u5bc6\u7801\u5462\uff1f\u5728\u521a\u624d\u7684\u521d\u59cb\u5316\u540e\uff0c\u4f1a\u5728data\u6587\u4ef6\u91cc\u751f\u6210\u4e00\u4e2aerr\u540e\u7f00\u7684\u6587\u4ef6\uff0c\u627e\u5230\u4e00\u884c \uff1aA temporary password is generated for root@localhost:\u540e\u8fb9\u5c31\u662f\u5bc6\u7801<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

\u5c1d\u8bd5\u767b\u5f55\uff1amysql -uroot -p,\u6210\u529f\u3002done!<\/p>\n\n\n\n

\"\"<\/figure>\n","protected":false},"excerpt":{"rendered":"

\u914d\u7f6e\u4e2a\u73af\u5883\u771f\u70e6\u3002\u6d6a\u8d39\u592a\u591a\u65f6\u95f4\u4e86\u3002 \u4ecemysql\u5b98\u7f51\u4e0b\u8f7d\u6765\u7684\u662f\u4e00\u4e2azip\u683c\u5f0f\u7684\u538b\u7f29\u5305\uff0c\u672c\u4ee5\u4e3a\u662fexe\u7684\u5b89\u88c5\u5305\u3002\u4f46\u4e0d\u662f\u3002\u7248\u672c\u662fmysql-5.7.24-winx64 \u89e3\u538b\u5230\u4e00\u4e2a\u8def\u5f84\uff0c\u6700\u597d\u4e0d\u8981\u6709\u4e2d\u6587\uff0c\u4ee5\u514d\u51fa\u4ec0\u4e48\u5e7a\u86fe\u5b50\u3002 \u5728\u6587\u4ef6\u5939\u91cc\u5efa\u7acb\u4e00\u4e2amy.ini\u6587\u4ef6\uff0c\u6709\u4e00\u4e9b\u57fa\u672c\u914d\u7f6e [mysql] \u8bbe\u7f6emysql\u5ba2\u6237\u7aef\u9ed8\u8ba4\u5b57\u7b26\u96c6 default-character-set=utf8 [mysqld] \u8bbe\u7f6e3306\u7aef\u53e3 port = 3306 \u8bbe\u7f6emysql\u7684\u5b89\u88c5\u76ee\u5f55 basedir=F:\\image_server\\mysql-5.7.24-winx64 \u5141\u8bb8\u6700\u5927\u8fde\u63a5\u6570 max_connections=200 \u670d<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1800"}],"collection":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/comments?post=1800"}],"version-history":[{"count":3,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1800\/revisions"}],"predecessor-version":[{"id":1809,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1800\/revisions\/1809"}],"wp:attachment":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/media?parent=1800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/categories?post=1800"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/tags?post=1800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}