{"id":290,"date":"2011-03-28T14:30:07","date_gmt":"2011-03-28T06:30:07","guid":{"rendered":"http:\/\/www.myvoipapp.com\/blogs\/yxh\/?p=290"},"modified":"2019-02-12T20:11:55","modified_gmt":"2019-02-12T12:11:55","slug":"mysql%e4%b8%8e%e5%b9%bb%e8%b1%a1%e8%af%bb","status":"publish","type":"post","link":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/2011\/03\/28\/mysql%e4%b8%8e%e5%b9%bb%e8%b1%a1%e8%af%bb\/","title":{"rendered":"MySQL\u4e0e\u5e7b\u8c61\u8bfb"},"content":{"rendered":"<p>\u6700\u8fd1\u5728\u90e8\u7f72\u7cfb\u7edf\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53d1\u73b0MySQL\u7684\u4e00\u70b9\u95ee\u9898\uff0c\u8fdb\u884c\u7b80\u5355\u603b\u7ed3\u3002<\/p>\n<p>\u5b9e\u9645\u4e0a\u5c31\u662f\u5173\u4e8e\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\u4ee5\u53ca\u5e7b\u8c61\u8bfb\u7684\u95ee\u9898\u3002<\/p>\n<p>\u6211\u4eec\u7684\u7a0b\u5e8f\u5206\u6210\u4e24\u4e2a\u90e8\u5206:UI\u5c42\u4ee5\u53caService\u5904\u7406\u5c42\u3002UI\u5c42\u4f7f\u7528MySQL\u7684C\u5e93\u63a5\u53e3\u521b\u5efa\u8fde\u63a5\uff1bService\u5c42\u91c7\u7528Python\u7684MySQLdb\u60a8\uff08\u5e95\u5c42\u4ecd\u7136\u662fMySQL\u7684C\u63a5\u53e3\uff09\u521b\u5efa\u8fde\u63a5\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u5b9e\u9645\u4e0a\u4f1a\u4e0eMySQL\u521b\u5efa\u4e24\u4e2a\u8fde\u63a5\u3002<\/p>\n<p>\u5728windows\u73af\u5883\u4e2d\uff0c\u5982\u679c\u6211\u4eec\u901a\u8fc7UI\u4fee\u6539\u4e86MySQL\u7684\u6570\u636e\uff0c\u6211\u4eec\u53d1\u73b0\u5728service\u5c42\u67e5\u8be2\u65f6\uff0c\u8fd8\u662f\u4ee5\u524d\u7684\u6570\u636e\uff0c\u800c\u4e0d\u662fcommit\u4e4b\u540e\u7684\u6570\u636e\u3002<\/p>\n<p>\u91c7\u7528Ubuntu\u7cfb\u7edf\u4e0b\u7684MySQL\u65f6\uff0c\u6ca1\u6709\u8fd9\u4e2a\u95ee\u9898\u3002UI\u4fee\u6539\u4e86MySQL\u6570\u636e\u540e\uff0cService\u80fd\u7acb\u523b\u67e5\u8be2\u5230\u6700\u65b0\u7684\u7ed3\u679c\u3002<\/p>\n<p>\u6211\u4eec\u53d1\u73b0\uff0cUbuntu\u4e0b\u7684MySQL(5.1.49-1ubuntu8.1 (Ubuntu))\u7248\u672c\u8f83\u65e7\uff0c\u91c7\u7528MyISAM\u5f15\u64ce\u3002\u800cWindows\u73af\u5883\u4e0b\u7684MySQL(5.1.53-community MySQL Community Server (GPL))\u8f83\u65b0\uff0c\u91c7\u7528InnoDB\u5f15\u64ce\u3002\u5c06Windows\u73af\u5883\u4e0b\u7684MySQL\u5f3a\u5236\u6307\u5b9a\u4e3aMyISAM\u65f6\uff0c\u95ee\u9898\u4e5f\u80fd\u89e3\u51b3\uff0c\u4e0d\u518d\u51fa\u73b0\u5e7b\u8c61\u8bfb\u3002<\/p>\n<p>\u4f7f\u7528\u4e0b\u8ff0\u547d\u4ee4\u67e5\u8be2\u4e86Ubuntu\u548cWindows\u7684\u914d\u7f6e\uff0c\u90fd\u662fREPEATABLE-READ\uff1a<\/p>\n<p>SELECT @@tx_isolation;<\/p>\n<p>SELECT @@global.tx_isolation;<\/p>\n<p>\u5224\u65ad\uff0cInnoDB\u7684\u4e8b\u52a1\u5904\u7406\u7ea7\u522bREPEATABLE-READ\u8fd8\u662f\u4f1a\u51fa\u73b0\u5e7b\u8c61\u8bfb\u3002\u5728\u7a0b\u5e8f\u4e2d\u5f3a\u884c\u5c06session\u7ea7\u7684\u5904\u7406\u4fee\u6539\u4e3aREAD-COMMITTED\u540e\uff0c\u95ee\u9898\u4e5f\u89e3\u51b3\uff0c\u4e0d\u518d\u51fa\u73b0\u5e7b\u8c61\u8bfb\u3002<\/p>\n<p>set session transaction isolation level read committed;<\/p>\n<p>\u8fd9\u4e2a\u4f3c\u4e4e\u4e0e\u7f51\u4e0a\u7684\u8d44\u6599\u6709\u4e9b\u4e0d\u4e00\u81f4\uff0c\u636e\u8bf4REPEATABLE-READ\u4e0d\u4f1a\u51fa\u73b0\u5e7b\u8c61\u8bfb\uff0c\u800cREAD-COMMITTED\u7ea7\u522b\u624d\u4f1a\u51fa\u73b0\u3002\u5b9e\u9645\u7ed3\u679c\u662f\u76f8\u53cd\u7684\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u5c31\u6211\u4eec\u7684\u5e94\u7528\u6765\u8bf4\uff0cselect\u64cd\u4f5c\u591a\u4e8einsert\/update\u64cd\u4f5c\uff0c\u800c\u4e14\u6570\u636e\u91cf\u4e0d\u5927\uff0c\u56e0\u6b64MyISAM\u6bd4InnoDB\u66f4\u9002\u5408\u6211\u4eec\u7684\u5e94\u7528\uff0c\u53ef\u60dc\u9ad8\u7248\u672c\u7684MySQL\u5c06\u7f3a\u7701\u5f15\u64ce\u7ed9\u6362\u6210InnoDB\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5728\u90e8\u7f72\u7cfb\u7edf\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53d1\u73b0MySQL\u7684\u4e00\u70b9\u95ee\u9898\uff0c\u8fdb\u884c\u7b80\u5355\u603b\u7ed3\u3002 \u5b9e\u9645\u4e0a\u5c31\u662f\u5173\u4e8e\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\u4ee5\u53ca\u5e7b\u8c61\u8bfb\u7684\u95ee\u9898\u3002 \u6211\u4eec\u7684\u7a0b\u5e8f\u5206\u6210\u4e24\u4e2a\u90e8\u5206:UI\u5c42\u4ee5\u53caService&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.myvoipapp.com\/blogs\/yxh\/2011\/03\/28\/mysql%e4%b8%8e%e5%b9%bb%e8%b1%a1%e8%af%bb\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[10,107],"class_list":["post-290","post","type-post","status-publish","format-standard","hentry","category-6","tag-mysql","tag-107"],"_links":{"self":[{"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/posts\/290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/comments?post=290"}],"version-history":[{"count":5,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/posts\/290\/revisions"}],"predecessor-version":[{"id":1920,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/posts\/290\/revisions\/1920"}],"wp:attachment":[{"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/media?parent=290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/categories?post=290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/tags?post=290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}