{"id":1763,"date":"2016-11-05T13:24:31","date_gmt":"2016-11-05T05:24:31","guid":{"rendered":"https:\/\/ai.zhousir.top\/?p=1763"},"modified":"2017-08-28T11:41:30","modified_gmt":"2017-08-28T03:41:30","slug":"mysql5-7%e4%b8%8b%e8%bd%bd%e5%ae%89%e8%a3%85%e4%b8%8e%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=1763","title":{"rendered":"Mysql5.7\u4e0b\u8f7d\u5b89\u88c5\u4e0e\u914d\u7f6e"},"content":{"rendered":"<h2>\u4e00\u3001\u4e0b\u8f7d\u5b89\u88c5\u4e0e\u914d\u7f6e<\/h2>\n<h2>1. oracle\u5b98\u7f51\u4e0b\u8f7dmysql5.7.16<\/h2>\n<p>\u4e0b\u8f7d\u5730\u5740:http:\/\/dev.mysql.com\/downloads\/mysql\/<\/p>\n<p>\u64cd\u4f5c\u5982\u56fe:\u8fd9\u91cc\u4e0b\u8f7d\u662fwindows(x86,32-bit),ZIP Archive<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2016\/11\/11.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-1764\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2016\/11\/11.png\" alt=\"11\" width=\"734\" height=\"457\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2><strong>2.\u5b89\u88c5\uff1a<\/strong><\/h2>\n<p>ZIP Archive\u7248\u662f\u514d\u5b89\u88c5\u7684\u3002\u53ea\u8981\u89e3\u538b\u5c31\u884c\u4e86,\u4e0d\u9700\u8981\u5b89\u88c5\u3002<\/p>\n<p>\u89e3\u538b\u5230D\u76d8mysql\u76ee\u5f55\u4e0bD:\\mysql\\mysql-5.7.16-win32<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2016\/11\/12.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1765\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2016\/11\/12.png\" alt=\"12\" width=\"379\" height=\"321\" \/><\/a><\/p>\n<p>my.ini\u6587\u4ef6\u9ed8\u8ba4\u662f\u6ca1\u6709\u5f97\u9700\u81ea\u5df1\u914d\u7f6e<\/p>\n<h2>3.\u914d\u7f6e<\/h2>\n<p>\u4e5f\u5c31\u662f<strong>my.ini\u6587\u4ef6\u7684\u7531\u6765<\/strong>\u3002<br \/>\n\u628amy-default.ini(\u6b64\u6587\u4ef6\u662f\u89e3\u538b\u4e4b\u540e\uff0c\u81ea\u5e26\u7684)\u8fd9\u4e2a\u6587\u4ef6\u590d\u5236\u4e00\u4e0b\u91cd\u547d\u540dmy.ini\uff0c\u7136\u540e\u66ff\u6362\u6210\u5982\u4e0b\u7684\u4ee3\u7801\u5373\u53ef\uff1a<\/p>\n<p>(\u4e0b\u9762\u7684\u5185\u5bb9\u5373\u4e3a\u6240\u65b0\u5efa\u7684my.ini\u6587\u4ef6\u7684\u5185\u5bb9\u3002\u8bb0\u5f97\u4fee\u6539\u91cc\u9762\u7684\u8def\u5f84\u3002)<\/p>\n<p>[java]<br \/>\n[mysql]<br \/>\n# \u8bbe\u7f6emysql\u5ba2\u6237\u7aef\u9ed8\u8ba4\u5b57\u7b26\u96c6<br \/>\ndefault-character-set=utf8<br \/>\n[mysqld]<br \/>\n#\u8bbe\u7f6e3306\u7aef\u53e3<br \/>\nport = 3306<br \/>\n# \u8bbe\u7f6emysql\u7684\u5b89\u88c5\u76ee\u5f55<br \/>\nbasedir=D:\\mysql\\mysql-5.7.16-win32<br \/>\n# \u8bbe\u7f6emysql\u6570\u636e\u5e93\u7684\u6570\u636e\u7684\u5b58\u653e\u76ee\u5f55<br \/>\ndatadir=D:\\mysql\\mysql-5.7.16-win32\\data<br \/>\n# \u5141\u8bb8\u6700\u5927\u8fde\u63a5\u6570<br \/>\nmax_connections=200<br \/>\n# \u670d\u52a1\u7aef\u4f7f\u7528\u7684\u5b57\u7b26\u96c6\u9ed8\u8ba4\u4e3a8\u6bd4\u7279\u7f16\u7801\u7684latin1\u5b57\u7b26\u96c6<br \/>\ncharacter-set-server=utf8<br \/>\n# \u521b\u5efa\u65b0\u8868\u65f6\u5c06\u4f7f\u7528\u7684\u9ed8\u8ba4\u5b58\u50a8\u5f15\u64ce<br \/>\ndefault-storage-engine=INNODB<br \/>\n[\/java]<\/p>\n<h2><strong>\u4e8c\u3001\u5b89\u88c5mysql\u670d\u52a1\u5e76\u542f\u52a8\u4e4b<\/strong><\/h2>\n<p>\u6253\u5f00\u547d\u4ee4\u884cCMD\u7a97\u53e3,\u8fdb\u5165mysql\u5b89\u88c5\u76ee\u5f55bin\u76ee\u5f55\u4e0b,\u8f93\u5165 \uff1amysqld install<\/p>\n<p>1.\u5b89\u88c5:<\/p>\n<p><span style=\"color: #0000ff;\">D:\\mysql\\mysql-5.7.16-win32\\bin&gt;<strong><span style=\"color: #993300;\">mysqld install<\/span><\/strong><\/span><br \/>\n<span style=\"color: #0000ff;\">Service successfully installed.<\/span><\/p>\n<p>\u62a5\u9519\uff1a\u200bThe service already exists<br \/>\n\u89e3\u51b3\u529e\u6cd5<br \/>\n\u79fb\u9664\u539f\u6765\u7684mysql\u670d\u52a1<br \/>\n<strong><span style=\"color: #993300;\">mysqld -remove MySQL<\/span><\/strong><\/p>\n<p>\u6ce8:\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u64cd\u4f5c<br \/>\n2.\u542f\u52a8mysql\u670d\u52a1:<\/p>\n<p><span style=\"color: #0000ff;\">D:\\mysql\\mysql-5.7.16-win32\\bin&gt;<strong><span style=\"color: #993300;\">net start mysql<\/span><\/strong><\/span><br \/>\n<span style=\"color: #0000ff;\">MySQL \u670d\u52a1\u6b63\u5728\u542f\u52a8 ..<\/span><br \/>\n<span style=\"color: #0000ff;\">MySQL \u670d\u52a1\u65e0\u6cd5\u542f\u52a8\u3002<\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u670d\u52a1\u6ca1\u6709\u62a5\u544a\u4efb\u4f55\u9519\u8bef\u3002<\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u8bf7\u952e\u5165 NET HELPMSG 3534 \u4ee5\u83b7\u5f97\u66f4\u591a\u7684\u5e2e\u52a9\u3002<\/span><\/p>\n<p>3.\u5982\u4e0a\u6ca1\u6709\u6210\u529f\u542f\u52a8\uff0c\u5219\u8f93\u5165\u521d\u59cb\u5316\u547d\u4ee4\u91cd\u65b0\u542f\u52a8:<\/p>\n<p><span style=\"color: #0000ff;\">D:\\mysql\\mysql-5.7.16-win32\\bin&gt;<span style=\"color: #993300;\"><strong>mysqld &#8211;initialize \u00a0 \u00a0\/\/&#8211;initialize\u524d\u9762\u662f\u4e24\u6a2a&#8217;&#8211;&#8216; \u00a0<\/strong><\/span><\/span><\/p>\n<p><span style=\"color: #0000ff;\">D:\\mysql\\mysql-5.7.16-win32\\bin&gt;<span style=\"color: #993300;\"><strong>net start mysql<\/strong><\/span><\/span><br \/>\n<span style=\"color: #0000ff;\">MySQL \u670d\u52a1\u6b63\u5728\u542f\u52a8 .<\/span><br \/>\n<span style=\"color: #0000ff;\">MySQL \u670d\u52a1\u5df2\u7ecf\u542f\u52a8\u6210\u529f\u3002<\/span><\/p>\n<p>\u6ce8:net\u547d\u4ee4\u65e0\u6cd5\u4f7f\u7528\uff0c\u8bbe\u7f6epath\u73af\u5883\u53d8\u91cf,\u503c\u4e3a:<span style=\"color: #993300;\">C:\\Windows\\System32<\/span><\/p>\n<p>\u5176\u4e2d\uff0c\u9ed8\u8ba4\u7684\u521d\u59cb\u5316\u5bc6\u7801\u5728\u7528\u201cmysqld &#8211;initialize\u201d\u521d\u59cb\u5316\u540e\u7684data\u6587\u4ef6\u5939\u7684*.err\u6587\u4ef6\u4e2d\u3002\u7528\u8bb0\u4e8b\u672c\u6253\u5f00\u8be5\u6587\u4ef6\u627e\u5230\u7c7b\u4f3c\u4e0b\u56fe\u7684\u5730\u65b9<\/p>\n<p>[Note] A temporary password is generated for root@localhost: dcvz&amp;(Rel1J2<\/p>\n<p>\u5176\u4e2d\u53cd\u767d\u90e8\u5206\u7684\u201ddcvz&amp;(Rel1J2\u201c\u5c31\u4e3a\u521d\u59cb\u5316\u7684\u5bc6\u7801\u3002<\/p>\n<p>\u4fee\u6539\u9ed8\u8ba4ROOT\u5bc6\u7801<\/p>\n<p>\u9996\u5148\u4f7f\u7528\u9ed8\u8ba4\u5bc6\u7801\u767b\u9646<a class=\"keylink\" href=\"http:\/\/www.2cto.com\/database\/\" target=\"_blank\">\u6570\u636e\u5e93<\/a>\uff0c\u7136\u540e\u4f7f\u7528 \u201d set password = password(&#8216;\u4f60\u81ea\u5df1\u7684\u5bc6\u7801&#8217;); \u201c \u8bed\u53e5\u5373\u53ef\u3002<\/p>\n<h2>\u4e09\u3001\u767b\u5f55mysql\u670d\u52a1<\/h2>\n<p>root\u7528\u6237\u9ed8\u8ba4\u5bc6\u7801\u4e3a\u7a7a<\/p>\n<p><span style=\"color: #0000ff;\">D:\\mysql\\mysql-5.7.16-win32\\bin&gt;<strong><span style=\"color: #993300;\">mysql -u root -p<\/span><\/strong><\/span><br \/>\n<span style=\"color: #0000ff;\">Enter password:<\/span><br \/>\n<span style=\"color: #0000ff;\">Welcome to the MySQL monitor. Commands end with ; or \\g.<\/span><br \/>\n<span style=\"color: #0000ff;\">Your MySQL connection id is 2<\/span><br \/>\n<span style=\"color: #0000ff;\">Server version: 5.7.16 MySQL Community Server (GPL)<\/span><\/p>\n<p><span style=\"color: #0000ff;\">Copyright (c) 2000, 2016, Oracle and\/or its affiliates. All rights reserved.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">Oracle is a registered trademark of Oracle Corporation and\/or its<\/span><br \/>\n<span style=\"color: #0000ff;\">affiliates. Other names may be trademarks of their respective<\/span><br \/>\n<span style=\"color: #0000ff;\">owners.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to clear the current input statement.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">mysql&gt; <span style=\"color: #993300;\"><strong>show databases;<\/strong><\/span><\/span><br \/>\n<span style=\"color: #0000ff;\">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<\/span><br \/>\n<span style=\"color: #0000ff;\">| Database |<\/span><br \/>\n<span style=\"color: #0000ff;\">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<\/span><br \/>\n<span style=\"color: #0000ff;\">| information_schema |<\/span><br \/>\n<span style=\"color: #0000ff;\">| mysql |<\/span><br \/>\n<span style=\"color: #0000ff;\">| performance_schema |<\/span><br \/>\n<span style=\"color: #0000ff;\">| sys |<\/span><br \/>\n<span style=\"color: #0000ff;\">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<\/span><br \/>\n<span style=\"color: #0000ff;\">4 rows in set (0.01 sec)<\/span><\/p>\n<p>\u56db\u3001\u6dfb\u52a0\u7528\u6237\u5e76\u91cd\u65b0\u767b\u5f55<\/p>\n<p><span style=\"color: #0000ff;\">mysql&gt;<strong><span style=\"color: #993300;\"> GRANT all privileges ON *.* TO &#8216;test&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;123456&#8217;;<\/span><\/strong><\/span><br \/>\n<span style=\"color: #0000ff;\">Query OK, 0 rows affected, 1 warning (0.00 sec)<\/span><\/p>\n<p><span style=\"color: #0000ff;\">mysql&gt; <span style=\"color: #993300;\"><strong>quit<\/strong><\/span><\/span><br \/>\n<span style=\"color: #0000ff;\">Bye<\/span><\/p>\n<p><span style=\"color: #0000ff;\">D:\\&gt;<span style=\"color: #993300;\"><strong>mysql -u test\u00a0-p<\/strong><\/span><\/span><br \/>\n<span style=\"color: #0000ff;\">Enter password: ******<\/span><br \/>\n<span style=\"color: #0000ff;\">Welcome to the MySQL monitor. Commands end with ; or \\g.<\/span><br \/>\n<span style=\"color: #0000ff;\">Your MySQL connection id is 4<\/span><br \/>\n<span style=\"color: #0000ff;\">Server version: 5.7.16 MySQL Community Server (GPL)<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>\u66f4\u591a\u4fe1\u606f\u53c2\u8003:http:\/\/blog.csdn.net\/qq_27093465\/article\/details\/52807666<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u4e0b\u8f7d\u5b89\u88c5\u4e0e\u914d\u7f6e 1. oracle\u5b98\u7f51\u4e0b\u8f7dmysql5.7.16 \u4e0b\u8f7d\u5730\u5740:http:\/\/dev.mysq [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[61],"tags":[],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/1763"}],"collection":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1763"}],"version-history":[{"count":12,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/1763\/revisions"}],"predecessor-version":[{"id":2141,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/1763\/revisions\/2141"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1763"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1763"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1763"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}