
{"id":2345,"date":"2020-10-12T13:45:53","date_gmt":"2020-10-12T05:45:53","guid":{"rendered":"http:\/\/admin.evshou.com\/?p=2345"},"modified":"2020-10-15T15:43:33","modified_gmt":"2020-10-15T07:43:33","slug":"2020javaweb%e6%95%99%e7%a8%8b%e4%b9%8bmysql%e7%ae%80%e4%bb%8b%e5%92%8c%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/www.9713job.com\/?p=2345","title":{"rendered":"2020Javaweb\u6559\u7a0b\u4e4bmysql\u7b80\u4ecb\u548c\u5b89\u88c5"},"content":{"rendered":"<h3>2020Javaweb\u6559\u7a0b\u4e4bmysql<\/h3>\n<h2><strong><span style=\"color: #ff0000;\">\u6570\u636e\u5e93\u7b80\u4ecb<\/span><\/strong><\/h2>\n<p><span style=\"color: #ff0000;\">1.1 \u7b80\u4ecb<\/span><\/p>\n<p>\u200b \u6570\u636e\u5e93\uff08DataBase\uff0cDB\uff09\uff1a\u6307\u957f\u671f\u4fdd\u5b58\u5728\u8ba1\u7b97\u673a\u7684\u5b58\u50a8\u8bbe\u5907\u4e0a\uff0c\u6309\u7167\u4e00\u5b9a\u89c4\u5219\u7ec4\u7ec7\u8d77\u6765\uff0c\u53ef\u4ee5\u88ab\u5404\u79cd\u7528\u6237\u6216\u5e94\u7528\u5171\u4eab\u7684\u6570\u636e\u96c6\u5408\u3002\u7b80\u5355\u7406\u89e3\u6570\u636e\u7684\u4ed3\u5e93\u3002<\/p>\n<p>\u200b \u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\uff08DataBase Management System\uff0cDBMS\uff09\uff1a\u6307\u4e00\u79cd\u64cd\u4f5c\u548c\u7ba1\u7406\u6570\u636e\u5e93\u7684\u5927\u578b\u8f6f\u4ef6\uff0c\u7528\u4e8e\u5efa\u7acb\u3001\u4f7f\u7528\u548c\u7ef4\u62a4\u6570\u636e\u5e93\uff0c\u5bf9\u6570\u636e\u5e93\u8fdb\u884c\u7edf\u4e00\u7ba1\u7406\u548c\u63a7\u5236\uff0c\u4ee5\u4fdd\u8bc1\u6570\u636e\u5e93\u7684\u5b89\u5168\u6027\u548c\u5b8c\u6574\u6027\u3002\u7528\u6237\u901a\u8fc7\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u8bbf\u95ee\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e\u3002<\/p>\n<p>\u6570\u636e\u5e93\u662f\u901a\u8fc7\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u521b\u5efa\u548c\u64cd\u4f5c\u7684\u3002<!--more--><\/p>\n<p><span style=\"color: #ff0000;\">1.2 \u5e38\u89c1\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf<\/span><\/p>\n<p>&#8211; Oracle\uff1aOracle\u6570\u636e\u5e93\u88ab\u8ba4\u4e3a\u662f\u4e1a\u754c\u76ee\u524d\u6bd4\u8f83\u6210\u529f\u7684\u5173\u7cfb\u578b\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u3002Oracle\u6570\u636e\u5e93\u53ef\u4ee5\u8fd0\u884c\u5728UNIX\u3001Windows\u7b49\u4e3b\u6d41\u64cd\u4f5c\u7cfb\u7edf\u5e73\u53f0\uff0c\u5b8c\u5168\u652f\u6301\u6240\u6709\u7684\u5de5\u4e1a\u6807\u51c6\uff0c\u5e76\u83b7\u5f97\u6700\u9ad8\u7ea7\u522b\u7684ISO\u6807\u51c6\u5b89\u5168\u6027\u8ba4\u8bc1\u3002<br \/>\n&#8211; MySQL\uff1aMySQL\u662f\u4e00\u4e2a\u5173\u7cfb\u578b\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\uff0c\u7531\u745e\u5178MySQL AB \u516c\u53f8\u5f00\u53d1\uff0c\u76ee\u524d\u5c5e\u4e8e Oracle\u65d7\u4e0b\u4ea7\u54c1\u3002MySQL \u662f\u6700\u6d41\u884c\u7684\u5173\u7cfb\u578b\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u4e4b\u4e00\uff0c\u5728 WEB \u5e94\u7528\u65b9\u9762\uff0cMySQL\u662f\u6700\u597d\u7684 RDBMS (Relational Database Management System\uff0c\u5173\u7cfb\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf) \u5e94\u7528\u8f6f\u4ef6\u3002<br \/>\n&#8211; DB2\uff1aDB2\u662fIBM\u516c\u53f8\u7684\u4ea7\u54c1\uff0cDB2\u6570\u636e\u5e93\u7cfb\u7edf\u91c7\u7528\u591a\u8fdb\u7a0b\u591a\u7ebf\u7d22\u4f53\u7cfb\u7ed3\u6784\uff0c\u5176\u529f\u80fd\u8db3\u4ee5\u6ee1\u8db3\u5927\u4e2d\u516c\u53f8\u7684\u9700\u8981\uff0c\u5e76\u53ef\u7075\u6d3b\u5730\u670d\u52a1\u4e8e\u4e2d\u5c0f\u578b\u7535\u5b50\u5546\u52a1\u89e3\u51b3\u65b9\u6848\u3002<br \/>\n&#8211; Microsoft SQL Server\uff1aSQL Server \u662fMicrosoft \u516c\u53f8\u63a8\u51fa\u7684\u5173\u7cfb\u578b\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u3002\u5177\u6709\u4f7f\u7528\u65b9\u4fbf\u53ef\u4f38\u7f29\u6027\u597d\u4e0e\u76f8\u5173\u8f6f\u4ef6\u96c6\u6210\u7a0b\u5ea6\u9ad8\u7b49\u4f18\u70b9\u3002<br \/>\n&#8211; SQLLite:\u5e94\u7528\u5728\u624b\u673a\u7aef\u7684\u6570\u636e\u5e93\u3002<\/p>\n<p><span style=\"color: #ff0000;\">1.3mysql\u5b89\u88c5\u6559\u7a0b<\/span><br \/>\n1.4 MySQL5.7.x \u7248\u672c\u5b89\u88c5<\/p>\n<p>&gt; \u540c\u610f\u534f\u8bae<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/040.png\" width=\"100%\" \/><\/p>\n<p>&gt; \u5f00\u53d1\u6a21\u5f0f<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/041.png\" width=\"100%\" \/><\/p>\n<p>&gt; \u8bf7\u6ce8\u610f\u5b89\u88c5\u9700\u8981\u7684\u4f9d\u8d56\u73af\u5883,\u5982\u679c\u60f3\u5b89\u88c5\u7684\u529f\u80fd\u7f3a\u5c11\u5bf9\u5e94\u73af\u5883\u662f\u65e0\u6cd5\u5b89\u88c5\u7684,\u9700\u5148\u5b89\u88c5\u73af\u5883\u540e\u624d\u53ef\u4ee5\u5b89\u88c5<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/042.png\" width=\"100%\" \/><\/p>\n<p>&gt; \u4e0b\u4e00\u6b65\u7684\u65f6\u5019\u4f1a\u63d0\u793a\u7f3a\u5c11\u73af\u5883,\u6b64\u5904\u7684\u63d0\u793a\u662f\u8bf4\u4f60\u671f\u671b\u5b89\u88c5\u7684\u4ea7\u54c1\u4e2d\u7f3a\u5c11\u4f9d\u8d56,\u4e0d\u4e00\u5b9a\u63d0\u793a\u7684\u662f\u6570\u636e\u5e93\u670d\u52a1\u5668\u5b89\u88c5\u7684\u4f9d\u8d56,\u53ef\u80fd\u662f\u5176\u4ed6\u529f\u80fd\u7ec4\u4ef6\u7684\u4f9d\u8d56\u7f3a\u5c11<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/043.png\" width=\"100%\" \/><\/p>\n<p>&gt; \u6b64\u5904\u53d1\u73b0\u6ca1\u6709 mysql server, \u8bf4\u660e\u5b83\u5bf9\u5e94\u7684\u4f9d\u8d56\u7f3a\u5c11,\u53ef\u4ee5\u5148\u6267\u884c\u5b89\u88c5\u8fd9\u4e9b\u53ef\u4ee5\u5b89\u88c5\u7684,\u4e4b\u540e\u5b89\u88c5\u5b8c\u4f9d\u8d56\u540e\u518d\u91cd\u65b0\u5b89\u88c5\u5176\u4ed6\u6a21\u5757,\u6211\u4eec\u6b64\u5904\u7684\u64cd\u4f5c\u662f\u5148\u5b89\u88c5\u4f9d\u8d56,\u7136\u540e\u540e\u9000\u518d\u6b21\u5b89\u88c5<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/044.png\" width=\"100%\" \/><\/p>\n<p>&gt; \u4e0b\u8f7d\u5b89\u88c5\u524d\u9762\u63d0\u793a\u7684 mysql server \u9700\u8981\u7684 vc2013\u540e,vc2013 \u5982\u679c\u572864\u4f4d\u7cfb\u7edf\u4e0a\u9762\u5efa\u8bae32\u548c64\u7684\u7a0b\u5e8f\u90fd\u5b89\u88c5,\u7136\u540e\u5728\u4e0a\u56fe\u7684\u5730\u65b9\u540e\u9000,\u91cd\u65b0 next \u5c31\u53ef\u4ee5\u770b\u5230\u53ef\u4ee5\u5b89\u88c5 mysql server \u4e86<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/045.png\" width=\"100%\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/046.png\" width=\"100%\" \/><\/p>\n<p>&gt; \u8fdb\u884c\u7b2c\u4e00\u6b65\u914d\u7f6e,\u9664\u4e86\u9700\u8981\u8bbe\u7f6e\u5bc6\u7801\u5916,\u540e\u9762\u7684\u6b65\u9aa4\u57fa\u672c\u4e0a\u90fd\u662f\u4e0b\u4e00\u6b65\u4e0b\u4e00\u6b65<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/047.png\" width=\"100%\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/048.png\" width=\"100%\" \/><\/p>\n<p>&gt; \u8bbe\u7f6e root \u5bc6\u7801<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/049.png\" width=\"100%\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/050.png\" width=\"100%\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/051.png\" width=\"100%\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/052.png\" width=\"100%\" \/><\/p>\n<p>&gt; finish \u540e\u56de\u5230\u5f53\u524d\u9875\u9762\u7ee7\u7eed\u914d\u7f6e<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/053.png\" width=\"100%\" \/><\/p>\n<p>&gt; \u6b64\u5904\u5148 check, \u540e\u4e0b\u4e00\u6b65<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/054.png\" width=\"100%\" \/><\/p>\n<p>&gt; \u6267\u884c\u5b8c\u6b64\u6b65\u9aa4 \u4e0b\u4e00\u6b65 finish \u914d\u7f6e\u5b8c\u6210<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/10\/09\/055.png\" width=\"100%\" \/><br \/>\n1.4\u5378\u8f7d\u8fc7\u7a0b<\/p>\n<p>1 \u63a7\u5236\u53f0\u5378\u8f7d<\/p>\n<p>2\u627e\u5230mysql\u7684\u5b89\u88c5\u76ee\u5f55 \u5220\u9664<\/p>\n<p>3 programdata \u5220\u9664mysql<\/p>\n<p>\u200b \u6ce8\u610f\uff1a\u5982\u679c\u5378\u8f7d\u540e\uff0c\u53d1\u73b0MySQL\u670d\u52a1\u6ca1\u6709\u5220\u6389\uff0c\u624b\u52a8\u5220\u9664: \u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u6253\u5f00\u547d\u4ee4\u884c\uff0c<\/p>\n<p>\u200b \u8f93\u5165 sc delete MySQL \u56de\u8f66\u3002<\/p>\n<p>1.5\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/p>\n<p>MYSQL_HOME\uff1aC:\\Program Files\\MySQL\\MySQL Server 5.7<\/p>\n<p>\u200b PATH:%MYSQL_HOME%\\bin;<\/p>\n<p>1.6\u542f\u52a8mysql\u670d\u52a1<\/p>\n<p>1 \u4f7f\u7528services.msc \u627e\u5230\u670d\u52a1\u542f\u52a8<\/p>\n<p>2 \u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884ccmd \u505c\u6b62net stop mysql \u542f\u52a8net start mysql<\/p>\n<p>1.7 \u9a8c\u8bc1\u662f\u5426\u5b89\u88c5\u6210\u529f\uff0c\u6253\u5f00cmd\u8f93\u5165<br \/>\n\u767b\u5f55\u8bed\u6cd5\uff1amysql [-h \u4e3b\u673a\u540d] -u root -p<\/p>\n<p>c:\\&gt;mysql -u root -p \u56de\u8f66\u8f93\u5165\u5bc6\u7801\u5373\u53ef<\/p>\n<p>\u7136\u540e\u8f93\u5165\u5bc6\u7801\uff0c\u6b63\u786e\u8fdb\u5165\u8868\u793a\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<p>1.8 \u5378\u8f7dMySQL<\/p>\n<p>1.\u505c\u6b62\u670d\u52a1\uff0c\u4f7f\u7528c:\\&gt;net stop mysql \u547d\u4ee4\u505c\u6b62\u670d\u52a1\uff0cc:\\&gt;net start mysql\u547d\u4ee4\u542f\u52a8\u670d\u52a1\u3002<\/p>\n<p>2.\u5728\u63a7\u5236\u9762\u677f&#8211;&gt;&#8221;\u7a0b\u5e8f\u548c\u529f\u80fd&#8221;\u4e2d\uff0c\u627e\u5230\u201cmysql\u7a0b\u5e8f\u201d\uff0c\u70b9\u51fb\u5378\u8f7d\u3002<\/p>\n<p>3.\u5220\u9664\u5b89\u88c5\u76ee\u5f55,\u4e00\u822c\u9ed8\u8ba4\u5728C:\\Program Files\\MySQL\u3002<\/p>\n<p>4.\u5220\u9664\u6570\u636e\u5e93\u6587\u4ef6\u5b58\u653e\u76ee\u5f55\uff0c\u4e00\u822c\u9ed8\u8ba4\u5728C:\\ProgramData\\MySQL\u3002<\/p>\n<p><span style=\"color: #ff0000;\">MySQL\u5b89\u88c5\u76ee\u5f55<\/span><\/p>\n<p>bin\u6587\u4ef6\u5939\uff1a\u8be5\u6587\u4ef6\u5939\u4e0b\u5b58\u653e\u7740\u53ef\u6267\u884c\u6587\u4ef6<br \/>\ninclude\u6587\u4ef6\u5939\uff1a\u8be5\u6587\u4ef6\u5939\u4e0b\u5b58\u653e\u7740\u5934\u6587\u4ef6<br \/>\nlib\u6587\u4ef6\u5939\uff1a\u8be5\u6587\u4ef6\u5939\u4e0b\u5b58\u653e\u7740\u5e93\u6587\u4ef6<br \/>\nshare\u6587\u4ef6\u5939\uff1a\u8be5\u6587\u4ef6\u5939\u4e0b\u5b58\u653e\u7740\u5b57\u7b26\u96c6\u3001\u8bed\u8a00\u7b49\u4fe1\u606f\u3002<\/p>\n<p><span style=\"color: #ff0000;\">MySQL\u914d\u7f6e\u6587\u4ef6<\/span><\/p>\n<p>\u5728MySQL\u5b89\u88c5\u76ee\u5f55\u4e2d\u627e\u5230my.ini\u6587\u4ef6\uff0c\u5e76\u6253\u5f00my.ini\u6587\u4ef6\u67e5\u770b\u51e0\u4e2a\u5e38\u7528\u914d\u7f6e\u53c2\u6570<br \/>\n\u5e38\u7528\u7684\u53c2\u6570\u5982\u4e0b\uff1a<br \/>\ndefault-character-set\uff1a\u5ba2\u6237\u7aef\u9ed8\u8ba4\u5b57\u7b26\u96c6<br \/>\ncharacter-set-server\uff1a\u670d\u52a1\u5668\u7aef\u9ed8\u8ba4\u5b57\u7b26\u96c6<br \/>\nport:\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u7aef\u7684\u7aef\u53e3\u53f7<br \/>\ndefault-storage-engine:MySQL\u9ed8\u8ba4\u5b58\u50a8\u5f15\u64ce INNODB<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2020Javaweb\u6559\u7a0b\u4e4bmysql \u6570\u636e\u5e93\u7b80\u4ecb 1.1 \u7b80\u4ecb \u200b \u6570\u636e\u5e93\uff08DataBase\uff0cDB\uff09\uff1a\u6307\u957f\u671f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-2345","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.9713job.com\/index.php?rest_route=\/wp\/v2\/posts\/2345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.9713job.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.9713job.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.9713job.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.9713job.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2345"}],"version-history":[{"count":1,"href":"https:\/\/www.9713job.com\/index.php?rest_route=\/wp\/v2\/posts\/2345\/revisions"}],"predecessor-version":[{"id":2346,"href":"https:\/\/www.9713job.com\/index.php?rest_route=\/wp\/v2\/posts\/2345\/revisions\/2346"}],"wp:attachment":[{"href":"https:\/\/www.9713job.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.9713job.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.9713job.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}