mysql-proxy原理与使用浅析(一)

作者:无名 - java -
<!-- [if !mso]> <mce:style><!-- v/:* {behavior:url(#default#VML);} o/:* {behavior:url(#default#VML);} w/:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} --> <!-- [endif]--> <!-- [if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves>false</w:TrackMoves> <w:TrackFormatting/> <w:PunctuationKerning/> <w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF/> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>ZH-CN</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:SpaceForUL/> <w:BalanceSingleByteDoubleByteWidth/> <w:DoNotLeaveBackslashAlone/> <w:ULTrailSpace/> <w:DoNotExpandShiftReturn/> <w:AdjustLineHeightInTable/> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:SplitPgBreakAndParaMark/> <w:DontVertAlignCellWithSp/> <w:DontBreakConstrainedForcedTables/> <w:DontVertAlignInTxbx/> <w:Word11KerningPairs/> <w:CachedColBalance/> <w:UseFELayout/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math"/> <m:brkBin m:val="before"/> <m:brkBinSub m:val="&#45;-"/> <m:smallFrac m:val="off"/> <m:dispDef/> <m:lMargin m:val="0"/> <m:rMargin m:val="0"/> <m:defJc m:val="centerGroup"/> <m:wrapIndent m:val="1440"/> <m:intLim m:val="subSup"/> <m:naryLim m:val="undOvr"/> </m:mathPr></w:WordDocument> </xml><![endif]--><!-- [if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true" DefSemiHidden="true" DefQFormat="false" DefPriority="99" LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Normal"/> <w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 4"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/> <w:LsdException Locked="false" Priority="39" Name="toc 1"/> <w:LsdException Locked="false" Priority="39" Name="toc 2"/> <w:LsdException Locked="false" Priority="39" Name="toc 3"/> <w:LsdException Locked="false" Priority="39" Name="toc 4"/> <w:LsdException Locked="false" Priority="39" Name="toc 5"/> <w:LsdException Locked="false" Priority="39" Name="toc 6"/> <w:LsdException Locked="false" Priority="39" Name="toc 7"/> <w:LsdException Locked="false" Priority="39" Name="toc 8"/> <w:LsdException Locked="false" Priority="39" Name="toc 9"/> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/> <w:LsdException Locked="false" Priority="10" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Title"/> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/> <w:LsdException Locked="false" Priority="11" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/> <w:LsdException Locked="false" Priority="22" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Strong"/> <w:LsdException Locked="false" Priority="20" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/> <w:LsdException Locked="false" Priority="59" SemiHidden="false" UnhideWhenUsed="false" Name="Table Grid"/> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/> <w:LsdException Locked="false" Priority="1" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 1"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 1"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 1"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/> <w:LsdException Locked="false" Priority="34" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/> <w:LsdException Locked="false" Priority="29" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Quote"/> <w:LsdException Locked="false" Priority="30" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 1"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 1"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 2"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 2"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 2"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 2"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 2"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 3"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 3"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 3"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 3"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 3"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 4"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 4"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 4"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 4"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 4"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 5"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 5"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 5"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 5"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 5"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 6"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 6"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 6"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 6"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 6"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/> <w:LsdException Locked="false" Priority="19" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/> <w:LsdException Locked="false" Priority="21" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/> <w:LsdException Locked="false" Priority="31" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/> <w:LsdException Locked="false" Priority="32" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/> <w:LsdException Locked="false" Priority="33" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Book Title"/> <w:LsdException Locked="false" Priority="37" Name="Bibliography"/> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/> </w:LatentStyles> </xml><![endif]-->

<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145 0;} @font-face {font-family:黑体; panose-1:2 1 6 9 6 1 1 1 1 1; mso-font-alt:SimHei; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:-2147482945 953122042 22 0 262145 0;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 415 0;} @font-face {font-family:"Palatino Linotype"; panose-1:2 4 5 2 5 5 5 3 3 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-536870265 1073741843 0 0 415 0;} @font-face {font-family:楷体_GB2312; mso-font-alt:"Arial Unicode MS"; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:0 135135232 16 0 262144 0;} @font-face {font-family:"/@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145 0;} @font-face {font-family:"/@黑体"; panose-1:2 1 6 9 6 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:-2147482945 953122042 22 0 262145 0;} @font-face {font-family:"/@楷体_GB2312"; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:0 135135232 16 0 262144 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, p.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} h1 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; mso-style-link:"标题 1 Char"; mso-style-next:Text; margin-top:12.0pt; margin-right:0cm; margin-bottom:6.0pt; margin-left:21.25pt; text-indent:-21.25pt; line-height:125%; mso-pagination:widow-orphan lines-together; page-break-after:avoid; mso-outline-level:1; mso-list:l0 level1 lfo1; tab-stops:list 21.25pt; layout-grid-mode:char; mso-layout-grid-align:none; font-size:14.0pt; mso-bidi-font-size:10.0pt; font-family:"Palatino Linotype","serif"; mso-fareast-font-family:黑体; mso-bidi-font-family:"Times New Roman"; mso-font-kerning:22.0pt; mso-bidi-font-weight:normal; mso-no-proof:yes;} h2 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:"标题 1"; mso-style-link:"标题 2 Char"; mso-style-next:Text; margin-top:12.0pt; margin-right:0cm; margin-bottom:6.0pt; margin-left:15.0pt; text-indent:-15.0pt; mso-char-indent-count:-3.0; mso-line-height-alt:12.0pt; mso-pagination:widow-orphan lines-together; page-break-after:avoid; mso-outline-level:2; mso-list:l0 level2 lfo1; layout-grid-mode:char; mso-layout-grid-align:none; font-size:13.0pt; font-family:"Palatino Linotype","serif"; mso-fareast-font-family:楷体_GB2312; mso-bidi-font-family:"Times New Roman"; mso-font-kerning:22.0pt; mso-bidi-font-weight:normal; mso-no-proof:yes;} h3 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:"标题 3 Char"; mso-style-next:Text; margin-top:6.0pt; margin-right:0cm; margin-bottom:6.0pt; margin-left:17.5pt; text-align:justify; text-justify:inter-ideograph; text-indent:-17.5pt; mso-char-indent-count:-3.5; line-height:125%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:3; mso-list:l0 level3 lfo1; layout-grid-mode:char; mso-layout-grid-align:none; font-size:12.0pt; font-family:"Palatino Linotype","serif"; mso-fareast-font-family:楷体_GB2312; mso-bidi-font-family:"Times New Roman"; mso-bidi-font-weight:normal;} h4 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:"标题 3"; mso-style-link:"标题 4 Char"; mso-style-next:Text; margin-top:12.0pt; margin-right:0cm; margin-bottom:6.0pt; margin-left:20.0pt; text-indent:-20.0pt; mso-char-indent-count:-4.0; line-height:125%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:4; mso-list:l0 level4 lfo1; layout-grid-mode:char; mso-layout-grid-align:none; font-size:12.0pt; font-family:"Palatino Linotype","serif"; mso-fareast-font-family:楷体_GB2312; mso-bidi-font-family:"Times New Roman"; mso-bidi-font-weight:normal;} span.1Char {mso-style-name:"标题 1 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"标题 1"; mso-ansi-font-size:14.0pt; mso-bidi-font-size:10.0pt; font-family:"Palatino Linotype","serif"; mso-ascii-font-family:"Palatino Linotype"; mso-fareast-font-family:黑体; mso-hansi-font-family:"Palatino Linotype"; mso-bidi-font-family:"Times New Roman"; mso-font-kerning:22.0pt; font-weight:bold; mso-bidi-font-weight:normal; mso-no-proof:yes;} span.2Char {mso-style-name:"标题 2 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"标题 2"; mso-ansi-font-size:13.0pt; mso-bidi-font-size:13.0pt; font-family:"Palatino Linotype","serif"; mso-ascii-font-family:"Palatino Linotype"; mso-fareast-font-family:楷体_GB2312; mso-hansi-font-family:"Palatino Linotype"; mso-bidi-font-family:"Times New Roman"; mso-font-kerning:22.0pt; font-weight:bold; mso-bidi-font-weight:normal; mso-no-proof:yes;} span.3Char {mso-style-name:"标题 3 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"标题 3"; mso-ansi-font-size:12.0pt; mso-bidi-font-size:12.0pt; font-family:"Palatino Linotype","serif"; mso-ascii-font-family:"Palatino Linotype"; mso-fareast-font-family:楷体_GB2312; mso-hansi-font-family:"Palatino Linotype"; mso-bidi-font-family:"Times New Roman"; mso-font-kerning:0pt; font-weight:bold; mso-bidi-font-weight:normal;} span.4Char {mso-style-name:"标题 4 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"标题 4"; mso-ansi-font-size:12.0pt; mso-bidi-font-size:12.0pt; font-family:"Palatino Linotype","serif"; mso-ascii-font-family:"Palatino Linotype"; mso-fareast-font-family:楷体_GB2312; mso-hansi-font-family:"Palatino Linotype"; mso-bidi-font-family:"Times New Roman"; mso-font-kerning:0pt; font-weight:bold; mso-bidi-font-weight:normal;} p.Text, li.Text, p.Text {mso-style-name:Text; mso-style-update:auto; mso-style-unhide:no; mso-style-parent:""; mso-style-link:"Text Char"; margin:0cm; margin-bottom:.0001pt; mso-para-margin-top:.75gd; mso-para-margin-right:0cm; mso-para-margin-bottom:.5gd; mso-para-margin-left:0cm; mso-para-margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; text-indent:22.0pt; mso-char-indent-count:2.0; mso-pagination:widow-orphan; tab-stops:21.0pt 42.0pt; layout-grid-mode:char; mso-layout-grid-align:none; font-size:11.0pt; font-family:"Palatino Linotype","serif"; mso-fareast-font-family:宋体; mso-bidi-font-family:"Times New Roman";} span.TextChar {mso-style-name:"Text Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:Text; mso-ansi-font-size:11.0pt; font-family:"Palatino Linotype","serif"; mso-ascii-font-family:"Palatino Linotype"; mso-fareast-font-family:宋体; mso-hansi-font-family:"Palatino Linotype"; mso-bidi-font-family:"Times New Roman"; mso-font-kerning:0pt;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:42.55pt; mso-footer-margin:49.6pt; mso-paper-source:0; layout-grid:15.6pt;} p.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:2110154660; mso-list-template-ids:1021898212;} @list l0:level1 {mso-level-style-link:"标题 1"; mso-level-tab-stop:21.25pt; mso-level-number-position:left; margin-left:21.25pt; text-indent:-21.25pt;} @list l0:level2 {mso-level-style-link:"标题 2"; mso-level-text:"%1/.%2/."; mso-level-tab-stop:57.25pt; mso-level-number-position:left; margin-left:49.6pt; text-indent:-1.0cm;} @list l0:level3 {mso-level-style-link:"标题 3"; mso-level-text:"%1/.%2/.%3/."; mso-level-tab-stop:96.55pt; mso-level-number-position:left; margin-left:70.9pt; text-indent:-1.0cm;} @list l0:level4 {mso-level-style-link:"标题 4"; mso-level-text:"%1/.%2/.%3/.%4/."; mso-level-tab-stop:117.8pt; mso-level-number-position:left; margin-left:92.15pt; text-indent:-1.0cm;} @list l0:level5 {mso-level-legal-format:yes; mso-level-text:"%1/.%2/.%3/.%4/.%5/."; mso-level-tab-stop:175.05pt; mso-level-number-position:left; margin-left:127.55pt; text-indent:-42.5pt;} @list l0:level6 {mso-level-text:"%1/.%2/.%3/.%4/.%5/.%6"; mso-level-tab-stop:178.3pt; mso-level-number-position:left; margin-left:163.0pt; text-indent:-2.0cm;} @list l0:level7 {mso-level-text:"%1/.%2/.%3/.%4/.%5/.%6/.%7"; mso-level-tab-stop:217.55pt; mso-level-number-position:left; margin-left:191.35pt; text-indent:-63.8pt;} @list l0:level8 {mso-level-text:"%1/.%2/.%3/.%4/.%5/.%6/.%7/.%8"; mso-level-tab-stop:256.8pt; mso-level-number-position:left; margin-left:219.7pt; text-indent:-70.9pt;} @list l0:level9 {mso-level-text:"%1/.%2/.%3/.%4/.%5/.%6/.%7/.%8/.%9"; mso-level-tab-stop:278.1pt; mso-level-number-position:left; margin-left:255.1pt; text-indent:-85.0pt;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} -->

