{"id":11,"date":"2021-01-18T12:00:39","date_gmt":"2021-01-18T04:00:39","guid":{"rendered":"https:\/\/cn.hidandelion.com\/?p=11"},"modified":"2023-12-03T16:45:33","modified_gmt":"2023-12-03T08:45:33","slug":"%e6%95%b0%e6%8d%ae%e5%ba%93%e7%b3%bb%e7%bb%9f%e5%ad%a6%e4%b9%a0%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/cn.hidandelion.com\/?p=11","title":{"rendered":"\u6570\u636e\u5e93\u7cfb\u7edf\u5b66\u4e60\u8bb0\u5f55"},"content":{"rendered":"\n<p>\u539f\u6807\u9898&nbsp;<strong><em>UC Berkeley cs61A\/cs186\u5b66\u4e60\u8bb0\u5f55<\/em><\/strong><\/p>\n\n\n\n<p>\u56e0\u4e3a\u5b66\u8fc7c\u8bed\u8a00\u4e5f\u7528\u8fd9\u4e2a\u5199\u8fc7\u5927\u4f5c\u4e1a\uff0c\u731c\u60f3cs61A\u5bf9\u6211\u6765\u8bf4\u96be\u5ea6\u5e94\u8be5\u4e0d\u4f1a\u7279\u522b\u90a3\u5565\u3002\u3002\u5e76\u4e14\u4e0b\u5b66\u671f\u5373\u5c06\u9762\u5bf9\u8ba1\u9662\u77e5\u540d\u7684\u5f88\u9876\u7684\u8bfe\u300a\u6570\u636e\u5e93\u7cfb\u7edf\u300b\u548c\u5927\u4f5c\u4e1aMiniSQL\uff0c\u6240\u4ee5\u5bd2\u5047\u9700\u8981\u9884\u4e60\u4e00\u4e0b\uff0c\u5e0c\u671b\u4e0d\u8981\u534a\u9014\u800c\u5e9f\u3002\u3002\u5982\u679c\u4e24\u4e2a\u5e94\u4ed8\u4e0d\u8fc7\u6765\u540e\u9762\u518d\u770b\u7740\u8c03\u6574\u5427\u3002\u3002<\/p>\n\n\n\n<p>\u7f51\u8bfe\u5728Youtube\u548cb\u7ad9\u4e0a\u90fd\u6709\uff0c\u8bfe\u7a0b\u4f5c\u4e1a\u548c\u8d44\u6599\u5728<a href=\"https:\/\/inst.eecs.berkeley.edu\/\">EECS Instructional Support Group Home Page (berkeley.edu)<\/a>\u53ef\u4ee5\u4e0b\u8f7d\u5230\u3002\u53e6\u5916\u8fd9\u91cc\u662f\u56e0\u4e3a\u6211\u4e2a\u4eba\u9700\u6c42\u9009\u62e9\u4e86\u8fd9\u4e24\u95e8\u8bfe\uff0c\u5176\u4ed6\u56fd\u5916\u5927\u5b66\u7684\u7f51\u8bfe\u53ef\u4ee5\u53c2\u8003<a href=\"https:\/\/csdiy.wiki\/\">cs\u81ea\u5b66\u6307\u5357<\/a>\u81ea\u884c\u8fdb\u884c\u9009\u62e9\uff0c\u4e5f\u53ef\u4ee5\u6839\u636e<a href=\"http:\/\/catalog.mit.edu\/degree-charts\/computer-science-engineering-course-6-3\/\">mit\u7684cs\u57f9\u517b\u65b9\u6848<\/a>\u9009\u62e9\u3002<\/p>\n\n\n\n<div data-wp-interactive=\"core\/file\" class=\"wp-block-file\"><object data-wp-bind--hidden=\"!state.hasPdfPreview\" hidden class=\"wp-block-file__embed\" data=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_cs61a_textbook.pdf\" type=\"application\/pdf\" style=\"width:100%;height:600px\" aria-label=\"\u5d4c\u5165 cs61a\u6559\u6750\"><\/object><a id=\"wp-block-file--media-4a929666-34ee-4e74-a274-1231a883d939\" href=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_cs61a_textbook.pdf\">cs61a\u6559\u6750<\/a><a href=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_cs61a_textbook.pdf\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-4a929666-34ee-4e74-a274-1231a883d939\">\u4e0b\u8f7d<\/a><\/div>\n\n\n\n<p>\/\/2022.2.21\u66f4\u65b0<\/p>\n\n\n\n<p>\u6211\u9e3d\u4e86\uff0c\u6211\u5fcf\u6094\uff0c\u4e4b\u524d\u82b1\u4e86\u4e24\u5929\u914d\u4f5c\u4e1a\u73af\u5883\u8fd8\u88c5\u4e86\u53cc\u7cfb\u7edf\u6b7b\u6d3b\u8fd0\u884c\u4e0d\u8d77\u6765\u3002\u3002\u3002\u4e0b\u5b66\u671f\u4e00\u5b9a\u597d\u597d\u5b66\u4e60\u3002\u3002\u3002\u540e\u9762\u8981\u5f00\u59cb\u4e0a\u6b63\u7ecf\u7684\u6570\u636e\u5e93\u7cfb\u7edf\u4e86\uff0c\u7528\u7684\u6559\u6750\u662fDatabase System Concepts by Abraham Silberschatz\uff0c\u8ddf\u4e0a\u5b66\u671f\u6c47\u7f16\u4e00\u6837\u5728\u8fd9\u91cc\u8bb0\u5f55\u8fdb\u5ea6<\/p>\n\n\n\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u20142022.4.15\u66f4\u65b0\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n\n\n\n<p>\u5b8c\u6210\u6625\u5b66\u671f\u5927\u7a0b\u4e4b\u540e\u524d\u6765\u66f4\u65b0\u3002\u3002\u524d\u51e0\u6b21\u4f5c\u4e1a\u57fa\u672c\u4e0a\u662f\u7b80\u5355\u7684sql\u8bed\u8a00\u8fd0\u7528\uff0c\u4e0b\u8f7dMysql\u4e4b\u540e\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\uff0c\u8fd9\u91cc\u5c31\u76f4\u63a5\u628a\u6211\u7684\u524d\u51e0\u6b21\u5b9e\u9a8c\u62a5\u544a\u653e\u5728\u8fd9\u91cc\u3002\u5206\u522b\u662fLab1&nbsp;<strong>DBMS\u7684\u5b89\u88c5\u548c\u4f7f\u7528<\/strong>\uff0cLab2&nbsp;<strong>SQL\u6570\u636e\u5b9a\u4e49\u548c\u64cd\u4f5c<\/strong>\uff0cLab3&nbsp;<strong>SQL\u6570\u636e\u5b8c\u6574\u6027<\/strong>\uff0cLab4&nbsp;<strong>SQL&nbsp;\u5b89\u5168\u6027<\/strong><\/p>\n\n\n\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5728\u524d\u56db\u6b21\u4f5c\u4e1a\u4e2d\u6211\u4f7f\u7528\u7684\u90fd\u662f64\u4f4d\u7684Mysql\uff0c\u4f46\u662fLab5\u4e2d\u56e0\u4e3a\u6211\u4f7f\u7528\u7684\u662f32\u4f4d\u7684QT Creator\u4e0e\u6570\u636e\u5e93\u8fdb\u884c\u8fde\u63a5\uff0c\u6240\u4ee5\u91cd\u65b0\u4e0b\u8f7d\u4e8632\u4f4d\u7684Mysql\uff0c\u540e\u6587\u4e2d\u4f1a\u6709\u5b89\u88c5\u8bf4\u660e\uff0c\u770b\u9700\u6c42\u9009\u62e9\u76f8\u5e94\u7684\u7248\u672c\u3002<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-86ea70b3-c4ad-4e0e-ac2f-7a5b6b9a75bd\" href=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_dbLab1.docx\">dbLab1<\/a><a href=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_dbLab1.docx\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-86ea70b3-c4ad-4e0e-ac2f-7a5b6b9a75bd\">\u4e0b\u8f7d<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-66585e99-a41a-48db-b72a-c9ceaa640fe5\" href=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_dbLab2.docx\">dbLab2<\/a><a href=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_dbLab2.docx\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-66585e99-a41a-48db-b72a-c9ceaa640fe5\">\u4e0b\u8f7d<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-b56bec83-5128-4bd6-97e1-74c776a52076\" href=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_dbLab3.docx\">dbLab3<\/a><a href=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_dbLab3.docx\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-b56bec83-5128-4bd6-97e1-74c776a52076\">\u4e0b\u8f7d<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-7da21f43-6019-486f-bd66-29e3d42f46b8\" href=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_dbLab4.docx\">dbLab4<\/a><a href=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_dbLab4.docx\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-7da21f43-6019-486f-bd66-29e3d42f46b8\">\u4e0b\u8f7d<\/a><\/div>\n\n\n\n<p>Lab5\u4f5c\u4e1a\u8981\u6c42\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-23a147e0-990b-4a93-a64b-a6aaa63e2091\" href=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_book_arrangement_exp_instruction.doc\">\u5b9e\u9a8c\u4e94-\u56fe\u4e66\u7ba1\u7406\u7a0b\u5e8f\u5b9e\u9a8c\u6307\u5bfc\u4e66<\/a><a href=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_book_arrangement_exp_instruction.doc\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-23a147e0-990b-4a93-a64b-a6aaa63e2091\">\u4e0b\u8f7d<\/a><\/div>\n\n\n\n<p>\/\/\u95f2\u804a\u90e8\u5206<\/p>\n\n\n\n<p>Lab5\u770b\u8d77\u6765\u5f88\u590d\u6742\uff0c\u4f46\u5b9e\u9645\u4e0a\u5185\u6838\u662f\u5f88\u7b80\u5355\u7684\uff0c\u638c\u63e1\u4e86\u57fa\u672c\u8bed\u6cd5\u4e4b\u540e\uff0c\u5199\u5b8c\u4e00\u4e2a\u51fd\u6570\u5176\u4f59\u51fd\u6570\u5c31\u53ef\u4ee5\u590d\u5236\u7c98\u8d34\uff0c\u4fee\u6539\u4e00\u4e0b\u903b\u8f91\u5373\u53ef\u3002\u6211\u4eec\u52a9\u6559\u539f\u8bdd\u201c\u6625\u5b66\u671f\u5927\u7a0b\u4e0d\u6c34 \u4ec0\u4e48\u65f6\u5019\u6c34\u201d\u53ef\u80fd\u6bd4\u8f83\u53e3\u8bed\u5316hhh\uff0c\u4f46\u662f\u786e\u5b9e\u8bf4\u660e\u8fd9\u4e2a\u96be\u5ea6\u5f88\u4f4e\u3002\u4f5c\u4e1a\u539f\u5148\u662f\u57284.15 00:00\u622a\u6b62\uff0c\u6211\u4ece4.12\u665a\u4e0a\u5f00\u59cb\u505a\uff0c\u901a\u4e86\u4e00\u665a\u4e0a+\u4e00\u65e9\u4e0a\u5e72\u5b8c\u7a0b\u5e8f\u5199\u5b8c\u5b9e\u9a8c\u62a5\u544a\u51c6\u5907\u7f8e\u7f8e\u4e0a\u4f20\u7684\u65f6\u5019\uff0c\u7a81\u7136\u53d1\u73b0\u4f5c\u4e1a\u5ef6\u671f\u622a\u6b62\u4e86\uff0c\u987f\u65f6\u611f\u89c9\u6211\u5c31\u662f\u4e2a\u88ab\u6f14\u7206\u4e86\u7684\u5c0f\u4e11\u3002\u3002\u3002\u6709\u8fd9\u65f6\u95f4\u7761\u89c9\u4e0d\u9999\u5417\u3002\u3002\u4e0d\u8fc7\u81f3\u5c11\u81f3\u6b64\u6625\u5b66\u671f\u7684\u4efb\u52a1\u5c31\u544a\u4e00\u6bb5\u843d\u4e86\uff0c\u540e\u9762\u5373\u5c06\u5f00\u59cbMiniSQL\u7684\u7f16\u5199\u3002\u6625\u5b66\u671f\u57fa\u672c\u4e0a\u805a\u7126\u5728\u6570\u636e\u5e93\u7684\u4f7f\u7528\u4e0a\uff0c\u5230\u590f\u5b66\u671f\u5c31\u662f\u91cd\u70b9\u5728\u6570\u636e\u5e93\u7684\u5185\u6838\u4e0a\u4e86\u3002<\/p>\n\n\n\n<p>\/\/\u6b63\u5f0f\u90e8\u5206<\/p>\n\n\n\n<p>\u6211\u6240\u4f7f\u7528\u7684\u662fQT Creator5.9.0\u4f5c\u4e3a\u5f00\u53d1\u5e73\u53f0\uff0c\u8fde\u63a5\u8bfb\u53d6Mysql\u4e2d\u50a8\u5b58\u7684\u6570\u636e\u3002\u5373\u4f7f\u4e0b\u8f7d\u4e86x64\u7684QT\uff0c\u5176\u4e2d\u81ea\u5e26\u7684gcc\u7f16\u8bd1\u5668MinGW\u53ea\u670932\u4f4d\u7684\u7248\u672c\uff0c\u56e0\u6b64\u5fc5\u987b\u5b89\u88c532\u4f4d\u7684Mysql\u624d\u80fd\u4fdd\u8bc1\u4f4d\u6570\u5bf9\u5e94\u3002\u4f46\u662f\u5b98\u7f51\u4e0a\u7684Mysql\u867d\u7136\u6807\u4e86x86\u7248\u672c\uff0832\u4f4d\uff09\uff0c\u4f46\u662f\u5728\u540e\u7eed\u5b89\u88c5\u7ec4\u4ef6\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53ea\u6709x64\u7248\u672c\u53ef\u9009\uff0c\u56e0\u6b64\u4f4d\u6570\u8fd8\u662f\u4e0d\u5bf9\u5e94\u7684\u3002\u6240\u4ee5\u53e6\u5916\u627e\u5230\u4e8632\u4f4dMysql\u7684\u5b89\u88c5\u5305\u81ea\u884c\u7f16\u8bd1\u6587\u4ef6\u624d\u5b89\u88c5\u6210\u529f\u3002\u4e0b\u56fe\u4e2d\u82e5\u6ca1\u6709ODBC\u548c\u56fe\u5f62\u754c\u9762\u7684\u9700\u6c42\uff0c\u53ef\u4ee5\u53ea\u4e0b\u8f7dMySQL Server\u8fd9\u4e2a\u7ec4\u4ef6\uff0c\u6211\u4e2a\u4eba\u6bd4\u8f83\u503e\u5411\u4e8e\u4f7f\u7528\u547d\u4ee4\u884c\u800c\u4e0d\u662f\u56fe\u5f62\u754c\u9762\u8fd0\u884cMysql\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"653\" src=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_Mysql_install_components.png\" alt=\"\" class=\"wp-image-76\" srcset=\"https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_Mysql_install_components.png 865w, https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_Mysql_install_components-300x226.png 300w, https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_Mysql_install_components-768x580.png 768w\" sizes=\"auto, (max-width: 865px) 100vw, 865px\" \/><figcaption class=\"wp-element-caption\">Mysql\u5b89\u88c5\u7ec4\u4ef6\u7684\u9009\u62e9<\/figcaption><\/figure>\n\n\n\n<p>QT\u7684\u4e0b\u8f7d\u662f\u5728<a href=\"https:\/\/download.qt.io\/archive\/qt\/\">https:\/\/download.qt.io\/archive\/qt\/<\/a>\uff0c\u9009\u62e95.9.0\u7248\u672c\uff0c\u4e0b\u8f7dqt-opensource-windows-x86-5.9.0.exe\u8fd9\u4e00\u6587\u4ef6\u5373\u53ef\u3002\u8fd0\u884c\u4e4b\u540e\uff0c\u4f1a\u6709\u8bbe\u7f6e\u7ec4\u4ef6\u7684\u6b65\u9aa4\uff0c\u8fd9\u4e00\u6b65\u4e2d\u70b9\u5f00qt5.9.0\uff0c\u91cc\u9762\u53ef\u4ee5\u770b\u5230MinGW32\u8fd9\u4e2a\u7ec4\u4ef6\uff0c\u5b89\u88c5\u5373\u53ef\uff0c\u5176\u4f59\u5982MSVC\u7c7b\u7684\u7ec4\u4ef6\u7528\u4e8e\u8fde\u63a5vscode\uff0c\u4f9d\u636e\u9700\u6c42\u8fdb\u884c\u4e0b\u8f7d\u3002\u57285.12.0\u7248\u672c\u4e2d\u4f3c\u4e4e\u53ef\u4ee5\u76f4\u63a5\u4e0b\u8f7d\u5230MinGW64\uff0c\u5219\u53ef\u4ee5\u4e0d\u5fc5\u91cd\u65b0\u4e0b\u8f7d32\u4f4d\u7684Mysql\uff0c\u76f4\u63a5\u6839\u636e\u6211\u5728Lab1\u4e2d\u7684\u6b65\u9aa4\u8fdb\u884c\u5373\u53ef\u3002<\/p>\n\n\n\n<p>\u4e0b\u8f7d\u5b8c\u6210\u4e4b\u540e\uff0c\u914d\u7f6e\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\uff0c\u5728\u8bbe\u7f6e\u4e2d\u641c\u7d22path\uff0c\u5728\u641c\u7d22\u5f39\u51fa\u7684\u94fe\u63a5\u4e2d\u9009\u62e9\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\uff0c\u70b9\u51fb\u73af\u5883\u53d8\u91cf\uff0c\u5728\u7cfb\u7edf\u53d8\u91cf\u4e2d\u627e\u5230path\u53cc\u51fb\uff0c\u8fdb\u5165\u7f16\u8f91\u9875\u9762\uff0c\u65b0\u5efa\u53d8\u91cf\u540e\u628a\u5b89\u88c5\u597d\u7684QT\u7684bin\u6587\u4ef6\u8def\u5f84\u590d\u5236\u5230\u5176\u4e2d\uff0c\u5219QT\u5b89\u88c5\u5168\u90e8\u5b8c\u6210<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"953\" height=\"495\" src=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_configure_env_1.png\" alt=\"\" class=\"wp-image-77\" srcset=\"https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_configure_env_1.png 953w, https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_configure_env_1-300x156.png 300w, https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_configure_env_1-768x399.png 768w\" sizes=\"auto, (max-width: 953px) 100vw, 953px\" \/><figcaption class=\"wp-element-caption\">\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"387\" src=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_configure_env_2-1024x387.png\" alt=\"\" class=\"wp-image-78\" srcset=\"https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_configure_env_2-1024x387.png 1024w, https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_configure_env_2-300x113.png 300w, https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_configure_env_2-768x290.png 768w, https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_configure_env_2-1536x580.png 1536w, https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_configure_env_2.png 1625w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/figcaption><\/figure>\n\n\n\n<p>\u4e0b\u9762\u5b89\u88c532\u4f4dMysql<\/p>\n\n\n\n<p>\u5c06mysql-5.6.39-win32.zip\u89e3\u538b\u5230\u6307\u5b9a\u76ee\u5f55\u4e2d\uff0c\u4fee\u6539my-default.ini\u7684\u5185\u5bb9\u5982\u4e0b\uff0c\u5e76\u4fdd\u5b58<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"869\" height=\"991\" src=\"http:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_ini_file_content.png\" alt=\"\" class=\"wp-image-79\" srcset=\"https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_ini_file_content.png 869w, https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_ini_file_content-263x300.png 263w, https:\/\/cn.hidandelion.com\/wp-content\/uploads\/db_learning_ini_file_content-768x876.png 768w\" sizes=\"auto, (max-width: 869px) 100vw, 869px\" \/><figcaption class=\"wp-element-caption\">ini\u6587\u4ef6<\/figcaption><\/figure>\n\n\n\n<p>\u4fee\u6539\u4e4b\u540e\u589e\u52a0\u73af\u5883\u53d8\u91cf\u3002\u548cQT\u76f8\u540c\u6b65\u9aa4\u628aMysql\u7684bin\u6587\u4ef6\u8def\u5f84\u6dfb\u52a0\u5230path\u4e2d\u3002\u4e4b\u540e\uff0c\u5728C\u76d8\u4e2d\u627e\u5230cmd.exe,\u5e76\u4ee5\u3010\u7ba1\u7406\u5458\u6743\u9650\u3011\u6253\u5f00\u3002\u5206\u522b\u6267\u884c\u4ee5\u4e0b\u6307\u4ee4:<\/p>\n\n\n\n<p>&nbsp; &nbsp;E: \uff08Mysql\u88c5\u5728\u54ea\u4e2a\u76d8\u5c31\u54ea\u4e2a\u76d8\u52a0\u5192\u53f7\uff09<\/p>\n\n\n\n<p>&nbsp; &nbsp;cd &nbsp;mysql-5.6\\bin&nbsp;\uff08\u5373\u5728\u3010cd \u3011\u4e4b\u540e\u8f93\u5165mysql\u7684bin\u6587\u4ef6\u7684\u6240\u5728\u4f4d\u7f6e\uff09<\/p>\n\n\n\n<p>&nbsp; mysqld -initalize -user=mysql -console<\/p>\n\n\n\n<p>&nbsp; mysqld -install\uff0c\u8f93\u5165\u8be5\u6307\u4ee4\u540e\u4f1a\u6253\u5370 Service successfully installed<\/p>\n\n\n\n<p>&nbsp; net start mysql\uff0c\u8f93\u5165\u8be5\u6307\u4ee4\u540e\u4f1a\u6253\u5370MySQL\u670d\u52a1\u5df2\u7ecf\u542f\u52a8\u6210\u529f\u3002\u81f3\u6b64MYSQL5.6\u5df2\u7ecf\u5b89\u88c5\u6210\u529f\uff0c\u5e76\u4e14\u5df2\u8fd0\u884c\u3002<\/p>\n\n\n\n<p>\u540e\u9762\u8fdb\u884cMysql\u7684\u7528\u6237\u5bc6\u7801\u8bbe\u7f6e&nbsp;windows+R\uff0c\u8f93\u5165cmd\u4e4b\u540e\u56de\u8f66\uff0c\u6253\u5f00cmd.exe\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u3010mysql -u root -p\u3011\u56de\u8f66\u540e\u4f1a\u51fa\u73b0 \u3010Enter password: \u3011&nbsp;,\u7b2c\u4e00\u6b21\u767b\u9646\u76f4\u63a5\u56de\u8f66\uff0c\u8fdb\u5165mysql\u8f6f\u4ef6\u3002\u5728mysql&gt;\u540e\u8f93\u5165 \u3010set password for&nbsp;root@localhost=password(\u2018123456\u2019);\u3011\uff0c\u5219\u7528\u6237root\u7684\u5bc6\u7801\u88ab\u8bbe\u7f6e\u4e3a123456\u3002\u8f93\u5165\u3010exit\u3011\u53ef\u4ee5\u9000\u51fa\u6570\u636e\u5e93<\/p>\n\n\n\n<p>\u4e4b\u540e\u91cd\u65b0\u767b\u9646\uff0c\u5728Enter password: \u4e4b\u540e\u8f93\u5165\u5bc6\u7801\u5c31\u53ef\u4ee5\u767b\u5f55\u8fdb\u5165\u6570\u636e\u5e93\u3002\u968f\u540e\u7684\u64cd\u4f5c\u6839\u636e\u6211\u7684Lab1\u7684\u6d4b\u8bd5\u6b65\u9aa4\u53ef\u4ee5\u5bf9\u6570\u636e\u5e93\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u20142022.9.29\u66f4\u65b0\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n\n\n\n<p>\u6ca1\u60f3\u5230\u62d6\u4e86\u8fd9\u4e48\u4e45\u3002\u3002\u56e0\u4e3a\u671f\u4e2d\u4e4b\u540eminisql\u5b9e\u5728\u662f\u975e\u5e38\u75db\u82e6\uff0c\u5e76\u4e14\u8003\u8bd5\u5468\u4e4b\u540e\u4e24\u95e8\u590d\u6742\u7684\u77ed\u5b66\u671f\u4e5f\u975e\u5e38\u5fd9\uff0c\u76f4\u5230\u4e03\u6708\u5e95\u624d\u6b63\u5f0f\u653e\u6691\u5047\uff0c\u5c31\u4e00\u76f4\u6401\u7f6e\u4e86\u3002\u6691\u5047\u867d\u7136\u7a7a\u4e86\u4e9b\uff0c\u4f46\u6ca1\u60f3\u5230\u5c45\u7136\u6c89\u8ff7\u6e38\u620f\u4e86\u6839\u672c\u6ca1\u5b66\u4e60XD\u3002\u3002\u73b0\u5728\u75db\u5b9a\u601d\u75db\u4e86\u4e5f\u6b63\u597d\u6bd4\u8f83\u7a7a\uff0c\u5c31\u8d76\u7d27\u628a\u8fd9\u91cc\u8865\u4e0a\u3002<\/p>\n\n\n\n<p>\u5c0632\u4f4dMysql\u548cQT creater\u914d\u7f6e\u5b8c\u6bd5\u4e4b\u540e\uff0c\u65b0\u5efaproject\uff0c\u5e76\u4e14\u5728main\u6216\u8005mainwindow\u6587\u4ef6\u4e2d\u8f93\u5165\u5982\u4e0b\u4ee3\u7801\u8fdb\u884c\u6d4b\u8bd5\u67e5\u770b\u8fde\u63a5\u662f\u5426\u6210\u529f\u3002\uff08\u6211\u5728\u5199lab5\u7684\u65f6\u5019\u4e3b\u8981\u4ee3\u7801\u5747\u5728mainwindow.cpp\u4e2d\uff0cmain.cpp\u5185\u53ea\u6709\u521b\u5efaproj\u65f6\u9ed8\u8ba4\u751f\u6210\u7684\u4ee3\u7801\uff09\u8fd9\u91cc\u5305\u542b\u6240\u6709\u751a\u81f3\u591a\u4f59\u7684\u6211\u6240\u4f7f\u7528\u5230\u7684\u5e93\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include \"MainWindow.h\"\n#include \"ui_MainWindow.h\"\n#include &lt;QSqlQuery&gt;\n#include &lt;QSqlRecord&gt;\n#include &lt;QSqlError&gt;\n#include &lt;QDebug&gt;\n#include &lt;QApplication&gt;\n#include &lt;QMessageBox&gt;\n#include &lt;QtSql&gt;\n#include &lt;QFile&gt;\n\nMainWindow::MainWindow(QWidget *parent) :\n    QMainWindow(parent),\n    ui(new Ui::MainWindow)\n{\n    ui-&gt;setupUi(this);\n    connect_mysql();\n}\n\nMainWindow::~MainWindow()\n{\n    delete ui;\n}\n\n\n\/\/\u8fde\u63a5\u6570\u636e\u5e93\nvoid MainWindow::connect_mysql()\n{\n    QSqlDatabase db=QSqlDatabase::addDatabase(\"QMYSQL\");\n        db.setHostName(\"127.0.0.1\");      \/\/\u8fde\u63a5\u6570\u636e\u5e93\u4e3b\u673a\u540d\uff0c\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\uff08\u82e5\u586b\u7684\u4e3a\u201d127.0.0.1\u201c\uff0c\u51fa\u73b0\u4e0d\u80fd\u8fde\u63a5\uff0c\u5219\u6539\u4e3alocalhost)\n        db.setPort(3306);                 \/\/\u8fde\u63a5\u6570\u636e\u5e93\u7aef\u53e3\u53f7\n        db.setDatabaseName(\"library\");      \/\/\u8fde\u63a5\u6570\u636e\u5e93\u540d\n        db.setUserName(\"root\");          \/\/\u4f60\u4f7f\u7528\u7684mysql\u4e2d\u7684\u6570\u636e\u5e93\u7528\u6237\u540d\n        db.setPassword(\"12345678\");    \/\/\u4f60\u4f7f\u7528\u7684mysql\u4e2d\u7684\u6570\u636e\u5e93\u5bc6\u7801\n        db.open();\n        if(!db.open())\n        {\n            qDebug()&lt;&lt;\"\u4e0d\u80fd\u8fde\u63a5\"&lt;&lt;\"connect to mysql error\"&lt;&lt;db.lastError().text();\n         \/\/\u4f7f\u7528\u547d\u4ee4\u884c\u8f93\u51fa\u62a5\u9519\u4fe1\u606f\n            return ;\n        }\n        else\n        {\n             qDebug()&lt;&lt;\"\u8fde\u63a5\u6210\u529f\"&lt;&lt;\"connect to mysql OK\";\n        }\n}<\/code><\/pre>\n\n\n\n<p>\u8fde\u63a5\u6210\u529f\u540e\u5373\u53ef\u5f00\u59cb\u7f16\u5199\u4ee3\u7801\u3002qt\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u7ed8\u5236ui\uff0c\u5373\u9009\u4e2d\u9879\u76ee\u4e2dForms\u6587\u4ef6\u5939\uff0c\u6709\u4e00\u4e2amainwindow.ui\u6587\u4ef6\uff0c\u53cc\u51fb\u540e\u5373\u53ef\u6253\u5f00\u8bbe\u8ba1\u754c\u9762\uff0c\u53ef\u4ee5\u62d6\u52a8\u7ec4\u4ef6\u8fdb\u884c\u7f16\u8f91\uff0c\u4f7f\u7528\u65b9\u6cd5\u7c7b\u4f3c\u4e8eVB\uff0c\u5373\u5229\u7528\u7ec4\u4ef6\u540d\u79f0\u6765\u8c03\u7528\u5176\u4e2d\u7684\u5185\u5bb9\uff08eg.\u6587\u672c\u6846\u4e2d\u7684\u8f93\u5165\uff0c\u6309\u94ae\u7684\u72b6\u6001\uff09\uff0c\u5728mainwindow.cpp\u4e2d\u5229\u7528\u51fd\u6570\u8868\u793a\u5bf9\u5e94\u72b6\u6001\u7684\u89e6\u53d1\uff08\u5982\u6309\u94ae\u88ab\u6309\u4e0b\u5373\u6267\u884c\u8be5\u51fd\u6570\u4e2d\u7684\u4ee3\u7801\uff09\u867d\u7136\u8fd9\u91cc\u4f7f\u7528\u7684\u662fC++\uff0c\u4f46\u662f\u7f16\u5199\u8fc7\u7a0b\u4e2d\u57fa\u672c\u6ca1\u6709C++\u7279\u6709\u7684\u4e00\u4e9b\u5199\u6cd5\uff0c\u53ea\u6709C\u8bed\u8a00\u57fa\u7840\u4e5f\u53ef\u4ee5\u5f88\u5feb\u5199\u5b8c\u3002<\/p>\n\n\n\n<p><em>\u6211\u6240\u7ed8\u5236\u7684\u754c\u9762\uff0c\u5728\u53f3\u4e0a\u65b9\u7684\u6846\u5185\u53ef\u4ee5\u6539\u53d8\u5176\u5c5e\u6027\uff08\u8fd9\u91cc\u539f\u6765\u6709\u4e00\u5f20\u56fe\u7247\uff0c\u4f46\u5b83\u6682\u65f6\u5df2\u4e22\u5931\uff09<\/em><\/p>\n\n\n\n<p>\u8fd9\u91cc\u9009\u4e2d\u4e86\u6587\u672c\u6846addbno\uff0c\u914d\u5408\u5176\u4ed6\u6587\u672c\u6846\u548caddbookButton\u6309\u94ae\u53ef\u4ee5\u5b9e\u73b0\u5f80\u6570\u636e\u5e93\u4e2d\u6dfb\u52a0\u4e66\u7c4d\u4fe1\u606f\u3002\u540e\u6587\u4ee5\u8be5\u51fd\u6570\u4e3a\u4f8b\u3002\u51fd\u6570\u529f\u80fd\uff1a\u5f53\u56fe\u4e66\u9986\u4e2d\u5df2\u7ecf\u5b58\u5728\u8981\u6dfb\u52a0\u7684\u4e66\u53f7\u65f6\uff0c\u5728\u539f\u6709\u5e93\u5b58\u6570\u91cf\u4e0a\u589e\u52a0\u5bf9\u5e94\u6570\u91cf\uff1b\u82e5\u4e0d\u5b58\u5728\uff0c\u5219\u5c06\u4e66\u7c4d\u4fe1\u606f\u6dfb\u52a0\u5230\u6570\u636e\u5e93\u4e2d\u3002\u5148\u5728\u5934\u6587\u4ef6mainwindow.h\u4e2d\u58f0\u660e\u51fd\u6570\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>void on_addbookButton_clicked();<\/code><\/pre>\n\n\n\n<p><em>\u5934\u6587\u4ef6\u5185\u5bb9\uff08\u8fd9\u91cc\u539f\u6765\u6709\u4e00\u5f20\u56fe\u7247\uff0c\u4f46\u5b83\u6682\u65f6\u5df2\u4e22\u5931\uff09<\/em><\/p>\n\n\n\n<p>\u5728mainwindow.cpp\u4e2d\u7f16\u8f91\u51fd\u6570\u5982\u4e0b\uff0c\u5bf9\u5e94\u547d\u4ee4\u7684\u4f5c\u7528\u4ee5\u6ce8\u91ca\u5f62\u5f0f\u6dfb\u52a0\u5728\u4ee3\u7801\u5185<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>void MainWindow::on_addbookButton_clicked()\n{\n     QSqlQuery query;\n     QString bno       = ui-&gt;addbno-&gt;text();\n     QString category  = ui-&gt;addcategory-&gt;text();\n     QString title     = ui-&gt;addtitle-&gt;text();\n     QString press     = ui-&gt;addpress-&gt;text();\n     QString year      = ui-&gt;addyear-&gt;text();\n     QString author    = ui-&gt;addauthor-&gt;text();\n     const double price= ui-&gt;addprice-&gt;text().toDouble();\n     const int total   = ui-&gt;addtotal-&gt;text().toInt();\n     const int stock   = ui-&gt;addstock-&gt;text().toInt();\n\n\/\/\u8bfb\u53d6\u5bf9\u5e94\u6587\u672c\u6846\u4e2d\u8f93\u5165\u7684\u4fe1\u606f\uff0c\u5e76\u50a8\u5b58\u5728\u5bf9\u5e94\u5b57\u7b26\u4e32\u4e2d\n\/\/text().toInt()\u7c7b\u4f3c\u5f3a\u5236\u7c7b\u578b\u8f6c\u6362\uff0c\u82e5\u4e0d\u5982\u6b64\u5728\u4e00\u4e9b\u64cd\u4f5c\u4e2d\u4f1a\u51fa\u9519\n\n\n     if(bno==NULL or category==NULL or title==NULL or press==NULL or year==NULL or author==NULL or price==NULL or total==NULL or stock==NULL\n             or total&lt;0 or stock&lt;0 or price&lt;0)\n     {\n         QMessageBox::information(this,\"\u8b66\u544a\",\"\u8bf7\u5b8c\u6574\u8f93\u5165\u5408\u6cd5\u5185\u5bb9\uff01\");\n     }\n\n\n\/\/\u5408\u6cd5\u6027\u5224\u65ad\n\n     else{\n         QString str=QString(\"select *from book where bno = '%1'\").arg(bno);\n\n\/\/\u5229\u7528sql\u8bed\u53e5\u5728\u6570\u636e\u5e93\u4e2d\u67e5\u8be2\uff0c\u5148\u5c06\u53d8\u91cfbno\u7684\u5185\u5bb9\u6dfb\u52a0\u5230sql\u8bed\u53e5\u4e2d\u5e76\u4fdd\u5b58\u5230\u5b57\u7b26\u4e32str\n         QSqlQuery query;\n         query.exec(str);\n\/\/\u6267\u884csql\u8bed\u53e5\uff0c\u8fd4\u56de\u7684\u8868\u683c\u4fe1\u606f\u4f1a\u50a8\u5b58\u5728query\u4e2d\n         if(query.first())\n         {\n             QString cmd = QString(\"update book set price='%1',total=total+'%2',stock=stock+'%3' where bno = '%4'\")\n                     .arg(price).arg(total).arg(stock).arg(bno);\n             query.exec(cmd);\n\n             qDebug()&lt;&lt;\"\u6dfb\u52a0\u6210\u529f\";\n\n\/\/\u547d\u4ee4\u884c\u8fd4\u56de\u6267\u884c\u7ed3\u679c\n         }\n         else {\n             QString cmd = QString(\"insert into book values('%1','%2','%3','%4','%5','%6','%7','%8','%9');\")\n                     .arg(bno).arg(category).arg(title).arg(press).arg(year).arg(author).arg(price).arg(total).arg(stock);\n             if(!query.exec(cmd))\n             {\n                 qDebug() &lt;&lt; \"Error to Insert Into Database \" &lt;&lt; myDatabase.lastError();\n\n                 return;\n             }\n             else qDebug()&lt;&lt;\"\u6dfb\u52a0\u6210\u529f\";\n        }\n     }\n         ui-&gt;addbno-&gt;clear();\n         ui-&gt;addcategory-&gt;clear();\n         ui-&gt;addtitle-&gt;clear();\n         ui-&gt;addpress-&gt;clear();\n         ui-&gt;addyear-&gt;clear();\n         ui-&gt;addauthor-&gt;clear();\n         ui-&gt;addprice-&gt;clear();\n         ui-&gt;addtotal-&gt;clear();\n         ui-&gt;addstock-&gt;clear();\n\n\/\/\u6e05\u7a7a\u5bf9\u5e94\u6587\u672c\u6846\n}<\/code><\/pre>\n\n\n\n<p>\u5728\u719f\u6089\u8fd9\u91cc\u7684\u5199\u6cd5\u4e4b\u540e\u5176\u5b9e\u540e\u7eed\u7684\u5927\u591a\u6570\u529f\u80fd\u90fd\u975e\u5e38\u7b80\u5355\u4e86\uff0c\u5229\u7528TableView\u7ec4\u4ef6\u548c\u4e0b\u5217\u4ee3\u7801\u53ef\u4ee5\u8f7b\u677e\u7684\u505a\u5230\u6570\u636e\u53ef\u89c6\u5316\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>void MainWindow::on_viewbook_clicked()\n{\n        QSqlQuery query;\n        QString str1=QString(\"select * from book\");\n        query.exec(str1);\n        QSqlQueryModel *model=new QSqlQueryModel;\n\n        model-&gt;setQuery(str1);\n\n        ui-&gt;resultView-&gt;setModel(model);\n        ui-&gt;resultView-&gt;show();\n        qDebug()&lt;&lt;\"\u67e5\u627e\u5b8c\u6210\";\n}\n<\/code><\/pre>\n\n\n\n<p>\u552f\u4e00\u6709\u70b9\u95ee\u9898\u7684\u662fbulkadding\u5373\u6279\u91cf\u5bfc\u5165\uff0c\u53ef\u4ee5\u5728\u89c4\u5b9a\u8f93\u5165\u683c\u5f0f\u540e\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6216\u8005line.split(\u201c,\u201d)\u3010\u5176\u4e2d\u5f15\u53f7\u5185\u662f\u4f60\u6240\u89c4\u5b9a\u7684\u5206\u9694\u7b26\u3011\uff0c\u5373\u53ef\u5c06\u8f93\u5165\u7684\u4fe1\u606f\u4ee5list\u7684\u683c\u5f0f\u4fdd\u5b58\u8d77\u6765\u3002\u6211\u5c06bulkadding\u7684\u5185\u5bb9\u4fdd\u5b58\u5728\u4e00\u4e2atxt\u6587\u4ef6\u4e2d\uff0c\u7528file.open\u6253\u5f00\u3001QTextStream\u8bfb\u53d6\u4fe1\u606f\u4e4b\u540e\uff0c\u518d\u5229\u7528split\u5206\u5272\u6210\u8868\u683c\u4fe1\u606f\uff0c\u5206\u522b\u8fdb\u884c\u8bfb\u53d6\u3002\u53c2\u8003\u4ee3\u7801\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    bool exist = QFile::exists(\"E:\/qtcode\/test06\/add.txt\");\n    if (!exist) {QMessageBox::information(this,\"\u8b66\u544a\",\"\u6587\u4ef6\u4e0d\u5b58\u5728\");}\n    else{\n        QFile file(\"E:\/qtcode\/test06\/add.txt\");\n        file.open(QIODevice::ReadOnly);\n        QTextStream in(&amp;file);\n        while(!in.atEnd())\n        {\n            QString line = in.readLine();\n            line.remove(\"\\r\\n\");\n            QStringList list=line.split(\",\");\n\n            QString bno       = list.at(0);\n            QString category  = list.at(1);\n            QString title     = list.at(2);\n            QString press     = list.at(3);\n            QString year      = list.at(4);\n            QString author    = list.at(5);\n            QString price     = list.at(6);\n            QString total     = list.at(7);\n            QString stock     = list.at(8);\n            QString str=QString(\"select *from book where bno = '%1'\").arg(bno);\n            QSqlQuery query;\n            query.exec(str);\n}<\/code><\/pre>\n\n\n\n<p>\u5c06\u4fe1\u606f\u5206\u522b\u5b58\u5165\u5bf9\u5e94\u53d8\u91cf\u540e\uff0c\u540e\u7eed\u64cd\u4f5c\u4e0e\u5176\u4ed6\u51fd\u6570\u57fa\u672c\u4e00\u81f4\u3002\u6700\u540e\u8fd0\u884c\u5373\u53ef\u5f97\u5230\u5bf9\u5e94\u7684exe\u6587\u4ef6\u3002\u8fd9\u91cc\u53ef\u4ee5\u770b\u770b\u6211\u5f53\u65f6\u7684\u5b9e\u9a8c\u62a5\u544a\uff08\u52a9\u6559\u751a\u81f3\u6ca1\u6709\u8981\u6c42\u4e0a\u4f20\u6e90\u4ee3\u7801\uff0c\u9a8c\u6536\u4e5f\u5e76\u4e0d\u662f\u5fc5\u987b\u8fdb\u884c\u7684\u6b65\u9aa4\u800c\u662f\u4e00\u4e2a\u52a0\u5206\u9879\u2026\u6240\u4ee5\u8bf4\u771f\u7684\u5f88\u6c34\uff09\u5e76\u4e14\u6211\u5f53\u65f6\u662f\u6709\u4e00\u4e2abug\u65e0\u6cd5\u89e3\u51b3\u7684\uff0c\u5373\u5f53\u67d0\u4e66\u88ab\u5168\u90e8\u501f\u51fa\u540e\uff0c\u82e5\u8fd8\u6709\u540c\u5b66\u5e0c\u671b\u501f\u8fd9\u672c\u4e66\u9700\u8981\u8fd4\u56de\u6700\u8fd1\u9884\u5b9a\u5f52\u8fd8\u7684\u65f6\u95f4\uff0c\u8fd9\u4e2a\u6d89\u53ca\u5230\u5f52\u8fd8\u65e5\u671f\u7684\u6bd4\u8f83\uff0c\u53c8\u8981\u8003\u8651\u65e5\u671f\u662f\u5426\u5408\u6cd5\u6709\u70b9\u590d\u6742\uff0c\u6211\u5c31\u4f2a\u9020\u4e86\u4e00\u4e2a\u6c35\u8fc7\u53bb\u4e86\u3002\u3002<\/p>\n\n\n\n<p><em>Lab5\u5b9e\u9a8c\u62a5\u544a\uff08\u8fd9\u91cc\u539f\u6765\u6709\u4e00\u4e2a\u6587\u4ef6\uff0c\u4f46\u5b83\u6682\u65f6\u5df2\u4e22\u5931\uff09<\/em><\/p>\n\n\n\n<p>\u3010\u5173\u4e8eminisql\u7684\u788e\u788e\u5ff5\u3011\u6570\u636e\u5e93\u7cfb\u7edf\u7684\u91cd\u5934\u5c31\u662fminisql\u3002\u56e0\u4e3a\u6709\u4e00\u4f4d\u524d\u8f88\uff08cc98@\u5c0f\u89d2\u9f99 \uff09\u5bf9\u4e8e\u8ba1\u9662\u672c\u79d1\u751f\u7684\u8bfe\u7a0b\u8bbe\u8ba1\u63d0\u51fa\u4e86\u8bb8\u591a\u610f\u89c1\uff0c\u5e76\u4e14\u53c2\u4e0e\u4e86\u8ba1\u7b97\u673a\u5b66\u9662\u8bfe\u6539\u7684\u5ea7\u8c08\u4f1a\uff0c\u6211\u4eec\u8fd9\u4e00\u5c4a\u4f7f\u7528\u4e86\u6700\u65b0\u7684\u5b9e\u9a8c\u6846\u67b6\u3002\u4e8b\u5b9e\u4e0a\u5ea7\u8c08\u4f1a\u572821\u5e74\u5e95\u624d\u8fdb\u884c\uff0c\u9488\u5bf9\u4e8e\u6570\u636e\u5e93\u7cfb\u7edf\u8fd9\u95e8\u8bfe\u7684\u6539\u8fdb\u53ef\u4ee5\u8bf4\u662f\u975e\u5e38\u5306\u5fd9\u7684\uff0c\u6211\u975e\u5e38\u5e78\u8fd0\u7684\u9009\u4e0a\u4e86\u4e3b\u6301\u8fd9\u6b21\u6539\u8fdb\u7684\u8001\u5e08\uff08\u5e76\u4e14\u4ed6\u65e0\u8bba\u4ece\u5b66\u672f\u6c34\u5e73\u3001\u6559\u80b2\u70ed\u60c5\u3001\u6559\u5b66\u6c34\u5e73\u3001lab\u8d28\u91cf\u4e0a\u90fd\u53ef\u4ee5\u662f\u65e0\u53ef\u6307\u6458\u7684\u4f18\u79c0\uff0c\u8bfe\u7a0b\u6c34\u5e73\u7edd\u5bf9\u7b97\u662f\u8ba1\u9662\u7b2c\u4e00\u7b49\u7684\u8001\u5e08\u4e86\uff09\uff0c\u6574\u4f53\u6846\u67b6\u7684\u4ee3\u7801\u9b54\u6539\u81eacmu15-445\uff0c\u662f\u6211\u4eec\u73ed\u7684\u52a9\u6559gg\u4eca\u5e74\u521a\u7814\u4e00\u7684\u5927\u4f6c\u7eaf\u624b\u64b8\u51fa\u6765\u7684\uff0c\u548c\u539f\u7248\u6846\u67b6\u4e3b\u8981\u5728BusTube\u4e0a\u533a\u522b\u8f83\u5927\uff0c\u5404\u5904\u4e5f\u6709\u4e0d\u5c0f\u7684\u6539\u5199\uff0c\u56e0\u6b64\u662f\u6ca1\u6cd5\u6284\u88adgithub\u4e0a\u73b0\u6709\u7684\u9879\u76ee\u4ee3\u7801\u7684\u3002\u6211\u4eec\u7ec4\u57fa\u672c\u4e0a\u4e5f\u662f\u7eaf\u809d\u51fa\u6765\u7684orz\u3002\u56e0\u4e3a\u662f\u7b2c\u4e00\u5e74\u65f6\u95f4\u4e0d\u591f\uff08\u5982\u679c\u6211\u6ca1\u8bb0\u9519\u7684\u8bddlab5\u9a8c\u6536\u90a3\u5929\u52a9\u6559gg\u8fd8\u5728\u6539\u6846\u67b6\uff09\u56e0\u6b64\u4e8b\u52a1transaction\u76f8\u5173\u90e8\u5206\u90fd\u6ca1\u6709\u8981\u6c42\uff08\u4e0b\u4e00\u5c4a\u5c31\u4f1a\u6709\u8fd9\u65b9\u9762\u8981\u6c42\u4e86\uff0c\u56e0\u6b64\u5c31\u8fd9\u6765\u8bf4\u8981\u6c42\u662f\u53d8\u9ad8\u7684\uff0c\u4e0d\u8fc7\u4ed6\u4eec\u7684\u6307\u5bfc\u6587\u6863\u4e4b\u7c7b\u7684\u4e5f\u4f1a\u66f4\u52a0\u5b8c\u5584\uff0c\u6211\u4eec\u8fd9\u5c4a\u751a\u81f3\u8fd8\u8981\u5e2e\u52a9\u6559gg\u627ebug\u5199test\uff09\uff0c\u540c\u65f6test\u90e8\u5206\u4e5f\u90fd\u53ea\u6709\u6bd4\u8f83\u57fa\u7840\u7684\u90e8\u5206\uff0c\u6ca1\u529e\u6cd5\u6db5\u76d6\u5404\u79cd\u60c5\u51b5\uff0c\u5f88\u591atest\u9700\u8981\u81ea\u5df1\u53bb\u5199\u3002\u751a\u81f3\u6709\u53ef\u80fdtest\u5168\u8fc7\u4f46\u662f\u6700\u7ec8\u5408\u8d77\u6765\u524d\u9762\u7a81\u7136\u5192\u51fa\u6765\u4e00\u5927\u5806bug\u3002\u3002\u5f53\u65f6\u6539\u5f97\u786e\u5b9e\u975e\u5e38\u75db\u82e6\u3002\u3002\u4e0d\u8fc7\u6709\u4e00\u8bf4\u4e00\u8fd9\u5927\u6982\u771f\u7684\u662f\u4e00\u4e2a\u975e\u5e38\u953b\u70bc\u4eba\u6c34\u5e73\u7684\u9879\u76ee\uff0c\u5305\u62ec\u524d\u7aef\u548c\u540e\u7aef\u548c\u5404\u90e8\u5206\u4e4b\u95f4\u7684\u63a5\u53e3\u8bbe\u8ba1\u548c\u6211\u4eec\u4ee5\u524d\u5199\u8fc7\u7684\u96f6\u788e\u7684lab\u5b8c\u5168\u4e0d\u662f\u4e00\u4e2a\u89c4\u6a21\u7684\uff0c\u6574\u4f53\u8bbe\u8ba1\u4e5f\u975e\u5e38\u6709\u610f\u601d\uff0c\u5982\u679c\u6709\u65f6\u95f4\u7684\u8bdd\u6211\u63a8\u8350\u6240\u6709\u4eba\u90fd\u53ef\u4ee5\u8bd5\u4e00\u8bd5\u5199\u4e00\u4e0b\u8fd9\u4e2a\u6298\u78e8\u4eba\u7684\u73a9\u610f\uff08\uff09<\/p>\n\n\n\n<p>\u7531\u4e8e\u6211\u662f\u5916\u4e13\u4e1a\u6ca1\u4ec0\u4e48\u8ba4\u8bc6\u7684\u4eba\uff0c\u56e0\u6b64\u5728\u5206\u5c0f\u7ec4\u7684\u65f6\u5019\u6211\u662f\u6446\u70c2\u8ba9\u52a9\u6559gg\u968f\u673a\u5206\u914d\u7684\uff0c\u6700\u540e\u5206\u5230\u4e86\u4e00\u4e2a19\u7ea7\u5927\u4f6c\u548c\u4e00\u4e2a\u611f\u89c9\u662f\u6c34\u5e73\u6709\u9650\u88ab\u8feb\u54b8\u9c7c\u7684\u56fe\u7075\u73ed\u8001\u54e5\uff0c\u56fe\u7075\u8001\u54e5\u71ac\u4e86\u4e24\u4e2a\u665a\u4e0a\u5199\u4e86\u5927\u534a\u7684index\u8fd8\u662f\u6709\u51e0\u4e2a\u6d4b\u8bd5\u8fc7\u4e0d\u4e86\u5c31\u5f00\u59cb\u6446\u70c2\u4e86\uff0c\u5b8c\u5168\u6ca1\u6709\u53c2\u4e0e\u6700\u540e\u7684debug\u6a21\u5757\uff0c\u6211\u5c5e\u4e8e\u4e2d\u89c4\u4e2d\u77e9\u7684\u6539\u5b8c\u4e86\u6211\u8d1f\u8d23\u7684\u90e8\u5206\uff0c\u5176\u4f59\u6240\u6709\u90e8\u5206\u5305\u62ec\u4e00\u4e2a\u9488\u5bf9buffer_pool\u4f18\u5316\u7684bonus\u548c\u56fe\u7075\u8001\u54e5\u7684\u70c2\u644a\u5b50\u5168\u90e8\u662f19\u7ea7\u8001\u54e5\u6539\u5b8c\u7684\uff0c\u771f\u7684\u611f\u6069orz<\/p>\n\n\n\n<p>\u672c\u9879\u76ee\u662f\u5229\u7528WSL\u5728linux\u73af\u5883\u4e0b\u7f16\u8bd1\uff0c\u8bed\u8a00\u662fC++\uff0c\u6211\u6240\u4f7f\u7528\u7684\u8f6f\u4ef6\u662fclion\uff0cdebug\/test\u90fd\u86ee\u65b9\u4fbf\u7684\uff0c\u4e2a\u4eba\u611f\u89c9\u6bd4vscode\u662f\u66f4\u8212\u670d\u4e00\u4e9b\u7684\u3002\u52a9\u6559\u5728\u5b9e\u9a8c\u6307\u5bfc\u6587\u6863\u4e2d\u6709\u975e\u5e38\u8be6\u5c3d\u7684\u73af\u5883\u914d\u7f6e\u6559\u7a0b\uff0c\u8ddf\u7740\u505a\u5c31\u53ef\u4ee5\u3002\u6211\u4e3b\u8981\u8d1f\u8d23\u7684\u662fexecutor\u90e8\u5206\u6240\u4ee5\u6ca1\u6709\u529e\u6cd5\u6d89\u53ca\u5f88\u7ec6\u81f4\u7684index<\/p>\n\n\n\n<p><em>\u5b9e\u9a8c\u6307\u5bfc\u6587\u6863\uff08\u8fd9\u91cc\u539f\u6765\u662f\u4e00\u4e2a\u94fe\u63a5\uff0c\u4f46\u5b83\u6682\u65f6\u5df2\u5931\u6548\uff09<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6570\u636e\u5e93\u7cfb\u7edf\u5b66\u4e60\u8bb0\u5f55<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,1],"tags":[],"class_list":["post-11","post","type-post","status-publish","format-standard","hentry","category-academy","category-blog"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/cn.hidandelion.com\/index.php?rest_route=\/wp\/v2\/posts\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.hidandelion.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.hidandelion.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.hidandelion.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.hidandelion.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11"}],"version-history":[{"count":9,"href":"https:\/\/cn.hidandelion.com\/index.php?rest_route=\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":80,"href":"https:\/\/cn.hidandelion.com\/index.php?rest_route=\/wp\/v2\/posts\/11\/revisions\/80"}],"wp:attachment":[{"href":"https:\/\/cn.hidandelion.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.hidandelion.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.hidandelion.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}