﻿{"id":224,"date":"2010-05-25T12:25:40","date_gmt":"2010-05-25T04:25:40","guid":{"rendered":"http:\/\/nick.workao.org\/?p=224"},"modified":"2010-05-25T12:25:40","modified_gmt":"2010-05-25T04:25:40","slug":"%e8%bd%ac%e5%a6%82%e4%bd%95%e5%9c%a8windows%e4%b8%8a%e5%ae%89%e8%a3%85%e5%a4%9a%e4%b8%aamysql","status":"publish","type":"post","link":"https:\/\/nick.txtcc.com\/index.php\/other\/224","title":{"rendered":"(\u8f6c)\u5982\u4f55\u5728Windows\u4e0a\u5b89\u88c5\u591a\u4e2aMySQL"},"content":{"rendered":"<p>\u514d\u5b89\u88c5\u7248\u7684mysql(Without  installer)\uff0c\u5176\u5b89\u88c5\u5305\u7684\u6587\u4ef6\u540d\u7c7b\u4f3c\u4e8emysql-noinstall-5.1.31-win32.zip\u3002\u56e0\u4e3a\u5b83\u5305\u542b\u4e86\u5b8c\u6574\u5b89\u88c5\u5305\u4e2d\u9664\u914d\u7f6e\u5411\u5bfc  \u4ee5\u5916\u7684\u5168\u90e8\u6587\u4ef6\uff0c\u6240\u4ee5\u9700\u8981\u4f60\u624b\u52a8\u5b89\u88c5\u548c\u914d\u7f6eMySQL\u7684\u914d\u7f6e\u6587\u4ef6(my.ini)\u3002<\/p>\n<p>\u5728Windows\u4e0a\u5b89\u88c5\u591a\u4e2aMySQL\u7684\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p><strong>(\u4e00)\u5b89\u88c5MySQL 5.1<\/strong><\/p>\n<p>1\u3001MySQL\u514d\u5b89\u88c5\u7248\u4e0b\u8f7d\u5730\u5740<\/p>\n<p><a href=\"http:\/\/dev.mysql.com\/downloads\"><a href=\"http:\/\/dev.mysql.com\/downloads\">http:\/\/dev.mysql.com\/downloads<\/a><\/a><\/p>\n<p>\u6587\u4ef6\u683c\u5f0f\uff1amysql-noinstall-version-win32.zip<\/p>\n<p>\u5728\u5b89\u88c5\u4e4b\u524d\uff0c\u8bf7\u4e0b\u8f7dmysql-noinstall-5.1.31-win32.zip\u548cmysql-noinstall-5.0.77- win32.zip\u8fd9\u4e24\u4e2a\u6587\u4ef6\u3002<\/p>\n<p>\u7531\u4e8eMySQL\u4e00\u76f4\u5728\u5347\u7ea7\uff0c\u6240\u4ee5\u5f53\u60a8\u9605\u8bfb\u672c\u6587\u65f6\uff0c\u6216\u8bb8\u5728\u5176\u5b98\u65b9\u7f51\u7ad9\u4e0a\u5df2\u63d0\u4f9b\u4e86\u65b0\u7684\u6b63\u5f0f\u7248\u4e0b\u8f7d\uff0c\u56e0\u6b64\uff0c\u8bf7\u8fdb\u5165MySQL\u4e0b\u8f7d\u9875\u9762<\/p>\n<p><a href=\"http:\/\/dev.mysql.com\/downloads\/\">http:\/\/dev.mysql.com\/downloads\/<\/a> \u67e5\u627e\u5f53\u524d\u7684\u6700\u65b0\u53ef\u7528\u7248\u672c\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u5728\u4e0b\u8f7d\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u63d0\u793a\u4f60\u9700\u8981\u6ce8\u518c\u4e3a<a title=\"\u7f51\u7edc\" href=\"http:\/\/net.it168.com\/\" target=\"_blank\">\u7f51\u7edc<\/a>\u7528\u6237\uff0c\u8fd9\u662f\u4e00\u4e2a\u5f88\u7b80\u77ed\u7684\u8fc7\u7a0b\uff0c\u5b83\u9700\u8981\u60a8\u63d0\u4f9b\u4e00\u4e2a\u6709\u6548\u7684 email\u5730\u5740\u3002\u5f53\u7136\uff0c\u5982\u679c\u4e0d\u6ce8\u518c\u7684\u8bdd\uff0c\u4f60\u4e5f\u53ef\u4ee5\u8df3\u8fc7\u6b64\u6b65\uff0c\u76f4\u63a5\u4e0b\u8f7d\u65e2\u53ef\u3002<\/p>\n<p>2\u3001\u89e3\u538b\u7f29\u5e76\u653e\u7f6e\u5230\u4f60\u671f\u671b\u7684\u76ee\u5f55\u4e0b<\/p>\n<p>(\u5efa\u8bae\u653e\u7f6e\u5728\u4e0d\u5305\u542b\u7a7a\u683c\u7684\u76ee\u5f55\u4e0b\uff0c\u5982E:mysql )<\/p>\n<p>\u4e3a\u4e86\u65b9\u4fbf\uff0c\u4fee\u6539\u89e3\u538b\u7f29\u540e\u7684\u6587\u4ef6\u5939\u540d\u4e3amysql\uff0c\u5e76\u653e\u7f6e\u5728C:mysql (\u56e0\u4e3a\u662f\u914d\u7f6e\u6587\u4ef6\u91cc\u9ed8\u8ba4\u7684\u8def\u5f84\u3002)<\/p>\n<p>\u5c06\u4e0b\u8f7d\u540e\u7684mysql-noinstall-5.0.77-win32.zip\u89e3\u538b\u5230%MySQL_HOME%(\u6b64\u5904%MySQL_HOME% \u8868\u793aMySQL\u7684\u5b89\u88c5\u8def\u5f84\uff0c\u5982\u6211\u5c06\u5176\u89e3\u538b\u81f3E:dev\uff0c<\/p>\n<p>\u4e3a\u4e86\u65b9\u4fbf\uff0c\u4fee\u6539\u89e3\u538b\u7f29\u540e\u7684\u6587\u4ef6\u5939\u540d\u4e3amysql<\/p>\n<p>-5.1.31)\u3002\u53e6\u5916\uff0c\u4e3a\u4e86\u4fbf\u4e8e\u65e5\u540e\u5907\u4efd\u548c\u5347\u7ea7\uff0c\u6700\u597d\u628a\u5b89\u88c5\u6587\u4ef6\u4e2d\u7684data\u76ee\u5f55\u5b58\u653e\u5728\u5176\u5b83\u5730\u65b9\u3002\u6b64\u5904\uff0c\u6211\u5728E\u76d8\u65b0\u5efa\u4e00\u4e2a\u76ee  \u5f55&#8221;MySQL5.1Data&#8221;\uff0c\u7136\u540e\u628a&#8221;E:devmysql-5.1.31&#8243;\u76ee\u5f55\u4e0b\u7684&#8221;data&#8221;\u5b50\u76ee\u5f55\u526a\u5207\u5230&#8221;E:  MySQL5.1Data&#8221;\u76ee\u5f55\u4e2d\u3002<\/p>\n<p>3\u3001\u521b\u5efa\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>\u5bf9\u4e8e<a title=\"\u670d\u52a1\u5668\" href=\"http:\/\/server.it168.com\/\" target=\"_blank\">\u670d \u52a1\u5668<\/a>\u6bcf\u6b21\u542f\u52a8\u90fd\u7528\u5230\u7684\u9009\u9879\u548c\u5bf9MySQL\u670d\u52a1\u7684\u4e00\u4e9b\u8bbe\u7f6e\uff0c\u4f60\u4f1a\u53d1\u73b0\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6\u6765\u6307\u5b9aMySQL\u914d\u7f6e\u975e\u5e38\u65b9\u4fbf\u3002<\/p>\n<p>MySQL\u914d\u7f6e\u6587\u4ef6\uff0c\u4e00\u822c\u653e\u5728Windows \u7cfb\u7edf\u76ee\u5f55\u4e2d\uff0c\u5982C:WINDOWS \u6216C:WINNT \uff0c\u540d\u4e3amy.ini<\/p>\n<p>\u3002\u4f46\u662f\uff0c\u6b64\u5904\u6211\u4eec\u662f\u5b89\u88c5\u4e24\u4e2aMySQL\uff0c\u56e0\u6b64\u5c06\u5176\u653e\u5728MySQL\u89e3\u538b\u7f29\u540e\u7684\u6587\u4ef6\u5939\u4e2d\u3002\u5728\u8be5\u6587\u4ef6\u5939\u4e2d\uff0c\u4e00\u822c\u5305\u542b5\u4e2aMySQL\u81ea\u5e26\u7684\u914d\u7f6e\u6587\u4ef6\uff0cmy-  small.ini\u3001my-medium.ini\u3001my-large.ini\u3001my-huge.ini\u548cmy-innodb-heavy-4G.ini\uff0c  \u8bf7\u4f60\u6839\u636e\u81ea\u5df1\u673a\u5668\u7684<\/p>\n<p><a title=\"\u5185\u5b58\" href=\"http:\/\/product.it168.com\/list\/b\/0205_1.shtml\" target=\"_blank\">\u5185\u5b58<\/a>\u5927\u5c0f\uff0c\u9009\u62e9\u5176 \u4e00\uff0c\u5e76\u628a\u5b83\u91cd\u65b0\u547d\u540d\u4e3amy.ini\u7528\u4f5c\u57fa\u672c\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<p>\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u4e00\u4e9b\u53c2\u6570\uff0c\u9700\u8981\u6839\u636e\u5b89\u88c5\u76ee\u5f55\u7684\u4e0d\u540c\uff0c\u505a\u76f8\u5e94\u7684\u4fee\u6539\uff0c\u5982<\/p>\n<p>[WinMySQLAdmin]<\/p>\n<p>Server=E:\/dev\/mysql-5.1.31\/bin\/mysqld.exe<\/p>\n<p>[mysqld]<\/p>\n<p>basedir=E:\/dev\/mysql-5.1.31<\/p>\n<p>datadir=E:\/MySQL5.1Data\/data<\/p>\n<p>default-character-set=gbk<\/p>\n<p>port=3306<\/p>\n<p>[client]<\/p>\n<p>default-character-set=gbk<\/p>\n<p>port=3306<\/p>\n<p>4\u3001\u5c06MySQL\u52a0\u5165\u5230Windows \u7684\u670d\u52a1\u4e2d<\/p>\n<p>\u6253\u5f00MS-DOS\u7a97\u53e3\uff0c\u8fdb\u5165DOS\u73af\u5883\uff0c\u5207\u6362\u5230&#8221;%MySQL_HOME%bin&#8221;\u76ee\u5f55<\/p>\n<p>\u8fd0\u884c\uff1a<\/p>\n<p>%MySQL_HOME%bin>mysqld &#8211;install mysql5.1<\/p>\n<p>(\u6b64\u65f6\uff0c\u5728\u8fd0\u884c\u4e2d\u8f93\u5165&#8221;services.msc&#8221;\u6216\u8005\u6253\u5f00&#8221;\u63a7\u5236\u9762\u677f&#8221;->&#8221;\u7ba1\u7406\u5de5\u5177&#8221;->&#8221;\u670d\u52a1&#8221;\uff0c\u53ef\u4ee5\u770b\u5230\u670d\u52a1\u5217\u8868\u4e2d\u5b58 \u5728&#8221;MySQL5.1&#8243;\u670d\u52a1\u3002\u5982\u679c\u4e0d\u5e0c\u671b\u5b83\u81ea\u52a8\u8fd0\u884c\uff0c\u4e5f\u53ef\u4ee5\u6539\u4e3a\u624b\u52a8\uff0c\u8fd9\u6837\uff0c\u5f53\u4f60\u4e0d\u7528\u5b83\u7684\u65f6\u5019\uff0c\u4e5f\u53ef\u4ee5\u8282\u7701<a title=\"\u5185\u5b58\" href=\"http:\/\/product.it168.com\/list\/b\/0205_1.shtml\" target=\"_blank\">\u5185\u5b58<\/a>\u3002)<\/p>\n<p>5\u3001\u542f\u52a8\u548c\u505c\u6b62MySQL\u670d\u52a1<\/p>\n<p>%MySQL_HOME%bin>net start mysql<\/p>\n<p>\u6216\u8005\u8fdb\u5165DOS\u73af\u5883\uff0c\u8fdb\u5165\u5982\u4e0b\u76ee\u5f55\u8fd0\u884c\uff1a%MySQL_HOME%binmysqld.exe<\/p>\n<p>(\u6216\u76f4\u63a5\u53cc\u51fbmysqld.exe\u6587\u4ef6)\uff0c\u5373\u53ef\u542f\u52a8MySQL\u670d\u52a1<\/p>\n<p>%MySQL_HOME%bin>net stop mysql(\u505c\u6b62<em>MySQL<\/em>\u670d\u52a1)<\/p>\n<p>\u6ce8\uff1a\u5982\u679c\u8981\u5378\u8f7d<em> MySQL <\/em>\u670d\u52a1\uff0c\u8bf7\u8fd0\u884c%MySQL_HOME%bin>mysqld &#8211;remove<\/p>\n<p>(\u5982\u679c\u4f60\u4e0d\u518d\u9700\u8981MySQL\u4e86\uff0c\u8bf7\u5148\u505c\u6389MySQL\u7684\u670d\u52a1\uff0c\u7136\u540e\u518d\u628aMySQL\u7684\u670d\u52a1\u5378\u8f7d\u6389\uff0c\u6700\u540e\u5220\u9664MySQL\u5b89\u88c5\u76ee\u5f55\u5373\u53ef\u3002)<\/p>\n<p>6\u3001\u8fdb\u5165MySQL<\/p>\n<p>%MySQL_HOME%binmysql -uroot -p (\u5bc6\u7801\u4e3a\u7a7a)<\/p>\n<p>(\u5982\u679c\u51fa\u73b0ERROR 2003 (HY000): Can&#8217;t connect to MySQL server on  &#8216;localhost&#8217;<\/p>\n<p>(10061)\u63d0\u793a\uff0c\u8868\u793aMySQL\u670d\u52a1\u6ca1\u6709\u88ab\u542f\u52a8\uff0c\u5176\u4e3b\u8981\u7684\u539f\u56e0\u5728\u4e8e\uff0c\u914d\u7f6e\u6587\u4ef6\u5199\u7684\u4e0d\u5bf9\u3002<\/p>\n<p>\u5982\u679c\u51fa\u73b0ERROR 1045 (28000): Access denied for user<\/p>\n<p>[email=]&#8217;root&#8217;@&#8217;localhost'[\/email]<\/p>\n<p>(using password: NO)\u63d0\u793a\uff0c\u8868\u793aMySQL\u670d\u52a1\u5df2\u7ecf\u542f\u52a8\uff0c\u4f46\u662f\u4f60\u6240\u8f93\u5165\u7684\u5bc6\u7801\u4e0d\u6b63\u786e\u3002<\/p>\n<p>\u5982\u679c\u51fa\u73b01067\u7684\u9519\u8bef\uff1aA system error has occurred.System error 1067 has  occurred.The<\/p>\n<p>process terminated unexpectedly.\u63d0\u793a\uff0c\u65e0\u6cd5\u542f\u52a8<em> MySQL  <\/em>\u670d\u52a1\uff0c\u8fdb\u7a0b\u610f\u5916\u7ec8\u6b62\uff0c\u8868\u793a\u4f60\u7684\u914d\u7f6e\u6587\u4ef6\u6709\u95ee\u9898\uff0c\u8bf7\u68c0\u67e5<\/p>\n<p>my.ini\u91cc\u9762\u7684\u8def\u52b2\u662f\u5426\u5199\u9519\u4e86\u6216\u8005\u8bd5\u7740\u5220\u9664MySQL5.1Data\u6587\u4ef6\u4e2d\u7684LOG\u6587\u4ef6\u3002 )<\/p>\n<p>mysql>select version(); (\u663e\u793a\u76ee\u524d\u4f60\u6240\u5b89\u88c5\u7684 <em>MySQL\u7684<\/em> \u6570\u636e\u5e93\u7248\u672c\u4fe1\u606f)<\/p>\n<p>\u5982\u679c\u4e0a\u9762\u7684\u6240\u6709\u64cd\u4f5c\u6b65\u9aa4\u5747\u6b63\u5e38\u7684\u8bdd\uff0c\u90a3\u4e48\u606d\u559c\u4f60\uff0c\u4f60\u5df2\u5b89\u88c5\u597d\u4e86 <em>MySQL<\/em> 5.1\uff0c\u4e0b\u9762\u6211\u4eec\u7ee7\u7eed\u5b89\u88c5 <em>MySQL<\/em> 5.0.<\/p>\n<div><strong>\uff08\u4e8c\uff09\u5b89\u88c5MySQL 5.0<\/strong><\/div>\n<p>\u5b89\u88c5MySQL 5.0\u7684\u6b65\u9aa4\u4e0e\u5b89\u88c5MySQL 5.1\u7684\u6b65\u9aa4\u7c7b\u4f3c\uff0c\u5176\u4e2d\uff0c\u6709\u4e24\u4e2a\u9700\u8981\u6ce8\u610f\u7684\u5730\u65b9\u4e3a\uff0c<\/p>\n<p>(1)\u5728\u521b\u5efaMySQL 5.0\u7684\u914d\u7f6e\u6587\u4ef6\u65f6\uff0cport\u8981\u8bbe\u7f6e\u6210\u975e3306(\u59823307\u7b49)\u7aef\u53e3\u3002<\/p>\n<p>(2)\u5c06MySQL\u52a0\u5165\u5230Windows \u7684\u670d\u52a1\u4e2d\uff1a<\/p>\n<p>\u6253\u5f00MS-DOS\u7a97\u53e3\uff0c\u8fdb\u5165DOS\u73af\u5883\uff0c\u5207\u6362\u5230&#8221;%MySQL_HOME%bin&#8221;\u76ee\u5f55<\/p>\n<p>\u8fd0\u884c\uff1a %MySQL_HOME%bin>mysqld-nt &#8211;install mysql5.0<\/p>\n<p><em>\u6ce8\u610f<\/em>\uff1amysqld(\u6216mysqld.exe)\u662f MySQL<\/p>\n<p>server\u6570\u636e\u5e93<a title=\"\u670d\u52a1\u5668\" href=\"http:\/\/server.it168.com\/\" target=\"_blank\">\u670d\u52a1\u5668<\/a>\u7684\u76f8\u5173\u7a0b\u5e8f\uff0c\u800cmysqld-nt(\u6216mysqld- nt.exe)\u662fMySQL Daemon\u6570\u636e\u5e93\u670d\u52a1\u7684\u76f8\u5173\u7a0b\u5e8f\uff0c\u5728MySQL<\/p>\n<p>5.1(\u6b64\u5904\u7684\u7248\u672c\u4e3a5.1.31)\u4e2d\u4ec5\u6709mysqld(\u6216mysqld.exe)\uff0c\u5728MySQL  5.0(\u6b64\u5904\u7684\u7248\u672c\u4e3a5.0.77)\u4e2d\uff0c\u8fd9\u4e24\u8005\u90fd\u6709\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>\u514d\u5b89\u88c5\u7248\u7684mysql(Without installer)\uff0c\u5176\u5b89\u88c5\u5305\u7684\u6587\u4ef6\u540d\u7c7b\u4f3c\u4e8emysql-noinstall-5.1.31-win32.zip\u3002\u56e0\u4e3a\u5b83\u5305\u542b\u4e86\u5b8c\u6574\u5b89\u88c5\u5305\u4e2d\u9664\u914d\u7f6e\u5411\u5bfc \u4ee5\u5916\u7684\u5168\u90e8\u6587\u4ef6\uff0c&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[100,17],"class_list":["post-224","post","type-post","status-publish","format-standard","hentry","category-other","tag-mysql","tag-windows"],"_links":{"self":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=224"}],"version-history":[{"count":1,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/224\/revisions"}],"predecessor-version":[{"id":225,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/224\/revisions\/225"}],"wp:attachment":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}