<!-- [if gte mso 10]> <mce:style><!-- /* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.5pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-font-kerning:1.0pt;} -->

为什么要使用 MySQL-Proxy 呢? MySQL-Proxy 能带来什么样的好处?我们先来看一下正常的 MySQL 通信流程:

mysql-proxy原理与使用浅析(一)

<!-- [if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="图片_x0020_0" o:spid="_x0000_i1026" type="#_x0000_t75" alt="MySQL正常通信流程.jpg" style='width:292.5pt;height:381.75pt;visibility:visible; mso-wrap-style:square'> <v:imagedata src="file:///C:/Users/BAIHAO~1/AppData/Local/Temp/msohtmlclip1/01/clip_image001.jpg" mce_src="file:///C:/Users/BAIHAO~1/AppData/Local/Temp/msohtmlclip1/01/clip_image001.jpg" o:title="MySQL正常通信流程"/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->

很显然,我们可以在这些流程中间加入一个中间人,由它来将这些请求转发,接下来我们看一下如果加入一个中间人( MySQL-Proxy )的情况下,流程会变成什么样子,以及这种变化会带给我们什么样的好处。

<!-- [if gte vml 1]><v:shape id="图片_x0020_1" o:spid="_x0000_i1025" type="#_x0000_t75" alt="MySQL-Proxy通信流程.jpg" style='width:299.25pt;height:697.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:/Users/BAIHAO~1/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg" mce_src="file:///C:/Users/BAIHAO~1/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg" o:title="MySQL-Proxy通信流程"/> </v:shape><![endif]--><!-- [if !vml]-->mysql-proxy原理与使用浅析(一)<!-- [endif]-->

上图中红线部分都表示 MySQL-Proxy 可能篡改的地方。而 proxy_xxx 方法表示 MySQL-Proxy 可以拦截并提供给使用者进行篡改的途径。事实上 MySQL-Proxy 使用了 LUA 来作为它的胶水语言,同时提供了 connect_server, read_handshake, read_auth, read_authresult, read_query, read_query_result, disconnect_client 几种方法,分别对应上图中 proxy_xxx 的方法,如果 lua 的脚本里没有提供这些方法的话,那么就会采用 proxy_xxx 里定义默认实现。

那么为什么 MySQL-Proxy 采用 LUA 来作为胶水语言呢?因为 LUA 语言本身从设计上就是一个支持扩展性,并且使用简单,效率极高同时支持多种平台的语言。

IT人知识库 原文地址:http://www.itpeo.net/12806/3488256.html





rfedfre

怎么监控第三方应用程序(SOAP or RESTful client)访问HTTPS当数据站点?

随着越来越多的互联网应用,在我们日常的开发和调试,其中(例如,调试SOAP和RESTFul什么时候),我们经常需要... ...

rfedfre

转当web中应用spring框架时,获得spring初始化的bean和ServletContext

  http://floys1987.iteye.com/blog/372111 这些天,一直在边学习,边... ...

java邮件开发(3、用本地服务器发送带HTML格式的邮件)

上一篇文章已经在linux环境下搭建了邮件服务器,也就是说我们发邮件的时候不用借助别人的SMTP服务器,利用本地的就行了... ...

java邮件开发(2、redhat下部署邮件服务器)

上一篇文章已经利用了javamail发送一封简单的邮件,而当时发送时是借助网易的smtp服务器smtp.126.com&... ...

rfedfre

30天敏捷结果(28):撰写你的个人使命

本文更新版本已挪至  http://www.zhoujingen.cn/blog/956.html ----... ...

IPv6地址设置及使用方法

IPv6 协议栈的安装及IPv6地址设置指南(所使用地址,以北师大科技楼 94 网段为例)   1. Windows ... ...

rfedfre

简易纯JS日期控件

无聊,做了个纯JS的日期控件,JS动态生成CSS,可兼容大部分浏览器,直接JS引用即可使用,引用方式在JS最下面,可自行... ...

rfedfre

jfinal电影网站开发经验4

    网站建成后,剩下的就是推广了,。百度找了很多资料,大部分就是说去论坛,博客,等能写评论... ...

rfedfre

Eigenclass & Singleton Method

class MyClass def my_method end end my = MyClass... ...

rfedfre

Scope- ruby中变量的作用范围

ruby中变量的作用范围有3种   1. Class definitions 2. Modl... ...

log4j 简明手册上

Copyright&amp;copy; 2000-2004 The Apache Software Founda... ...

rfedfre

Linux(MAC) SSH远程文件/目录传输命令scp

相信各位VPSer在使用VPS时会经常在不同VPS间互相备份数据或者转移数据,大部分情况下VPS上都已经安装了Ng... ...

rfedfre

字符串相似算法-(1) Jaro-Winkler Distance

Jaro-Winkler Distance 算法   这是一种计算两个字符串... ...

python打印所有汉字

n=0for ch in xrange(0x4e00, 0x9fa6):    print... ...

rfedfre

利用查找替换批处理(附完整源码),进行高效重构

如果你需要在大量的代码文件中修改某个地方,那么最高效的办法就是使用正则进行批量处理。   下面介绍一个C... ...

twill: a simple scripting language for Web browsing

twill: a simple scripting language for Web browsing twil... ...

rfedfre

orcl Index base

1. 聚簇索引 2. B-tree索引3. 位图索引 --------------... ...

rfedfre

FlexUnit单元测试(第三章FlexUnit事件断言)

在说明问题之前,大家就看一个例子: import flexunit.framework.TestCase; i... ...

rfedfre

谷歌Android 2.0首批截图泄露:增强语音控制

据国外媒体报道,科技资讯博客BoyGeniuesReport昨日首次公布了谷歌Android 2.0系统的部分截图。 ... ...

The Best Programming Language for a Lean Startup

Think arguments between religious zealots are intense You’ve... ...