tag:blogger.com,1999:blog-2255177040877819282024-03-05T09:59:36.291-08:00Voice from An Old Soul杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-225517704087781928.post-37014433909129287302019-05-03T00:11:00.004-07:002019-05-03T00:14:20.819-07:00一個小密訣解替您決密碼加密保存的問題<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<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-TW</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:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
<w:UseFELayout/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]>
<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-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:12.0pt;
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;}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
<span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">您的自動執行的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">批次作業是如</span><span style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">何</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">登入</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">的</span><span lang="EN-US">?</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">將密碼寫入脚本</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">?還是</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">到一個存有密碼的檔案裡去讀取</span><span lang="EN-US">?</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">您是否曾經為了設法符合公司規定的不能以明碼的型式保存密碼而傷腦筋</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">?MySQL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">有一個較不為人所知的程式</span><span lang="EN-US">-</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">mysql_config-editor(</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">在</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">bin</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">目錄下能找到它</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">)</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">能為您解決這個問題</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">做法如下</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">:</span></div>
<div class="MsoListParagraph" style="margin-left: 24.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">建立</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">login path: ./bin/mysql_config_editor
set --login-path='mysql-cli' --user='root' --host='127.0.0.1' --port=3306
–password</span></div>
<div class="MsoListParagraph" style="margin-left: 48.0pt; mso-list: l0 level2 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;">l<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">建一個名為</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">mysql-cli</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">login path,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">它會在</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">user</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">的目錄之下建一個名為</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">.mysql_config.cnf</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">的加密檔案</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">當您</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">type</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">它時只能看到亂碼</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoListParagraph" style="margin-left: 24.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">如果想要查有那些</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">login path,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">它們的參數為何</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">可以用以下指令</span><span lang="ZH-HK" style="mso-fareast-language: ZH-HK;"> </span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">:</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="EN-US" style="mso-fareast-language: ZH-HK;">./bin/mysql_config_editor print --all</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="EN-US" style="mso-fareast-language: ZH-HK;">[root@localhost:33060]</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="EN-US" style="mso-fareast-language: ZH-HK;">user = root</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="EN-US" style="mso-fareast-language: ZH-HK;">password = *****</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="EN-US" style="mso-fareast-language: ZH-HK;">host = localhost</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="EN-US" style="mso-fareast-language: ZH-HK;">port = 33060</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="EN-US" style="mso-fareast-language: ZH-HK;">[mysql-cli]</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="EN-US" style="mso-fareast-language: ZH-HK;">user = root</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="EN-US" style="mso-fareast-language: ZH-HK;">password = *****</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="EN-US" style="mso-fareast-language: ZH-HK;">host = 127.0.0.1</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="EN-US" style="mso-fareast-language: ZH-HK;">port = 3306</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">您能看到所有的連線參數</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">但密碼都是</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">”*”</span></div>
<div class="MsoListParagraph" style="margin-left: 36.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 1.0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">登入</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">時只要指定</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">login
path</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">就行了</span><span lang="EN-US"></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US">./bin/mysql --login-path='mysql-cli' sys</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US" style="font-size: 10.0pt;">Reading table information for completion of
table and column names</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US" style="font-size: 10.0pt;">You can turn off this feature to get a
quicker startup with -A</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US" style="font-size: 10.0pt;">Welcome to the MySQL monitor.<span style="mso-spacerun: yes;"> </span>Commands end with ; or \g.</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US" style="font-size: 10.0pt;">Your MySQL connection id is 14</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US" style="font-size: 10.0pt;">Server version: 8.0.16-commercial MySQL
Enterprise Server - Commercial</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US" style="font-size: 10.0pt;">Copyright (c) 2000, 2019, Oracle and/or its
affiliates. All rights reserved.</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US" style="font-size: 10.0pt;">Oracle is a registered trademark of Oracle
Corporation and/or its</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US" style="font-size: 10.0pt;">affiliates. Other names may be trademarks
of their respective</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US" style="font-size: 10.0pt;">owners.</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<br /></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US" style="font-size: 10.0pt;">Type 'help;' or '\h' for help. Type '\c' to
clear the current input statement.</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<br /></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US" style="font-size: 10.0pt;">root@localhost:3306[sys]></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<br /></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US" style="font-size: 10.0pt;">登登... !!! 不用打密碼 進入資料庫😄</span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; mso-para-margin-left: 2.0gd;">
<span lang="EN-US" style="font-size: 10.0pt;">當然,您必需要好好保護這個.mylogin.cnf檔,因為任何人拿到它都可以用root登入資料庫😨</span></div>
杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-62652906955764653082019-04-25T21:54:00.003-07:002019-04-25T23:10:22.007-07:00Oracle 推出 MySQL 8.0.16, 再度將MySQL推向另一個顚峰<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<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-TW</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:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
<w:UseFELayout/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]>
<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-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:12.0pt;
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;}
</style>
<![endif]--><br />
<div class="MsoNormal">
<span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">在</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">4</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">月</span><span lang="EN-US">2</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">5</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">日晚上推出最新的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">更新版</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">-MySQL 8.0.16,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">由於品質控</span><span style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">制</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">能力和向下相容性的加強</span><span lang="EN-US">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">自從</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">邁入</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">8.0</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">後版本發佈模式就改為持續交付模式</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">(CDM),</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">在每個更新版都加入新的功能</span><span lang="EN-US">.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">8.0.16</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">是</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">8.0</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">正式發行以來第五個更新版</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">它除了修正</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">200</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">個以上的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">bug</span><br />
<span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;"><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<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-TW</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:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
<w:UseFELayout/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]>
<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-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:12.0pt;
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;}
</style>
<![endif]--><span lang="ZH-HK" style="font-family: "新細明體","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: 新細明體; mso-bidi-language: AR-SA; mso-fareast-language: ZH-HK; mso-font-kerning: 0pt;">讓它更穩定外</span><span lang="EN-US" style="font-family: "新細明體","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: 新細明體; mso-bidi-language: AR-SA; mso-fareast-language: ZH-HK; mso-font-kerning: 0pt;">,</span>還推出了多項新加能</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">其中比較重要的有</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">:</span></div>
<div class="MsoListParagraph" style="margin-left: 24.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">加強對中文的支持</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">, </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">增加一個字符集的文字排序</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">(collation)
– utf8mb4_zh_0900_as_cs, “as”</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">代表重音敏感</span><span lang="EN-US">,</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">”cs”</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">代表大小寫敏感</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">在這個字符集下</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,SQL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">命令的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">order by </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">順序可依四聲音符的順序排序</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">.</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">這為中文環境提供了許多的方便性和運用空間</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoListParagraph" style="margin-left: 24.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">資</span><span style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">料</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">建模的宣告制約支援</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">check constraint – </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">我</span><span style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">們</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">等你好久了</span><span lang="EN-US">!</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">!!</span></div>
<div class="MsoListParagraph" style="margin-left: 24.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">3.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">地理訊息系統</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">(GIS)</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">ST_LENGTH()</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">函式可指定其輸出值的單位</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">例如公尺、英吋等</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">.</span></div>
<div class="MsoListParagraph" style="margin-left: 24.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">4.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">優化器的改良</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">進一步推升</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">的性能</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">包括</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">:</span></div>
<ul>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">SQL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">命令中</span><span lang="EN-US">W</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">HERE</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">子句中有對常數的比對時,減少資料型別的轉換</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></li>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">子查詢的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">EXIST</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">子句的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">SQL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">執行計畫改為</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">semi-join ,MySQL 5.6</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">即引進</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">semi-join</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">將執行計</span><span style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">畫</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">由巢式</span><span style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">圈</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">廻</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">(nest loop)</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">改為只查是否符合的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">join</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">方式</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">使得某些原來要一天以上的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">SQL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">大幅改進到只要數分鐘即可返回結果</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">這次的改進是將</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">semi-join</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">的範圍擴大到</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">EXIST</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">子句.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></li>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">引進</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">volcano iterator design </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">為</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">join</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">提供更好的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">EXPLAIN</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">分析</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">我相信這也能為將來支援</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">parallel query</span><span style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">奠</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">定一個基礎!</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></li>
</ul>
<br />
<div class="MsoListParagraph" style="margin-left: 24.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">5.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">Replication </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">binlog</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">中加上</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">table
partition</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">的訊息</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">讓</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">applier(或SQL線程)</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">能更好的處理併發性</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">.</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">另外</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">.另外,binlog</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">檔案可以</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">AES</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">運算法加密</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">同時也支援主鑰的輪換</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">.</span></div>
<div class="MsoListParagraph" style="margin-left: 24.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">6.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">群組複製</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<ul>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">可動態調整</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">XCOM</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">緩存的空間</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">和設定該緩存的大小之上限,從而改進群組複製在面對大量交易時</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">的性能和穩定性.</span></li>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">群組中的節點下線後</span><span lang="EN-US">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">在重新開啟後</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">不需管理者動手</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">能自加回</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">這使得</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">DBA</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">輕鬆多了</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></li>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">支援封包傳輸的分割</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">這使</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MGR</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">處理大訊息</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">(</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">交易</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">)</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">的能力更佳</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">減少因為碰到大交易而使節點被退出群組的機會.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></li>
<li><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">離開群組的節點的可設為</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">READ_ONLY</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">或</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">ABORT_SERVER.</span></li>
</ul>
<br />
<div class="MsoListParagraph" style="margin-left: 24.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">7.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">動態開關</span><span lang="EN-US">(enable/disable)</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">表空間的加密功能.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoListParagraph" style="margin-left: 24.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">8.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">權限管理</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">多了</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">SYSTEM_USER</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">權限</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">.以及</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">自</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">CONNECT_ADMIN</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">權限中分出</span><span lang="EN-US">K</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">ILL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">線程權限</span><span lang="EN-US">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">還可以回收部份權限</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">.</span></div>
<div class="MsoListParagraph" style="margin-left: 24.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">9.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">安全管理</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">:</span></div>
<ul>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"><span style="mso-spacerun: yes;"></span>libmysql</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">支援</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">TLS1.3</span></li>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">可更改變運行中的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">實例之</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">SSL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">設定</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">例如更換</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">certificates</span></li>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">Performance_schema</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">能記錄</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">key ring</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">相</span><span style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">關</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">訊息</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></li>
</ul>
<br />
<div class="MsoListParagraph" style="margin-left: 24.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">10.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">連線的改良</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">:</span></div>
<ul>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">傳統連線</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">protocol, C API</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">能做非阻塞對話</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></li>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">X Protocol</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">當連到錯的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">protocol</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">時</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">能發出錯誤訊息</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></li>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">X protocol</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">能傳對話相關訊息到</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">server,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">例如應用的名稱、版本、作業系統、和</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">PID</span></li>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">X protocol</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">在切換對話時能保留連線訊而不需要再登入或再開連線</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">.</span></li>
</ul>
<br />
<div class="MsoListParagraph" style="margin-left: 24.0pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-latin;"><span style="mso-list: Ignore;">11.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">Router:</span></div>
<ul>
<li><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">支援</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">REST endpoint</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">和網路介面和</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">TLS/HTTPS</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">登入</span></li>
</ul>
<ul>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">能在單主和多主模式動態切換</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></li>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">支援多種日誌存放方式</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">(file/syslog/console)</span></li>
<li><span lang="EN-US" style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"></span></span></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">運作中的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">router</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">可動態</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">rotate log</span></li>
</ul>
<span lang="EN-US" style="mso-fareast-language: ZH-HK;"> 想了解更多相關訊息請參考 MySQL release node https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-16.html#mysqld-8-0-16-bug</span><br />
<span lang="EN-US" style="mso-fareast-language: ZH-HK;">和MySQL開發團隊的部落格 https://mysqlserverteam.com/the-mysql-8-0-16-maintenance-release-is-generally-available/ </span>杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-17076832939225455282019-03-15T00:34:00.002-07:002019-03-15T00:34:49.496-07:00您知道嗎, MySQL 也能做functional index長久以來大多數MySQL的用戶認為它沒有functional index,當我們在where條件的比對值中放入函式,它就只能做全表掃瞄,例如: select * from sakila.payment where month(payment_date) = 2; 我們想查2月支付的款項,MySQL 的優代器只能做全表掃瞄.這個問題在5.7版以後己經不是個問題了.<br />
我們看看這個例子:<br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<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-TW</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:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
<w:UseFELayout/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]>
<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-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:12.0pt;
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;}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
<span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">在sakila demo database 中未加</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">functional index到payment表</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">時</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,我們的表結構如下:</span><span lang="EN-US"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">mysql>
show create table payment\G</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">***************************
1. row ***************************</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>Table: payment</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">Create
Table: CREATE TABLE `payment` (</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`payment_id` smallint(5) unsigned NOT NULL
AUTO_INCREMENT,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`customer_id` smallint(5) unsigned NOT NULL,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`staff_id` tinyint(3) unsigned NOT NULL,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`rental_id` int(11) DEFAULT NULL,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`amount` decimal(5,2) NOT NULL,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`payment_date` datetime NOT NULL,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`last_update` timestamp NULL DEFAULT
CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>PRIMARY KEY (`payment_id`),</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>KEY `idx_fk_staff_id` (`staff_id`),</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>KEY `idx_fk_customer_id` (`customer_id`),</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>KEY `fk_payment_rental` (`rental_id`),</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>CONSTRAINT `fk_payment_customer` FOREIGN KEY
(`customer_id`) REFERENCES `customer` (`customer_id`) ON DELETE RESTRICT ON
UPDATE CASCADE,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>CONSTRAINT `fk_payment_rental` FOREIGN KEY
(`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE
CASCADE,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>CONSTRAINT `fk_payment_staff` FOREIGN KEY
(`staff_id`) REFERENCES `staff` (`staff_id`) ON DELETE RESTRICT ON UPDATE
CASCADE</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">)
ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
我們explain 上述的SQL指令顯示它是全表掃瞄:</div>
<div class="MsoNormal">
<br /><span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">mysql>
explain select count(*) from sakila.payment where month(payment_date)=2;</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">+----+-------------+---------+------------+------+---------------+------+---------+------+-------+----------+-------------+</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">|
id | select_type | table<span style="mso-spacerun: yes;"> </span>| partitions |
type | possible_keys | key<span style="mso-spacerun: yes;"> </span>| key_len |
ref<span style="mso-spacerun: yes;"> </span>| rows<span style="mso-spacerun: yes;"> </span>| filtered | Extra<span style="mso-spacerun: yes;"> </span>|</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">+----+-------------+---------+------------+------+---------------+------+---------+------+-------+----------+-------------+</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">|<span style="mso-spacerun: yes;"> </span>1 | SIMPLE<span style="mso-spacerun: yes;"> </span>| payment | NULL<span style="mso-spacerun: yes;"> </span>| ALL<span style="mso-spacerun: yes;">
</span>| NULL<span style="mso-spacerun: yes;"> </span>| NULL | NULL<span style="mso-spacerun: yes;"> </span>| NULL | 16086 |<span style="mso-spacerun: yes;"> </span>100.00 | Using where |</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">+----+-------------+---------+------------+------+---------------+------+---------+------+-------+----------+-------------+</span></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
我們<span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">加上索引:</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<span lang="EN-US"><br /></span></div>
<div class="MsoNormal">
<span lang="EN-US">mysql> alter table payment add index
pay_month_idx ((month(payment_date)));</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US">表結構顯示索引"pay_month_idx"加在"payment_date"欄位上<span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">:</span> </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">mysql>
show create table payment\G</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">***************************
1. row ***************************</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>Table: payment</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">Create
Table: CREATE TABLE `payment` (</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`payment_id` smallint(5) unsigned NOT NULL
AUTO_INCREMENT,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`customer_id` smallint(5) unsigned NOT NULL,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`staff_id` tinyint(3) unsigned NOT NULL,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`rental_id` int(11) DEFAULT NULL,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`amount` decimal(5,2) NOT NULL,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`payment_date` datetime NOT NULL,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>`last_update` timestamp NULL DEFAULT
CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>PRIMARY KEY (`payment_id`),</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>KEY `idx_fk_staff_id` (`staff_id`),</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>KEY `idx_fk_customer_id` (`customer_id`),</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>KEY `fk_payment_rental` (`rental_id`),</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>KEY `pay_month_idx`
((month(`payment_date`))),</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>CONSTRAINT `fk_payment_customer` FOREIGN KEY
(`customer_id`) REFERENCES `customer` (`customer_id`) ON DELETE RESTRICT ON
UPDATE CASCADE,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`)
REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>CONSTRAINT `fk_payment_staff` FOREIGN KEY
(`staff_id`) REFERENCES `staff` (`staff_id`) ON DELETE RESTRICT ON UPDATE
CASCADE</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">)
ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br />explain 同樣的SQL指令顯示它是透過索引找到所要的資料<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><br /></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">mysql>
explain select count(*) from sakila.payment where month(payment_date)=2\G</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">***************************
1. row ***************************</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>id: 1</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>select_type: SIMPLE</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>table: payment</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>partitions: NULL</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>type: ref</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;">possible_keys:
pay_month_idx</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>key: pay_month_idx</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>key_len: 5</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>ref: const</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>rows: 182</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>filtered: 100.00</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"><span style="mso-spacerun: yes;"> </span>Extra: NULL</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-font-size: 12.0pt; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">同樣的</span><span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-font-size: 12.0pt; mso-bidi-theme-font: minor-latin; mso-fareast-language: ZH-HK;">WHERE MONTH(payment_date)</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-font-size: 12.0pt; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">為查詢條件的</span><span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-font-size: 12.0pt; mso-bidi-theme-font: minor-latin; mso-fareast-language: ZH-HK;">SQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-font-size: 12.0pt; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">命令由於加上了</span><span lang="EN-US">month(payment_date) </span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">為內容的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">functional index</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">將全表掃瞄</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">16086</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">筆</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">row</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">改成透過</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">pay_month_idx</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">索引</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">只訪問了</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">182</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">筆</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"> row</span><span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-bidi-font-size: 12.0pt; mso-bidi-theme-font: minor-latin; mso-fareast-language: ZH-HK;"></span></div>
<br /><span lang="EN-US" style="font-family: "Courier New"; font-size: 8.0pt;"></span>杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com1tag:blogger.com,1999:blog-225517704087781928.post-6710675781222779572018-07-29T06:24:00.000-07:002018-07-29T06:24:27.028-07:00MySQL DBA的資料安全課題<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<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-TW</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:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
<w:UseFELayout/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]>
<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-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.0pt;
font-family:"Calibri","sans-serif";
mso-bidi-font-family:"Times New Roman";}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
<span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">資料庫是大多數應用系統的核心,因此,資料庫安全常是各種場合一再被拿出來探討的議題.但是您知道嗎</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">?</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">要為大部份資料庫安全問題可歸責於資料的擁有者或管理者</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">而且當管理者或架構設計者有採取適當的防護措施時這些問題都是可以避免或補</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">救</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">的</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">.</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">會造成資料丟失或</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">洩</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">露的人有兩大類:</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal" style="margin-left: 18.0pt; mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;">1.<span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">自己人,這包括:</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal" style="margin-left: 48.0pt; mso-list: l1 level2 lfo1; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: 新細明體; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;">甲、</span></span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">在操作系統上幹活的系統工程師:</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">和任何跑在作業系統上的應用程式一樣,</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">資料庫管理系統佔用伺服器的記憶體空間</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">資料也有會長久存於磁碟中.系統工程師可能對資料庫幹的</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">蠢</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">事包括:</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal" style="margin-left: 72.0pt; mso-list: l2 level1 lfo3; mso-text-indent-alt: -24.0pt; text-indent: -72.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";">
</span>i.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">誤</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">殺</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">mysqld</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">程序.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal" style="margin-left: 72.0pt; mso-list: l2 level1 lfo3; mso-text-indent-alt: -24.0pt; text-indent: -72.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";">
</span>ii.<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">誤刪某些資料庫檔案,如</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">my</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">cnf</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">之類的設定檔</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">或表空間檔</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">或者</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">binlog</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">之類的日誌檔</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,甚</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">至是整個資料目</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">錄</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal" style="margin-left: 72.0pt; mso-list: l0 level1 lfo2; text-indent: -24.0pt;">
<span lang="EN-US" style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;">l<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">由於系統工程師會擁有作業系統的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">root</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">帳戶,這類的誤刪是沒法完</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">全</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">避</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">免</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">的</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">要減少這種狀</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">態</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">發生的機會</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">可以在目錄層的權限不給</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">privilege mask 750(</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">擁有者有全部的權限,同一組的用戶可看可執行但不能寫,其他作業系統的用戶什麼都不能做</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">)</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">以上的權限,以防制這類的失誤</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal" style="margin-left: 72.0pt; mso-list: l0 level1 lfo2; text-indent: -24.0pt;">
<span lang="EN-US" style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;">l<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">另外</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span style="mso-fareast-language: ZH-HK;"> <span lang="EN-US">MySQL</span></span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">的高可用架構</span><span lang="EN-US">(</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">例如</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">group replication</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">或半同步複製等</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">)</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">在多台伺服器上執行由多個資料庫所構成的不會掉資料的同步</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">.</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">因此,當有人對一個資料庫做些蠢事把整個資料庫都殺了時,還有其他的資料庫存有一份一樣的資料</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">可以將它由別台伺服器全部抄回來</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal" style="margin-left: 72.0pt; mso-list: l0 level1 lfo2; text-indent: -24.0pt;">
<span lang="EN-US" style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;">l<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">當然,資料庫的備份是救回資料的最後手段</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">不過,想要不掉資料的把資料庫整個都救回來,除了完整的備份外</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">binlog</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">一定要全整的保留下來.所以</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">如果資料庫伺服器有多個磁</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">碟機</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">,建</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">議</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">將</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">binlog</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">存放於和</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">的資料目</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">錄</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">不同的磁</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">碟</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">機上</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">以免刪</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">除</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">資料目</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">錄</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">時</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">binlog</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">會一併刪除</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal" style="margin-left: 48.0pt; mso-list: l1 level2 lfo1; text-indent: -24.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: 新細明體; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;">乙、</span></span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">擁有</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">root</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">或資料庫管理權限的資料庫管理師或某些</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">schema</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">管理權限的資料操作者,一般所指的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">DBA</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">就是這類人,廣義來講,也包括某些應用程式開發者,他們能登入資料庫管理系統,對存資料的表或整個資料庫層級的物</span><span lang="EN-US">(</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">如帳號權限等</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">)</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">件做各種操作,他們可能對資料庫造成的問題有:</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal" style="margin-left: 72.0pt; mso-list: l1 level3 lfo1; text-indent: -24.0pt;">
<span lang="EN-US" style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;">l<span style="font: 7.0pt "Times New Roman";">
</span></span></span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">刪庫跑路是</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">DBA</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">所可能做的最</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">蠢</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">的事</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">別以為老手不會幹這種事,越是老</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">船</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">長越可能陰溝裏翻</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">船</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">,這包括刪掉整個</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">schema</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">、整個表、或動到是某些不該刪或改的資料.比較好的做法是事先防範.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">企業版的用戶可以用資料庫防火</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">牆,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">在</span><span lang="EN-US">S</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">QL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">命令執行前檢查</span><span lang="EN-US">S</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">QL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">命令</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">檔下由未經允許的前端所下的刪除整個表或</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">schema</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">,或是沒有</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">where</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">條件的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">delete</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">及</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">update</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">之類的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">SQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">命令全都由防火</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">牆</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">檔下</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">(</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">在最佳實務中這類的命令不可以隨意下,必需在特定機器、特定時間、以一個事先包裝好的程式去執行</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">)</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">.</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">如果要做到更精細的檢查,可在使用者介面之上加一個審核機制,在</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">SQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">命令送到資料庫前先檢查</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">SQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">的內容,不合規定的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">SQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">命令都被審核系統擋下或發出警告.今年</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">COSCUP</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">的開源資料庫系列的第四場</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">(</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">第一天下午一點開始</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">)</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">演</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">講</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">中周彥偉介紹他所開</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">發</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">Inception</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">開源審計軟體就是一個具體的實踐,有興趣進一步了解的朋友請把握這個機會到開源資料庫系列的研討會和</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">的技術大牛們聊聊.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal" style="margin-left: 18.0pt; mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<span lang="EN-US" style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-fareast-language: ZH-HK;"><span style="mso-list: Ignore;">2.<span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">居心不良的駭客:</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">這是大部份安全防護系統想要防備的對象,這些人入侵的手段包括網路攻擊、密碼</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">竊</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">取</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">、</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">以</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">暴</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">力試密碼、掛在網路上竊取傳輸的資料、入侵作業系統將整個目錄或表空間檔案抄走、或者自備份出來的資料中讀取資料等等手法.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">新版</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">大幅加強了安控能力,再配</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">企業版的各種安控插件,例如加密插件、透明表空間加密插件、</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">稽</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">核插件、和可利用</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">LDAP</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">之類登入機制的安控插件等,使我們有機會打造出一套</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">幾</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">乎滴水不漏的資訊系統.當然,再強的堡壘經長時間的攻擊總有漏出破綻的時</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">候,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">此時</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">企業監控就能發揮預防重於治療的效果,隨時監看系統</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">,</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">找出在管理及配置上可能有安全漏</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">洞</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">的地方,在這些漏洞還沒</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">曝</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">光前,讓我們能及時將漏洞堵住.另外,</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">Oracle</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">的</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">support</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">服務會在</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">軟體上的漏洞被發現時及時推出修正版解決這些問題,</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">企業版的用戶可以將企業監控和</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;">Oracle support</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">連線,在安全漏</span><span style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;">洞</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; mso-ascii-font-family: Calibri; mso-fareast-language: ZH-HK; mso-hansi-font-family: Calibri;">發佈的第一時間收到通知,並以一鍵式更新的方式更新資料庫版本,及時將資料庫軟體的安全漏洞補上.</span><span lang="EN-US" style="mso-fareast-language: ZH-HK;"></span></div>
<span lang="ZH-HK" style="font-family: "新細明體","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-ascii-font-family: Calibri; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt; mso-hansi-font-family: Calibri;">有興趣了解</span><span lang="EN-US" style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-ascii-font-family: Calibri; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt; mso-hansi-font-family: Calibri;">安控機制的朋友,請把握我在</span><span lang="EN-US" style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt;">COSCUP</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-ascii-font-family: Calibri; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt; mso-hansi-font-family: Calibri;">第二天下午</span><span lang="EN-US" style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt;">2</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-ascii-font-family: Calibri; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt; mso-hansi-font-family: Calibri;">:</span><span lang="EN-US" style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt;">40</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-ascii-font-family: Calibri; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt; mso-hansi-font-family: Calibri;">在</span><span lang="EN-US" style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt;">IB201</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-ascii-font-family: Calibri; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt; mso-hansi-font-family: Calibri;">的</span><span lang="EN-US" style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt;">”</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-ascii-font-family: Calibri; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt; mso-hansi-font-family: Calibri;">如何善用</span><span lang="EN-US" style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt;">MySQL</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-ascii-font-family: Calibri; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt; mso-hansi-font-family: Calibri;">打造固若金湯的系統</span><span lang="EN-US" style="font-family: "Calibri","sans-serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt;">”</span><span lang="ZH-HK" style="font-family: "新細明體","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-ascii-font-family: Calibri; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-language: ZH-HK; mso-font-kerning: 1.0pt; mso-hansi-font-family: Calibri;">研討會.</span>杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-70378100485260732822017-02-06T09:13:00.000-08:002017-02-06T18:46:05.790-08:00MySQL支援JSON文件面面觀(之二)這篇文章是MySQL支援JSON文件系列的第二章,承接上一篇 - <a href="http://voicefromoldsoul.blogspot.com/2017/01/mysql-json.html" target="_blank">詳解新世代MySQL如何支持NoSQL應用開發</a> ,它的重點放在MySQL前端的應用層如何使用資料庫中的JSON文件,您如果需要了解MySQL在5.7版中有那些功能支援JSON,可回到<a href="http://voicefromoldsoul.blogspot.com/2017/01/mysql-json.html" rel="nofollow" target="_blank">上一篇文章</a>中找答案.<br />
<br />
<h3>
新增mysqlx插件讓資料庫能使用X Protocol</h3>
<div>
MySQL自第一個正式發行版(5.7.9)就加上了新的新的JSON資料型別和JSON涵式,往支援NoSQL的路上邁了一大步。但是如果只能透過SQL介面開發NoSQL應用,還是顯得有些削足適履,我們要的是能完全脫離SQL的影子,直接以NoSQL的方式和資料庫互動。所以MySQLng專案在原有的(預設使用3306端口)SQL介面之外(如下圖2.的部份)再開發了一個X Plugin,使應用端能透過X Plugin預設的33060端口使用X Dav API,直接對MySQL資料庫的JSON文件做增刪改查等操作。所以,現在的MySQL不僅是說SQL語言的關聯式資料庫,也是一個自前端到後端完整支援NoSQL的資料庫。事實上,在MySQL 5.6以後,它就能透過Memcached的介面以key-value查詢的方式和資料庫互動(MySQL memcache的預設端口為11211),當查詢方式不涉及複雜的JOIN和子查詢時,藉由這個介面繞過SQL層,少了處理SQL的解析和優化的工作負荷,能使性能大輻提升,這也是以一個NoSQL的方式和資料庫互動。現在又支援了JSON文件介面,使我們的NoSQL應用能有更高的可攜性。</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6Anb9NgvajR6CM4jfd1cOiiikcAhOuw9ZmxuwWZzUdWcRcRGeMFjewWb1scPzVGjlXzwjWVDJXjqY0pMK5RTFe2bJGMmyXz622HWHJgKvI6HWNh4M46Pk1FFAnJZS-bPUVghJ8y_jqyzV/s1600/image6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6Anb9NgvajR6CM4jfd1cOiiikcAhOuw9ZmxuwWZzUdWcRcRGeMFjewWb1scPzVGjlXzwjWVDJXjqY0pMK5RTFe2bJGMmyXz622HWHJgKvI6HWNh4M46Pk1FFAnJZS-bPUVghJ8y_jqyzV/s1600/image6.png" /></a></div>
<div>
<br /></div>
<h4>
MySQL X Plugin的安裝</h4>
<div>
<div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="https://www.blogger.com/blogger.g?blogID=225517704087781928" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=225517704087781928" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=225517704087781928" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=225517704087781928" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=225517704087781928" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=225517704087781928" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a>MySQL 5.7一開始並不具備處理X Protocol的能力,要讓MySQL能支援X Protocol必需先裝MySQL X 插件,在安裝X插件之前MySQL就只能使用(聽3306)SQL介面,和您熟悉的傳統MySQL沒什麼差異(之所以必需設定插件才能帶出X Protocol應該主要是基於降低複雜度和bug出現的機會的考量)。</div>
<div>
MySQL自 5.7.12版以後以,可在軟體包的lib/plugin目錄中,找到一個名為mysqlx.so(Windows版是mysqlx.dll)的檔案,這就是X插件的程式庫。透過mysql客戶端程式,或MSQL Shell均可以安裝mysqlx插件:</div>
</div>
<div>
<ul>
<li>以MySQL客戶端程式安裝MySQL X插件的命令如下(不一定要用root帳戶,以任何對mysql.plugin表有插入權的用戶都可以):</li>
</ul>
</div>
<div>
<ul><textarea cols="80" id="SampleTextArea" rows="3" style="height: 38px; width: 509px;">$ mysql –u<user-name> -hlocalhost –P3306 –p <pasword>
mysql> INSTALL PLUGIN mysqlx SONAME 'mysqlx.so'; </textarea></ul>
</div>
<ul>
</ul>
<br />
<ul>
<li>以MySQL Shell安裝MySQL X插件,在安裝好MySQL Shell的環境中:</li>
</ul>
<div>
<textarea cols="80" rows="2" style="height: 22px; width: 549px;">$ mysqlsh -u <user-name> -h localhost --classic --dba enableXProtocol</textarea><br />
<br />
<ul>
<li>您可以在mysql客戶端程式下以下命令,在回應的清單中找mysqlx插件是否在其中,以確認MySQL的X插件是否己裝好:</li>
</ul>
</div>
<div>
<textarea cols="80" rows="2" style="height: 20px; width: 552px;">mysql> show plugins;</textarea></div>
<br />
<br />
當X插件安裝好了,您就可以準備X protocol的客戶端,正式將MySQL當成一個全然的文件型資料庫。<br />
<br />
<h3>
MySQL Shell - 操作MySQL文件資料的好幫手</h3>
<span style="font-weight: normal;">正如同mysql客戶端程式為SQL介面(默認3306端口)提供了方便操作的工具一樣,MySQL Shell也為各類使用者(DBA,開發者…)提供一個好用的工具,以NoSQL的方式對資料庫直接操作資料,管理資料庫或做臨時性的查詢。 </span><br />
<h4>
<span style="font-weight: normal;"> <div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE6MVUHGWbN7yca2NHYEHU2A-aCFdhyphenhyphenNJtzrqBeuhe4j9WC_B8_8AqJg5Ttt8kVyPlXAK3Aj7cm2kJHo1KYY7mhEwD-jlExsWcILjhFxzozdCu6kNxwN75fXeUkx-s40yKfti8lwr-mdJg/s1600/image7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE6MVUHGWbN7yca2NHYEHU2A-aCFdhyphenhyphenNJtzrqBeuhe4j9WC_B8_8AqJg5Ttt8kVyPlXAK3Aj7cm2kJHo1KYY7mhEwD-jlExsWcILjhFxzozdCu6kNxwN75fXeUkx-s40yKfti8lwr-mdJg/s640/image7.png" width="640" /></a></div>
</span></h4>
<ul>
<li>取得及安裝MySQL Shell</li>
</ul>
MySQL Shell不在MySQL軟體包內,需要單獨自http://dev.mysql.com/downloads下載其軟體包,<br />
如下圖所示,在MySQL的下載網頁的左邊的導航列中可選到MySQL Shell的選項。有一點先請讀者們注意的是,目前(2016年底),MySQL Shell還是處於第三個beta(DMR)版,在它正式發行之前或許以後會有一些變動或者會加上更多功能。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgClOOaY_ejWOxtK1CitusqlKThZrzvfPejUwuroXpzikf3OVoAGyMhjRU2Rj9Bw75PrymAS9bQbFGUoCd3epS0WgUGi52jIKge4hrQrH0_nQiwTfXfjfRg5QrLJ13NYASP3YsgHNpnJB8j/s1600/image8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgClOOaY_ejWOxtK1CitusqlKThZrzvfPejUwuroXpzikf3OVoAGyMhjRU2Rj9Bw75PrymAS9bQbFGUoCd3epS0WgUGi52jIKge4hrQrH0_nQiwTfXfjfRg5QrLJ13NYASP3YsgHNpnJB8j/s640/image8.png" width="640" /></a></div>
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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]--><br />
<!--[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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> <br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-no-proof: yes;">進入下載網頁後可依</span><span lang="EN-US" style="font-family: "arial" , "sans-serif"; mso-bidi-font-family: "Times New Roman"; mso-no-proof: yes;">MySQL Shell</span><span style="font-family: "新細明體" , "serif"; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-no-proof: yes;">的執行環境選擇合適的版本</span><span lang="EN-US" style="font-family: "arial" , "sans-serif"; mso-bidi-font-family: "Times New Roman"; mso-no-proof: yes;"></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLLFfJQZs8FB2djA9iGs-Gv0PAL5nV1OYEaYYu1-fSZe30C1YwI2t433_SK_rIdvNABglkSVwh-I9FSK-c1GOyJWCU6facOfBZ9n5ORQILTSyKWdffHkpsZnzDmUZSFlnW5mBWL5yd9WkV/s1600/image9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLLFfJQZs8FB2djA9iGs-Gv0PAL5nV1OYEaYYu1-fSZe30C1YwI2t433_SK_rIdvNABglkSVwh-I9FSK-c1GOyJWCU6facOfBZ9n5ORQILTSyKWdffHkpsZnzDmUZSFlnW5mBWL5yd9WkV/s640/image9.png" width="640" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
如果您選擇ZIP Archive或 tar 包,解開壓縮檔,不需安裝就可以使用mysqlsh程式,但要設定環境的路徑變數,將MySQL Shell目錄下的bin子目錄的路徑加到PATH變量中以方便執行MySQL shell。依操作系統的不同,您也可以選擇rpm,deb或msi安裝包,這些安裝包在執行時可以解開其軟體,並且加上路徑環境變數或將文件放到適當的位置(例如/user/bin),以方便執行。<br />
<ul>
<li>執行MySQL Shell</li>
</ul>
在操作系統選單中選擇MSQL Shell或終端機命令模式下執行msqlsh進入MySQL Shell。<br />
<br />
<div>
</div>
<div>
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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]--><br />
<!--[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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> <br />
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">$ mysqlsh </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Welcome to MySQL Shell 1</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">0</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">4 Development Preview</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Copyright (c) 2016</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> Oracle and/or its affiliates</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> All rights reserved</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">。</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Oracle is a registered trademark of Oracle Corporation and/or its</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">affiliates</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> Other names may be trademarks of their respective</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">owners</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Type '\help'</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> '\h' or '\?' for help</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">。</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Currently in JavaScript mode</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> Use \sql to switch to SQL mode and execute queries</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql-js></span></div>
<br />
<ul>
<li>和mysql客戶端程式一樣,mysqlsh命令也可以加上參數。例如指定以什麼帳戶連入那個資料庫、對話的模式(X session, node session,或classic session)、語法(Javacript,Python,或SQL)、或內含批量作業命令的文件,如果要了解有那些選項,可以用--help或-h選項列示mysqlsh所選項和它們的說明:</li>
</ul>
<!--[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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> <br />
<div class="MsoNormal" style="margin-left: 7.1pt;">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">$ </span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysqlsh –u<user-name> -h<host> -p</host></user-name></span></div>
<br />
看起來是不是很熟悉?或是以下列命令指定URI同樣能登入資料庫:<br />
<div class="MsoNormal" style="margin-left: 7.1pt;">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> </span></div>
<div class="MsoNormal">
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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]--><br />
<!--[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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> <br />
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">$ mysqlsh –uri root<user-name></user-name></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:<pasword></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><password>@localhost<host></host></password></span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:33060</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><port>/<database><db-name></db-name></port></span></div>
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><port><db-name></db-name></port></span></div>
<br />
<ul>
<li>MySQL Shell有三種對話(Session)模式:</li>
</ul>
<ul></ul>
<br />
– X session,這是預設的對話模式,這個模式無法執行SQL命令,只能下JavaScript或Python的命令,MySQL的X Session以後可以發展成同時支援多個資料庫連線和資料庫分片<br />
– Node session, 能執行SQL, JavaScript或Python的命令,但是Node Session只能和一個資料庫連線,以後也不會擴充成同時連多個資料庫。<br />
– Classic session,不和使用x protocol,能用 SQL命令,和傳統的mysql介面類似,但開發者能用的介面有限,不支援NoSQL 的CRUD操作,也不能對collection操作。 </div>
<div>
<ul>
<li>MySQL shell 可以有三種命令模式供您選擇: </li>
</ul>
– JavaScript : 默認的命令模式,也可以在mysqlsh命令加上--js選項進入JavaScript模式,提示符為mysql-js> ,能接受JavaScript的命令。<br />
– Python : 命令加上--py選項進入Python模式,提示符為mysql-py>,能使mysqlsh接受Python命令,MySQL Shell的指令如下:<br />
<div class="MsoNormal" style="margin-left: 7.1pt;">
</div>
<div class="MsoNormal" style="margin-left: 7.1pt;">
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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]--></div>
<br />
<div class="MsoNormal" style="margin-left: 7.1pt;">
<!--[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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> </div>
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">$ mysqlsh –u<user> -h<host> -p --py</host></user></span></div>
<br />
– SQL:要能在MySQL Shell下SQL命令對話模式必需在MySQL Shell指定classic 或node session,再於命令行加上--sql選項,可進入SQL模式,這個模式的介面和傳統的mysql客戶端的操作方式機乎完全相同,一樣是SQL命令,進入此模式的MySQL Shell命令為:<br />
<br />
<div class="MsoNormal" style="margin-left: 24.0pt;">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> </span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">$ </span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysqlsh –u<user-name> –p –h<host> --classic --sql;</host></user-name></span><br />
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><user-name><host><br /></host></user-name></span></div>
– 如同在mysql客戶端程式下鍵入help一樣,查mysql客戶端程式的命令,進入MySQL Shell後可以\?或\help查mysqlsh的操作命令,它所有的mysqlsh命令都以\開頭,例如\c是建立資料庫連線。<br />
<br />
<h4>
在MySQL Shell操作JSON文件</h4>
<span style="font-family: "courier new";">MySQL Shell為JSON文件的操作提供所需要的命令集,這些命令都是實施了X Dav API的介面而開發出來的,MySQL Shell的X Dav API的詳情請參考http://dev.mysql.com/doc/dev/mysqlsh-api-javascript/<br />
在此以JavaScript命令模式為例,說明以mysqlsh 在JSON文件生命週期中的各種操作:</span></div>
<div>
<span style="font-family: "courier new";"><br />
– 建立Schema和更換Schema:<br />
MySQL Shell有幾個預設的物件,例如session, db…,您可在進入以後鍵入session查 看目前連線對話的內容,下例顯示目前的對話模式為X Session,以root帳戶連線位於127.0.0.1,使用33060端口:</span></div>
<div>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;">mysql-js> session</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"><XSession:root@localhost:33060></span></span></div>
<div class="MsoNormal" style="margin-left: 7.1pt; mso-char-indent-count: -.71; text-indent: -7.1pt;">
<span style="font-family: "courier new";"><br /></span></div>
<span style="font-family: "courier new";">在session物件上建立schema的函式,以下範例建一個名為”mydemo的Schema:</span></div>
<div>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;">mysql-js</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> session.createSchema('mydemo')</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"><Schema:mydemo></span></span></div>
<span style="font-family: "courier new";"> <br />
上列命令相當於在mysql命令程式下達CREATE DATABASE mydemo。<br />
查查看我們之前建立的mydemo schema是否存在?目前資料庫有那些schema?</span></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;">[</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> <Schema:information_schema>,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> <Schema:acmug</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> <Schema:chtl</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> <Schema:ci17h1</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> <Schema:my_test</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> </span></span><span style="font-family: "courier new"; font-size: 13.3333px;"><</span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">Schema:mydemo</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> </span></span><span style="font-family: "courier new"; font-size: 13.3333px;"><</span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">Schema:mysql</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> </span></span><span style="font-family: "courier new"; font-size: 13.3333px;"><</span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">Schema:mysqlnews</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> </span></span><span style="font-family: "courier new"; font-size: 13.3333px;"><</span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">Schema:performance_schema</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> </span></span><span style="font-family: "courier new"; font-size: 13.3333px;"><</span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">Schema:sakila</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> </span></span><span style="font-family: "courier new"; font-size: 13.3333px;"><</span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">Schema:sys</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> </span></span><span style="font-family: "courier new"; font-size: 13.3333px;"><</span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">Schema:test_schema</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> </span></span><span style="font-family: "courier new"; font-size: 13.3333px;"><</span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">Schema:wordpress</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> </span></span><span style="font-family: "courier new"; font-size: 13.3333px;"><</span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">Schema:world</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">,</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> </span></span><span style="font-family: "courier new"; font-size: 13.3333px;"><</span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;">Schema:world_x</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;">]</span></span></div>
<span style="font-family: "courier new";"> <br />
更換使用中的schema,則以mysqlsh命令\use(或者\u)就行了,例如:</span></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql-js<span style="font-size: 13.3333px;">></span> \u mydemo</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Schema `mydemo` accessible through db</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span style="font-family: "courier new"; font-size: 10.0pt;"> <span lang="EN-US"></span></span></span></div>
<span style="font-family: "courier new";"> <br />
當然,進入mysqlsh時所指定的參數中也可以指定建立連線後要用那一個database(schema),例如:</span></div>
<div>
<span style="font-family: "courier new";"><br />
</span></div>
<div>
<br />
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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]--> <br />
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">$ mysqlsh --uri root@127</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">0</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">0</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">1</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">33060/mydemo</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Creating an X Session to root@127</span>.<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">0</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">0</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">1</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">33060/mydemo</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Enter password</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">********</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Default schema `mydemo` accessible through db</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Welcome to MySQL Shell 1</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">0</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">4 Development Preview</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Copyright (c) 2016</span>,<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> Oracle and/or its affiliates</span>.<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> All rights reserved</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Oracle is a registered trademark of Oracle Corporation and/or its</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">affiliates</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> Other names may be trademarks of their respective</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">owners</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Type '\help'</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> '\h' or '\?' for help</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Currently in JavaScript mode</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> Use \sql to switch to SQL mode and execute queries</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql-js></span></div>
<!--[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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<span style="font-family: "courier new";"><br /> </span><br />
<span style="font-family: "courier new";">上例中登入MySQL Shell的參數中,URI的最後一段指定用mydemo為連線的預設schema,進入mysqlsh後回應的內容中有一段"default schema `mydemo` accessible through db"說明了這一點,進入了mysqlsh後還可以鍵入db查證一下mysqlsh的默認物件db是否放在mydemo上:</span></div>
<div>
<span style="font-family: "courier new";"><br />
</span></div>
<div>
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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]--> <br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;">mysql-js</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><span style="font-family: "courier new";"><span style="font-size: 13.3333px;"> db</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"><Schema:mydemo</span></span><span style="font-family: "courier new"; font-size: 13.3333px;">></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"><br /></span></span></div>
</div>
<div>
<span style="font-family: "courier new";">
– 在當前schema下操作Collection和Document:<br />
在說明mysqlsh對collection的操作前,先簡單的說明Document資料庫的基本觀念: <br />
一個collection是一堆JSON文件的集,相當於關聯式資料庫的表,JSON Document代表(或描述)一個事情或是一筆記錄,相當於關聯式資料庫在表中的一個row。</span></div>
<div>
<ul>
<li><span style="font-family: "courier new";">建立Collection:</span></li>
</ul>
<span style="font-family: "courier new";">- 透過預設的db物件之createCollection函式,在目前所在的schema之下可以建立collection,而db物件代表當下的session所位在的schema,下例為建一個名為collection1的Collection</span><br />
<span style="font-family: "courier new";"><br /></span></div>
<div>
</div>
<div>
<span style="font-family: "courier new"; font-size: 13.3333px;"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;">mysql-js> db.createCollection('collection1');</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"><Collection:collection1></span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"><br /></span></span></div>
</div>
<div>
</div>
<div>
<span style="font-family: "courier new";">- 也可以在參數中加上schema名稱,這個功能使用戶可以在任何schema下為mydmo建collection:</span></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<span style="font-family: "courier new";"><br />
</span><span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;">mysql-js> db.createCollection('mydemo.mycollection');</span></span><br />
<span style="font-family: "courier new";"><span style="font-size: 13.3333px;"><collection:mydemo .mycollection=""></collection:mydemo></span></span></div>
<span style="font-family: "courier new";"><br />
只要有權限在指定的schema下加表的帳戶,都可以在位於任何資料庫時執行createCollection以參數<schema-nam>。<collection-name> 的方式為其他的schema.加上collection。</collection-name></schema-nam></span></div>
<div>
</div>
<div>
<ul>
<li><span style="font-family: "courier new";">加上Document:</span></li>
</ul>
<span style="font-family: "courier new";">- 有了collection以後,可調用該colleciton 物件的add函式將JSON文件加入collection中:</span></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql-js> db</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">collection1</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">add({"name":</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> {"lastname"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">:</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"Tu"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">,</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"firstname"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">:</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"Ivan"}</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">,</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"height"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">:</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> 180</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">,</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"weight"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">:</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> 68</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">,</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"talents"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> ["swimming"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">,</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"dancing"</span>,<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"programming"]});</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Query OK</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> 1 item affected (0</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">.02 sec)</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><br /></span></div>
<span style="font-family: "courier new";"> - 再加一個文件:</span></div>
<div>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:新細明體;
mso-fareast-theme-font:minor-fareast;
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;}
</style> <![endif]--> </span><br />
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql-js> db</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">collection1</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">add({"name"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> {"lastname"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "Wang"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"firstname"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "James"}</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"height"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> 170</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"weight"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> 80</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"date of birth"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"1990-12-30"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"talents"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> ["make money"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"dancing"]});</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Query OK</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> 1 item affected (0</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">00 sec)</span></span></div>
<span style="font-family: "courier new";"> <br />
• 現在查現在己加了多少文件到collection1:</span></div>
<div>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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.0pt;
font-family:"Courier New";}
</style> <![endif]--> </span><br />
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql-js> db</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">collection1</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">find();</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">[</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>{</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"_id"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "64b87d23a162d211645db86b2339c6c8"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"date of birth"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "1990-12-30"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"height"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> 170</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"name"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> {</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"firstname"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "James"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"lastname"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "Wang"</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>}</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"talents"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> [</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"make money"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"dancing"</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>]</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"weight"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> 80</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>}</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>{</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"_id"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "b85d1476a062d211645db86b2339c6c8"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"height"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> 180</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>"name"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> {</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"firstname"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "Ivan"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"lastname"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "Tu"</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>}</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"talents"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> [</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"swimming"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"dancing"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"programming"</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>]</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"weight"</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> 68</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>}</span></span></div>
<div class="MsoNormal" style="margin-left: .05pt; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">]</span></span></div>
<div class="MsoListParagraph" style="margin-left: .05pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -.05pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-list: Ignore;">1<span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">documents in set (0</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">00 sec)</span></span></div>
</div>
<div>
<span style="font-family: "courier new";"><br />
– 如果仔細看上列的輸出您可以發現幾個有趣的現象:<br />
• 雖然前面加Document時,並未在文件中加上”_id”物件,所有的文件都自動加上一個名為”_id”的物件,存放自動產生的uuid值。<br />
• 文件的結構能自由定義不像關聯式資料庫需事先定一個固定的文件結構,上例中第二個文件比第一個文件多了一個”data of birth”物件,”talents”陣列的數目也比第一個少了一個,這代表JSON文件不需事先定義資料結構,物件名稱(identifier)就能表達JSON文件內各物件的含義。<br />
– 另一邊,由mysql客戶端程式查看看資料庫在引擎層面發生了什麼事?</span></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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.0pt;
font-family:"Courier New";}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql> show create table collection1\G</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">*************************** 1</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> row ***************************</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>Table</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> collection1</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Create Table</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> CREATE TABLE `collection1` (</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>`doc` json DEFAULT NULL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>`_id` varchar(32) GENERATED ALWAYS AS (json_unquote(json_extract(`doc`</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">'$</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">_id'))) STORED NOT NULL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>PRIMARY KEY (`_id`)</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">1 row in set (0</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">00 sec)</span></span></div>
<span style="font-family: "courier new";"> <br />
顯示每一個collection都對應一個InnoDB的表,表有兩個欄位 – doc欄位的資料型別是json,另一個_id欄位是由json_extract函式生成的STORED(自函式算出值實際存放於表中,以後查詢時不需再算一次)欄位,它的值是在doc欄位中找名為_id的物件之值,並且將主鍵加在這個_id欄位上。<br />
– 我們也能為collection的weight加上(非唯一)次要索引:</span></div>
<div>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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.0pt;
font-family:"Courier New";}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql-js> db</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">collection1</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">createIndex("weightIdx")</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">field("weight"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"INTEGER"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">false)</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">execute();</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Query OK (0</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">06 sec)</span><span lang="EN-US" style="font-family: "arial unicode ms" , "sans-serif"; mso-bidi-font-family: "Courier New"; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: 新細明體; mso-fareast-language: ZH-HK; mso-no-proof: yes;"></span></span></div>
<span style="font-family: "courier new";"> <br />
– 另一方面,加上索引後在InnoDB表結構如下所示:</span></div>
<div>
</div>
<div>
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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.0pt;
font-family:"Courier New";}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql> show create table collection1\G</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">*************************** 1</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> row ***************************</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>Table</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> collection1</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Create Table</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> CREATE TABLE `collection1` (</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>`doc` json DEFAULT NULL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">,</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>`_id` varchar(32) GENERATED ALWAYS AS (json_unquote(json_extract(`doc`</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10pt;"><span style="font-family: "courier new";">,</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10pt;">'$</span><span lang="EN-US" style="font-family: , serif; font-size: 10pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10pt;">_id'))) STORED NOT NULL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10pt;"><span style="font-family: "courier new";">,</span></span><span style="font-size: 10pt;"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>`$ix_i_2D8FA3E83FC26B3A572C94D67A6F56CAC0CA1EAB` int(11) GENERATED ALWAYS AS (json_extract(`doc`</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">'$</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">weight')) VIRTUAL</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">,</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>PRIMARY KEY (`_id`)</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">,</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>KEY `weightIdx` (`$ix_i_2D8FA3E83FC26B3A572C94D67A6F56CAC0CA1EAB`)</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4</span></span></div>
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">1 row in set (0</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">00 sec)</span> </span></div>
<div>
<span style="font-family: "courier new";"><br />
<br />
由此證明X Dav API會因為這個collection1.createIndex函式會在資料庫的collection1表上多加了一個名為$ix_i_<uuid> 的虛擬欄位,其值是由json_extract文件中的weight物件取出的值所構成的,並且在其上加了索引-weightIdx<br />
– 您也可以對collection進行條件查詢,甚至動能挷定值於條件中,下例為自Collection找出weight > 70的文件</uuid></span></div>
<div>
</div>
<div>
<span style="font-family: "courier new";"></span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10pt;">mysql-js> db</span><span lang="EN-US" style="font-family: , serif; font-size: 10pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10pt;">collection1</span><span style="font-family: "新細明體" , "serif";">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10pt;">find("weight > </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10pt;">kg").</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10pt;">bind("kg"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10pt;">70);</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">[</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>{</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"_id"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "64b87d23a162d211645db86b2339c6c8"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"date of birth"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "1990-12-30"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"height"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> 170</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"name"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> {</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>"firstname"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "James"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"lastname"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "Wang"</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>}</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"talents"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> [</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"make money"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"dancing"</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>]</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">,</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"weight"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> 80</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>}</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">]</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10pt;">1 document in set (0</span><span lang="EN-US" style="font-family: , serif; font-size: 10pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10pt;">00 sec)</span></span></div>
<span style="font-family: "courier new";"><br />
由於查詢條件裡有weight物件,執行計畫可能會用到前一段所建weightIdx的索引。<br />
– 也可以指定要由查詢的結果中只傳回指定的物件,下例顯示不需要看整份JSON文件,只要傳回name和height物件</span></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<span style="font-family: "courier new";"><br />
</span><span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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.0pt;
font-family:"Courier New";}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql-js> db</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">.</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">collection1</span>.<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">find("weight > 70")</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">.</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">fields(["name"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">,</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"height"]);</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">[</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>{</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"height"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> 170</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">,</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"name"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">:</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> {</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"firstname"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">:</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "James"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">,</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"lastname"</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: "courier new";">:</span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> "Wang"</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>}</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>}</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><br />
</span></span></div>
<span style="font-family: "courier new";">1 document in set (0.00 sec)</span></div>
<div>
<span style="font-family: "courier new";"><br />
– 最後,不需要這個collection時,可以刪除這個collection,drop collection得用session物件的dropCollection函式,它的必要參數有兩個 – schema名稱和collection名稱,刪除後該schema就查不到該collection了</span></div>
<div>
<span style="font-family: "courier new";">
</span><span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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.0pt;
font-family:"Courier New";}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql-js> session.dropCollection("mydemo","collection1");</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Query OK (0.02 sec)</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql-js> db.getCollections()</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">[</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">]</span></span></div>
</div>
<div>
<span style="font-family: "courier new";"> 一如mysql客戶端程式</span><span style="font-family: "courier new";"><span style="font-family: "courier new";">可執行SQL脚本以進行</span>批次作業,我們也可以編一套JavaScript或Python脚本在MySQL Shell 執行批次作業,範例如下:</span><br />
<span style="font-family: "courier new";"><br />
建立一個名為Transaction-sample.js 的脚本, 這個脚本會執行1000次迴圈,每個迴圈插入5個JSON文件,每個迴圈都是一個交易,也就是一個易交提交5個JSON文件<br />
</span><br />
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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]--> <br />
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">匯入</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysqlx</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">模組</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">組區域變數</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">-mysqlx</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">指向</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysqlx</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">物件</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">由</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysqlx</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">的</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">getSession</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">函式建立資料</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">庫連線</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">var mysqlx = require('mysqlx').mysqlx;</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">// </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">建立資料庫連線</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">var session = mysqlx.getSession( {</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>host: 'localhost', port: 33060,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>dbUser: 'root', dbPassword: '>password<<password>' } );</password></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">// </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">移到</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">my_test schema</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">var db = session.getSchema('my_test');</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">// </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">在</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">my_test schema</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">之下建立一個新的</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> collection – mycollection, </span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">如果該</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">collection</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">在此之前己存在則先</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">drop</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">它</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">session.dropCollection('my_test','mycollection');</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">db.createCollection('mycollection');</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">取一個</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">collection</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">物件</span><span lang="ZH-HK" style="font-family: "courier new"; font-size: 10.0pt;"> </span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">– myColl,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">各</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">JSON</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">文件均以其</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">add</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">函式加入</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">collection</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">該中</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">var myColl = db.getCollection('mycollection');</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">var iter;</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">// </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">迴圈運行</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">1000</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">次</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">每次先以</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">session.startTransaction()</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">定事務的起始點</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">// </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">迴圈插入</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">5</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">個文件</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">如果運行中間有錯誤或被強制中斷</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">之前提交的交易會存在資料庫中</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">做到中間的交易會回滾</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">所以</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">collection</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">中存在的文件數</span><span style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">目</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">會是</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">5</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">的倍數</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">(</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">實現易交易的資料完整性</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">),</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">由此證明</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">X Dav API</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">是支持交易和數據完整性的</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">// </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">最後以</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">session.commit()</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">結束並提交交易</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">try { </span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>for (iter = 0; iter < 1000; iter++) {</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>session.startTransaction();</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>myColl.add({name: 'Sunny', age: 23, height: 1.3, weight: 73.3}).execute();</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>myColl.add({name: 'Albert', age: 24, height: 1.4, weight: 74.3}).execute();</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>myColl.add({name: 'Bred', age: 25, height: 1.5, weight: 75.3}).execute();</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>myColl.add({name: 'Connie', age: 26, height: 1.6, weight: 76.3}).execute();</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>myColl.add({name: 'David', age: 27, height: 1.7, weight: 77.3}).execute();</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>// Commit the transaction if everything went well</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>session.commit();</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>print('Data inserted successfully.\n');</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">}</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">catch (err) {</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>// </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">如果有錯誤</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">則回滾未完成的交易</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>session.rollback();</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>// Printing the error message</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>print('Data could not be inserted: ' + err.message);</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">}</span></div>
<!--[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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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.0pt;
font-family:"Courier New";}
</style> <![endif]--></div>
<div>
<span style="font-family: "courier new";"><br />
將上列脚本送到MySQL Shell執行,結果如下:</span></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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.0pt;
font-family:"Courier New";}
</style> <![endif]--> </span><br />
<div class="MsoNormal" style="tab-stops: 14.2pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">$ mysqlsh -f transaction-sample.js</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal" style="tab-stops: 14.2pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Data inserted successfully.</span></span></div>
<div class="MsoNormal" style="tab-stops: 14.2pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Data inserted successfully.</span></span></div>
<div class="MsoNormal" style="tab-stops: 14.2pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">…</span></span></div>
<div class="MsoNormal" style="tab-stops: 14.2pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Data inserted successfully.</span></span></div>
<div class="MsoNormal" style="tab-stops: 14.2pt;">
<span style="font-family: "courier new";"><br /></span></div>
<span style="font-family: "courier new";"> 最後會出現1000次Data inserted successfully。<br />
登入查看執行的結果:</span></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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.0pt;
font-family:"Courier New";}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql-js> db.mycollection.find()</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">[</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>{</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"_id": "ffe5ac80c362d2114072b86b2339c6c8",</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"age": 24,</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"height": 1.4,</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"name": "Albert",</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"weight": 74.3</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>},</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>{</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"_id": "fffaab7ec362d2114072b86b2339c6c8",</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"age": 27,</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"height": 1.7,</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"name": "David",</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>"weight": 77.3</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>}</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">…</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">]</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">5000 documents in set (0.00 sec)</span></span></div>
<span style="font-family: "courier new";"> </span></div>
<div>
<span style="font-family: "courier new";"><br />
上列範例中建資料庫連線不是用Connection物件,而是Session物件,在Connection之上引進Session的概念,這也透露著X Dav API將朝向支援一個Session可能包含多個Connection,每個Connection分別連到不同的資料庫,而能支援資料庫分片(data shard)的方向發展<br />
</span><br />
<span style="font-family: "courier new";"><br /></span>
<br />
<h3>
<span style="font-family: "courier new";">Connector實施X Dav API支援多種應用程式以JSON和MySQL互動</span></h3>
<span style="font-family: "courier new";">文行到此,整份MySQL as a Document Store的技術拼圖只剩最後一片- 應用層能透過X Protocol,執行CRUD的函式,直接操作位於資料庫內的JSON文件。如下圖4.所示,MySQL在各種新版本的應用程式連結器(包括Connector/J, Connectior/NET, Connectior/C++等)加上了新的支援X protocol的模組,以,讓應用程式能直接調用這些模組中實現X Dav API的介面的函式,透過X protocol直接使用和更新資料庫的JSON文件。這些連結器還在持續完善中,目前支援X Protocol的連結器有Connector/J,Connector/Python,Connector/NET,Connector/C++ 和Connector/Nodejs.</span></div>
<div>
<span style="font-family: "courier new";"></span></div>
<div>
<span style="font-family: "courier new";"><br />
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "courier new";"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIMqEc3LAiBqLjnqc-WDEpdoyAtporJ6j5S1S9hoq2cMKtz4r-t8eiOVREdia9yzfdNlS_MyCh4dWDF-Q8h6els_PZEupyQQaQ6fJGkbvzKlasP_oOaf6sX5XNL1y1LToGCRMFmzgp8Oiv/s1600/image10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIMqEc3LAiBqLjnqc-WDEpdoyAtporJ6j5S1S9hoq2cMKtz4r-t8eiOVREdia9yzfdNlS_MyCh4dWDF-Q8h6els_PZEupyQQaQ6fJGkbvzKlasP_oOaf6sX5XNL1y1LToGCRMFmzgp8Oiv/s640/image10.png" width="640" /></a></span></div>
<span style="font-family: "courier new";"> <br />
本文的範例以一個Java應用程式 - MySQLStore.java(該Java程式會插入三個JSON文件到mycollection中,並找出name為”Sakila”,age小於20的犬文件,並列示出來)為您演示如何使用Connector/J的X Dav API接口。以下列範例說明這個Java程式的開發和執行環境的準備步驟,供您參考。</span></div>
<div>
<ul>
<li><span style="font-family: "courier new";">準備JSON文件資料庫的Java開發環境</span></li>
</ul>
<span style="font-family: "courier new";">要開發及執行MySQLStore Java程式除了要有JDK,還要在合適的Java驅動器,Connector/J 6.0以後的版本才能支援JSON文件資料庫,能要到MySQL的軟體下載網頁(網址是dev.mysql.com/downloads/Connector/J/),點選”Development Releases”頁籤,才能找到Connector/J 6.0.x版的.jar包。下載這裡的壓縮檔後做這三個動作後,基本上就完成了開發環境的準備了。</span><br />
<span style="font-family: "courier new";"> - 解壓縮該檔案</span><br />
<span style="font-family: "courier new";"> - 找到mysql-connector-java-6.0.x<x>-bin.jar</x></span><br />
<span style="font-family: "courier new";"> - 並將這個Java .jar文件的位置加到操作系統環境變量 – CLASSPATH,或在Java IDE中加上一個程式庫給這個.jar上檔</span><br />
<ul>
<li><span style="font-family: "courier new";">MySQL 文件資料應用的Java程式</span></li>
</ul>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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.0pt;
font-family:"Courier New";}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">package mysqldocstore;</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">import com.mysql.cj.api.x.*;</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">import com.mysql.cj.x.MysqlxSessionFactory;</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">import com.mysql.cj.x.json.*; </span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">以上</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">import</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">的三個</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">package/class</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">都是</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">MySQL Connetor/J 6.0.x </span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">所新增的</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">public class MySQLdocStore {</span></span></div>
<div class="MsoNormal" style="text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">public static void main(String[] args) {</span></span></div>
<div class="MsoNormal" style="margin-left: 48.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">String url = "mysqlx://localhost:33060/my_test?user=itu&password=<password>";</password></span></span></div>
<div class="MsoNormal" style="margin-left: 49.55pt; mso-para-margin-left: 4.13gd; tab-stops: 7.1pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">通過</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysqlx</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">建立資料庫對話</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">(Session)</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">物件</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: , serif; font-size: 13.3333px;">資料</span>庫主機位於</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">localhost</span></span></div>
<div class="MsoNormal" style="margin-left: 49.55pt; mso-para-margin-left: 4.13gd; tab-stops: 7.1pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;"><span style="font-family: , serif; font-size: 13.3333px;">資料</span>庫聽</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">33060</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">端口</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">用戶名為</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">itu,schema</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">為</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">my_test(</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">可不在</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">URI</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">指定</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Schema)</span></span></div>
<div class="MsoNormal" style="margin-left: 48.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">XSession mySession = new MysqlxSessionFactory().getSession(url);</span></span></div>
<div class="MsoNormal" style="margin-left: 48.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">開啟一個交易</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mySession.startTransaction();</span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">將位置移到</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">your_test schema</span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Schema myDb = mySession.getSchema("your_test");</span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">找一個名為</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mycollection</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">的</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"> Collection,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">並以</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">myColl</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">變易數指向該物件</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Collection myColl = myDb.getCollection("mycollection");</span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">插入三個</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">JSON</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">文件</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">myColl.add("{\"name\":\"Sakila\", \"age\":15}").execute();</span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">myColl.add("{\"name\":\"Susanne\", \"age\":24}").execute();</span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">myColl.add("{\"name\":\"Mike\", \"age\":39}").execute();</span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">提交交易</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mySession.commit();</span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">在</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mycolleciton</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">中找文件</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">條件是</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">name</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">含</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">’Sakila’</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">字串</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">且</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">age</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">小於</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">20</span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">DocResult docs = myColl.find(name like :name AND age < :age").bind("name", "Sakila").bind("age", 20).execute();</span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">取出查出的文件以</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">doc</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">變數指向該物件</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">如果找不到符合條件的文件</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">,</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">則返回</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">NULL</span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">DbDoc doc = docs.fetchOne();</span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">//</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">列示查到的</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">JSON</span><span lang="ZH-HK" style="font-family: "新細明體" , "serif"; font-size: 10.0pt;">文件</span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"></span></span></div>
<div class="MsoNormal" style="margin-left: 24.0pt; text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">System.out.println("Age below 20 is "+doc);</span></span></div>
<div class="MsoNormal" style="text-indent: 24.0pt;">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">}</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">}</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<ul>
<li><span style="font-family: "courier new";">執行結果,由於我將MySQLdocStore.class和msql-connector-java-6.0.x<x>-bin.jar包在jar包中以方便佈署,所以執行時要指定MySQLdocStore.jar。執行後,在資料庫會插入三個JSON文件,最後列示一個JSON文件,其age物件的值小於20。</x></span></li>
</ul>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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.0pt;
font-family:"Courier New";}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">$ java –jar MySQLdocStore.jar</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">Age below 20 is {</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"_id" : "bb8c3bf0242a44a0a49767e3dcee7cc9",</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"age" : 15,</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"name" : "Sakila"</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">}</span></span></div>
</div>
<div>
<ul>
<li><span style="font-family: "courier new";">在MySQL Shell查看mycollection Collection,可看到在mycollection中有三個JSON文件,都是在MySQLdocStore.class程式插入的。</span></li>
</ul>
<span style="font-family: "courier new";"> </span><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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]--> <br />
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql-js> db.mycollection.find();</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">[</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">{</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"_id": "2f5a69049e0744f4b1f3abd9bbbbd2dd",</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"age": 39,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"name": "Mike"</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">},</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">{</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"_id": "bb8c3bf0242a44a0a49767e3dcee7cc9",</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"age": 15,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"name": "Sakila"</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">},</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">{</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"_id": "d9d3e1c86a3643be93e65ac1981c659f",</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"age": 24,</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">"name": "Susanne"</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">}</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">]</span></div>
<div class="MsoListParagraph" style="margin-left: 39.25pt; mso-list: l0 level1 lfo1; mso-para-margin-left: 0gd; text-indent: -18.0pt;">
<span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;"><span style="mso-list: Ignore;">3<span style="font: 7.0pt "Times New Roman";"> </span></span></span><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">documents in set (0.00 sec)</span></div>
<!--[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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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.0pt;
font-family:"Courier New";}
</style> <![endif]--><br />
<br />
<ul>
<li><span style="font-family: "courier new";"> 由SQL介面查mycollection表,也可在mycollection表中看到含有個JSON文件的行。</span></li>
</ul>
<br />
<span style="font-family: "courier new";"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <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-TW</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="--"/> <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="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" 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]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
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.0pt;
font-family:"Courier New";}
</style> <![endif]--> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">mysql> select * from mycollection\G</span></span></div>
<span style="font-family: "courier new";"> </span><br />
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">*************************** 1. row ***************************</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">doc: {"_id": "2f5a69049e0744f4b1f3abd9bbbbd2dd", "age": 39, "name": "Mike"}</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">_id: 2f5a69049e0744f4b1f3abd9bbbbd2dd</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">*************************** 2. row ***************************</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">doc: {"_id": "bb8c3bf0242a44a0a49767e3dcee7cc9", "age": 15, "name": "Sakila"}</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">_id: bb8c3bf0242a44a0a49767e3dcee7cc9</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">*************************** 3. row ***************************</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">doc: {"_id": "d9d3e1c86a3643be93e65ac1981c659f", "age": 24, "name": "Susanne"}</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">_id: d9d3e1c86a3643be93e65ac1981c659f</span></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new";"><span lang="EN-US" style="font-family: "courier new"; font-size: 10.0pt;">3 rows in set (0.00 sec)</span></span></div>
</div>
<div>
<h3>
<span style="font-family: "courier new";">結論</span></h3>
<span style="font-family: "courier new";">我認為MySQL成為JSON文件資料庫是MySQL近年來最重要的創新之一,這套技術促成了MySQL將NoSQL和關聯資料庫的優勢融於一爐,讓廣大的MySQL用戶</span><span style="font-family: "courier new";">不需要引另外一套資料庫就</span><span style="font-family: "courier new";">能在擁抱新的NoSQL技術,因而也不需磨合陌生的新技術。用戶可在他們己經熟悉的MySQL上以Schema less資料結搆支援Dev/Ops的開發方法,以加速應用面市的速度,滿足應用業務上占得市場先機同時,又能享有關聯式資料庫己經很成熟的資料完整性、支援交易、MVCC(多版本并行控制)和崩潰回復的優點。另一方面DBA們也能使用和原來MySQL同樣的工具為資料庫做備份、調優、監控和安控管制。MySQL這項與時俱進的發展使得MySQL所有的從業人員都能輕鬆因應IT大環境的改變。讓MySQL應用開發者、DBA和應用業務擁有者都能同蒙其利。</span><br />
<span style="font-family: "courier new";">
事實上,MySQL除了上述由資料庫核心到MySQL Shell工具和各種應用的Connector上推出支援JSON的功外,我們還需要在應用開發環境上提供更豐富的Framework,以進一步使MySQL的開發者能快速而方便的開發應用。由於許多Connector的技術(例如Java, Node.js等)己經有很多現成的Framework支援JSON,使得我們在這方面的發展有了扎實的基礎。例如使用Node.js的開發者或許知道(或用過)MEAN Framework (MongoDB, Express, Angular.js, Node.js),它能使開發者以更有效率、更容易的開發網頁應用。經過Connector/Node.js開發人員的努力, 現在MySQL也支援MEAN Framework,只是這是組合是MySQL, Ecpress, Angular.js, Node.js了(相關訊息和實作範例可參考http://insidemysql.com/develop-by-example-document-store-working-with-express-js-angularjs-and-node-js/),相信隨著MySQL as a document store的功能持續的完善,將有更多的Framework和IDE(整合開發環境)會支援這個技術堆疊,或許我們會LAMP風潮之后為IT界來另一波高潮。</span><br />
<div class="MsoNormal" style="margin-left: 24.0pt;">
<br /></div>
<br /></div>
杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-55151248018163738832017-01-16T01:17:00.000-08:002017-01-16T01:39:36.587-08:00MySQL 支援JSON文件面面觀(之一)<h4>
- 詳解新世代MySQL如何支持NoSQL應用開發</h4>
<br />
MySQL面世了20多年,在大家的認知中它都是一個關聯式資料庫,但是從2016年起MySQL有了一個革命性的變化-它除了是一個說SQL語言的關聯式資料庫,它也學會了第二種語言-JSON,它現在也是一個NoSQL文件型資料庫。<br />
<br />
大約在兩年前,Oracle的MySQL產品部門體認到了當今的軟體工程正朝向雛型法,快速開發,和開發維運(DevOp)的方向發展。傳統的關聯式資料庫雖以嚴僅稱著,強調資料完整性,和透過正規化帶來查詢彈性。但相對的以較長時間更動資料架構的做法,要支援現今軟體工程的方法論,有一定程度的適用性問題。同時過度強調正規化也會因必須以多表的JOIN才能查一份完整的資料,而可能會有性能上的問題。所以MySQL決定啟動一個代碼為MySQLng (MySQL Next Generation)項目,這個工程經過橫跨資料庫核心、前端工具和連結器(Connector)部門大量的開發工程師的努力,成就各位看到的MySQL在2016年推出的以MySQL當文件儲存(MySQL as a Document Store)新功能。<br />
<br />
<h3>
MySQL的架構因此而出現的變化</h3>
<br />
MySQL在5.7.12以後就是一個完全支援JSON文件的文件型資料庫,它從資料庫核心到前端工具和支援各種前端應用技術的連結器(Connector)都出現了許多的新功能, 如下圖所示,可分成四個模組:<br />
<br />
<br />
1. 資料庫核心加了新的JSON資料型別和JSON函式<br />
<br />
2. 新加入一個名為mysqlx的插件,執行時會聽33060端口,使資料庫能透過X Protocol和X Dav API執行應用程式下達的CRUD操作<br />
<br />
3. 新的MySQL客戶端 – MySQL Shell<br />
<br />
4. 擴增多種連結器 (包括Connector/J, Connector/Python, Connector/Nodejs, Connetor/C,C++) 的功能,包裹(wrap)X Dav API,透過X Protocol能以純NoSQL方式方式對資料庫的JSON文件做操作,使整份應用的開發完全沒有SQL的影子。<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAmICMbpAYu50_zqeua6lImbn_s0cq6EhYZdFM2vjBLJVvNig3gJ-smH717dE0t9-1XYgV9bqC2SOQh3MsOGtBb7pfs3weyJ-40P-WIF5dADk_dG7u1AKuxQQDz4Nin6PO_VMAG_njyFmR/s1600/image001.jpg"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAmICMbpAYu50_zqeua6lImbn_s0cq6EhYZdFM2vjBLJVvNig3gJ-smH717dE0t9-1XYgV9bqC2SOQh3MsOGtBb7pfs3weyJ-40P-WIF5dADk_dG7u1AKuxQQDz4Nin6PO_VMAG_njyFmR/s1600/image001.jpg" /></a><br />
<br />
<br />
以下對這四個支援以MySQL當做文件存儲(MySQL as a Document Store)的模組模組特性詳細說明<br />
<h3>
資料庫核心加入了新的JSON資料型別和JSON函式</h3>
<h4>
JSON資料型別 </h4>
<br />
如下圖的1.所示,自MySQL 5.7.8起這項功能就含在MySQL中了。您可以用您熟悉的mysql客戶端程式登入資料庫,建一個有JSON欄位的表,再將JSON文件到插入這個欄位,具體的範例如下所示。JSON欄位是以binary為基礎再於欄位頭加上文件中各物件的位移(offset),如此能讓MySQL能快速的找到查詢所指定的物件。<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDRnIt6wbQCRGBpBytjL5jypNtVO0bk4HnqYppMKaWfQyIgQCt6Kkza4EQ1fCQvGEt2zLohyphenhyphenZakvZ__tEyZoVFdUGhs3fl31QPNClBsHdCZboUhNqHVIyOUG4GdSz4FJjGWPdSrKgejMRw/s1600/NoSQL2.png"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDRnIt6wbQCRGBpBytjL5jypNtVO0bk4HnqYppMKaWfQyIgQCt6Kkza4EQ1fCQvGEt2zLohyphenhyphenZakvZ__tEyZoVFdUGhs3fl31QPNClBsHdCZboUhNqHVIyOUG4GdSz4FJjGWPdSrKgejMRw/s1600/NoSQL2.png" /></a><br />
<br />
### 注意:是JSON資料型別,不是text或varchar資料型別<br />
<br />
mysql> CREATE TABLE t1 (data JSON); <br />
<br />
<br />
Query OK, 0 rows affected (0.08 sec)<br />
<br />
<br />
<br />
### 以字串形式將資料插入表中,物件名稱要在引號內<br />
mysql> INSERT INTO t1(data) VALUES ('{ "series": 1}'), ('{ "series": 7}'), ('{ "series": 3}'), ('{ "series": 4}'), ('{ "series": 10}'), ('{ "series": 2}'), ('{ "series": 6}'), ('{ "series": 5}'), ('{ "series": 8}'), ('{ "series": 11}'); Query OK, 10 rows affected (0.02 sec) <br />
<br />
Records: 10 Duplicates: 0 Warnings: 0;<br />
<br />
###如果插入的不是合於JSON規範的資料會被MySQL拒絕並報錯<br />
<br />
mysql> insert into t1(data) values ('abc');<br />
ERROR 3140 (22032): Invalid JSON text: "Invalid value." at position 0 in value for column 't1.data'. <br />
mysql> insert into t1(data) values (123);<br />
ERROR 3140 (22032): Invalid JSON text: "not a JSON text, may need CAST" at position 0 in value for column 't1.data<br />
<br />
###以JSON函式指定SQL查詢的WHERE條件<br />
<br />
mysql> SELECT * FROM t1 WHERE json_extract(data,"$.series") >= 7 AND json_extract(data,"$.series") > 10;<br />
<br />
+----------------+<br />
| data |<br />
+----------------+<br />
| {"series": 7} |<br />
| {"series": 10}|<br />
| {"series": 8} |<br />
+----------------+<br />
<br />
3 rows in set (0.00 sec);<br />
<br />
23個JSON函式(隨著更新的版本推出,可能會增加更多的JSON函式以完善處理JSON文件的功能),依這些函式使用的時機可分為檢視JSON文件資訊、更改由路徑參數指定的JSON文件之內容、建立JSON文件、取出由路徑參數指定部份的JSON文件內容、和輔助性函式等五類。 <br />
<br />
<h4>
JSON路徑</h4>
<h4>
</h4>
由於JSON函式會以路徑(path)指定要到JSON文件中一定的位置,取出或參照部份文件的資訊,在介紹JSON函式前,我先說明路徑語法:<br />
<br />
1.在SQL命令中先要找到存放JSON文件的JSON欄位,其語法為[[database].table.]field –找到整份JSON文件 <br />
2.找到欄位後再指定路徑 – 在JSON文件中的路徑的語法如下: <br />
<br />
- $ - 代表JSON文件的根 <br />
<br />
- .<identifier amp=""> – 指定名稱,到該名稱所對應的值或物件,例如$.user-找出JSON文件中user物件或物件的值 </identifier><br />
<br />
- [array-position] –指定陣列中某一序位的內容(由0開始),例如$.user.address[1]-找到JSON文件的user物件之下的address陣列之第2個序位的地址物件 <br />
<br />
- * - 指定某一物件之下的所有成員物件,例如$user.* 代表找出JSON文件中user物件下所有的成員物件,可能包括名字,生日,及所有的地址…等 <br />
<br />
- ** - 可當成一個wild card,用法是[prefix]**suffix,prefix是選項,也就是不會以**當結尾, 例如$user**.phone指向user物件下的phone物件 <br />
<br />
- [*] – 找出陣列中所有的序位的內容 <br />
<br />
JSON path之範例將在下一段JSON_EXTRAT函式中再為您做詳細的說明<br />
<br />
<h4>
五大類JSON函式</h4>
1.檢視JSON文件的內容或屬性的JSON函式 <br />
<br />
i. JSON_VALID(val), 檢查傳入的資料是否是一個合規的JSON文件,目前是以較舊的RFC2627為標準。合規傳出1, 不合規傳出0,若傳入NULL值,則傳出的也是NULL值。這個函式能讓我們在應用中就先測試所拿到的資料是否是一個JSON文件,如果不是在應用中就能先處理。<br />
<br />
ii. JSON_TYPE(json_val[,path]),檢視指定的JSON文件或文件中的一部份(以路徑-path指向)的資料型別。這個函式的第二個參數-path在後多<br />
<br />
iii. JSON_KEYS(json_doc[,path]),傳回指定JSON文件的最上一層(或是指定路徑)的鍵值(identifier),以下範例更能說明其用途:<br />
<br />
# 文件的根之下有兩個identifier –"a"和"b"<br />
<br />
mysql> SELECT JSON_KEYS('{"a": 1, "b": {"c": 30}}');<br />
+--------------------------------------------+<br />
| JSON_KEYS('{"a": 1, "b": {"c": 30}}') |<br />
+--------------------------------------------+<br />
| ["a", "b"] |<br />
+--------------------------------------------+<br />
<br />
# 文件的"根"之下的成員"b"物件之下有一個identifier – "b"<br />
<br />
mysql> SELECT JSON_KEYS('{"a": 1, "b": {"c": 30}}', '$.b'); <br />
+----------------------------------------------------+ <br />
| JSON_KEYS('{"a": 1, "b": {"c": 30}}', '$.b') | <br />
+----------------------------------------------------+ <br />
| ["c"] | <br />
+----------------------------------------------------+<br />
<br />
iv. JSON_LENGTH(json_doc,path),<br />
<br />
傳回指定JSON文件最上一層(或是指定路徑)的成員數,例如:<br />
<br />
mysql> SELECT JSON_LENGTH('[1, 2, {"a": 3}]');<br />
+---------------------------------+<br />
| JSON_LENGTH('[1, 2, {"a": 3}]') |<br />
+---------------------------------+<br />
| 3 |<br />
+---------------------------------+<br />
<br />
mysql> SELECT JSON_LENGTH('{"a": 1, "b": {"c": 30}}');<br />
+-----------------------------------------+<br />
| JSON_LENGTH('{"a": 1, "b": {"c": 30}}') |<br />
+-----------------------------------------+<br />
| 2 |<br />
+-----------------------------------------+<br />
mysql> SELECT JSON_LENGTH('{"a": 1, "b": {"c": 30}}', '$.b');<br />
+------------------------------------------------+<br />
| JSON_LENGTH('{"a": 1, "b": {"c": 30}}', '$.b') |<br />
+------------------------------------------------+<br />
| 1 |<br />
+------------------------------------------------+<br />
<br />
v. JSON_DEPTH(json_doc),傳回指定JSON文件最大(深)的階層,例如:<br />
<br />
mysql> SELECT JSON_DEPTH('{}'), JSON_DEPTH('[]'), JSON_DEPTH('true');<br />
+------------------+------------------+--------------------+<br />
| JSON_DEPTH('{}') | JSON_DEPTH('[]') | JSON_DEPTH('true') |<br />
+------------------+------------------+--------------------+<br />
| 1 | 1 | 1 |<br />
+------------------+------------------+--------------------+<br />
<br />
mysql> SELECT JSON_DEPTH('[10, 20]'), JSON_DEPTH('[[], {}]');<br />
+------------------------+------------------------+<br />
| JSON_DEPTH('[10, 20]') | JSON_DEPTH('[[], {}]') |<br />
+------------------------+------------------------+<br />
| 2 | 2 |<br />
+------------------------+------------------------+<br />
<br />
mysql> SELECT JSON_DEPTH('[10, {"a": 20}]');<br />
+-------------------------------+<br />
| JSON_DEPTH('[10, {"a": 20}]') |<br />
+-------------------------------+<br />
| 3 |<br />
+-------------------------------+<br />
<br />
vi. JSON_CONTAINS_PATH(json_doc,one | all, path[,path…]),檢視指定的JSON文件中是否有一個或全部指定的路徑,例如:<br />
<br />
l 取出JSON文件的內容<br />
<br />
i. JSON_EXTRACT(jond_doc,path)例如:<br />
<br />
# 定一個名為j的JSON文件的mysql區域變量<br />
mysql> set @j='{"user":{"name":{"first":"abc","last":"ssss"},"salary":12234,"address":[{"street":"def","number":"ghi","phone":"5678890"},{"street":"jkl","number":"mno","phone":"565656"}]}}';<br />
<br />
#整理JSON文件的內容以階層方式排列於下:<br />
<br />
#{"user":<br />
{<br />
"name":{"first":"abc","last":"ssss"},<br />
"salary":12234,<br />
"address":<br />
[ {"street":"def","number":"ghi","phone":"5678890"},<br />
{"street":"jkl","number":"mno","phone":"565656"}<br />
]<br />
}<br />
}<br />
<br />
# 驗證變量j的內容是否是一個合規的 JSON文件<br />
<br />
mysql> select json_valid(@j);<br />
<br />
+----------------+<br />
| json_valid(@j)|<br />
+----------------+<br />
| 1 |<br />
+----------------+<br />
<br />
1 row in set (0.00 sec) <br />
<br />
查出JSON文件”根”以下的內容<br />
<br />
mysql> select json_extract(@j,'$');<br />
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+<br />
| json_extract(@j,'$') |<br />
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+<br />
| {"user": {"name": {"last": "ssss", "first": "abc"}, "salary": 12234, "address": [{"phone": "5678890", "number": "ghi", "street": "def"}, {"phone": "565656", "number": "mno", "street": "jkl"}]}} |<br />
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+<br />
<br />
# 找出位於JSON文件”根”-‘$’以下的成員”name”的內容<br />
mysql> select json_extract(@j,'$.user.name');<br />
+------------------------------------+<br />
| json_extract(@j,'$.user.name') |<br />
+------------------------------------+<br />
| {"last": "ssss", "first": "abc"} |<br />
+------------------------------------+<br />
1 row in set (0.00 sec)<br />
<br />
# 找出位於JSON文件”根”以下的成員”address”陣列所有的cell<br />
<br />
mysql> select json_extract(@j,'$.address[*]');<br />
+-----------------------------------------------------------------------------------------------------------------+<br />
| json_extract(@j,'$.address[*]') |<br />
+-----------------------------------------------------------------------------------------------------------------+<br />
| [{"phone": "5678890", "number": "ghi", "street": "def"}, {"phone": "565656", "number": "mno", "street": "jkl"}] |<br />
+------------------------------------------------------------------------------------------------------------<br />
<br />
# 找出位於JSON文件”根”以下的成員”address”陣列中位於第二位的cell<br />
<br />
mysql> select json_extract(@j,'$.address[1]');<br />
+-------------------------------------------------------+<br />
| json_extract(@j,'$.address[1]') |<br />
+-------------------------------------------------------+<br />
| {"phone": "565656", "number": "mno", "street": "jkl"} |<br />
+-------------------------------------------------------+<br />
1 row in set (0.00 sec)<br />
<br />
# 找出JSON文件位於”根”之下所有的成員,和路徑’$’不同的是,它不會列示文件的根-‘user’,而是user之下的所有成員。<br />
<br />
mysql> select json_extract(@j,'$.*');<br />
<br />
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+<br />
| json_extract(@j,'$.*') |<br />
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+<br />
| [{"name": {"last": "ssss", "first": "abc"}, "salary": 12234, "address": [{"phone": "5678890", "number": "ghi", "street": "def"}, {"phone": "565656", "number": "mno", "street": "jkl"}]}] |<br />
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+<br />
<br />
1 row in set (0.00 sec)<br />
<br />
# 找出”根”之下”user”成員中任何一個地方的成子員”last”的內容<br />
<br />
mysql> select json_extract(@j,'$.user**.last');<br />
<br />
+--------------------------------------+<br />
| json_extract(@j,'$.user**.last') |<br />
+--------------------------------------+<br />
| ["ssss"] |<br />
+--------------------------------------+<br />
<br />
1 row in set (0.00 sec) <br />
<br />
# 找出”根”之下”user”成員的”name”成員的所有內容<br />
<br />
mysql> select json_extract(@j,'$.user.name.*');<br />
+----------------------------------------+<br />
| json_extract(@j,'$.user.name.*') |<br />
+----------------------------------------+<br />
| ["ssss", "abc"] |<br />
+----------------------------------------+<br />
<br />
1 row in set (0.00 sec) <br />
<br />
# 查出JSON文件”根”的成員”user”的”salary”的資料型別,注意可以函式是可以圈套的,此處先以JSON_EXTRACT找到”slary”物件,再傳給JSON_TYPE判斷其資料型別<br />
<br />
mysql> select json_type(json_extract(@j,'$.user.salary'));<br />
+---------------------------------------------+<br />
| json_type(json_extract(@j,'$.user.salary')) |<br />
+---------------------------------------------+<br />
| INTEGER |<br />
+---------------------------------------------+<br />
<br />
1 row in set (0.00 sec) <br />
<br />
ii. JSON_SEARCH(json_doc,one or all, search_str [,escape_char[,path]…]),傳回指定的JSON文件,或由傳入的路徑指定的部份JSON文件之下,合搜索字串相符的物件所在的路徑,如果找不到和搜索字串相符的物件則傳回NULL值,範例如下:<br />
<br />
# JSON文件由”根”往下找,第一次碰到值為”abc”的位置為在根之下的陣列中第一個位置(cell) - $[0]<br />
<br />
mysql> SET @j = '["abc", [{"k": "10"}, "def"], {"x":"abc"}, {"y":"bcd"}]';<br />
<br />
mysql> SELECT JSON_SEARCH(@j, 'one', 'abc');<br />
+------------------------------------------+<br />
| JSON_SEARCH(@j, 'one', 'abc') |<br />
+------------------------------------------+<br />
| "$[0]" |<br />
+------------------------------------------+<br />
<br />
<br />
# 找出所有值為”abc”的位置,結果找到兩個,除了根之下陣列的第一個位置(cell)之外,在第二個位置(cell)的成員”x”的內容也是”abc”<br />
<br />
mysql> SELECT JSON_SEARCH(@j,'all', 'abc');<br />
+--------------------------------------+<br />
| JSON_SEARCH(@j, 'all', 'abc') |<br />
+--------------------------------------+<br />
| ["$[0]", "$[2].x"] |<br />
+--------------------------------------+<br />
<br />
mysql> SELECT JSON_SEARCH(@j, 'all', 'ghi');<br />
+--------------------------------------+<br />
| JSON_SEARCH(@j, 'all', 'ghi') |<br />
+--------------------------------------+<br />
| NULL |<br />
+--------------------------------------+<br />
<br />
iii. -> 相當於JSON_EXTRACT(),會傳出整份物件,例如有一個表mycollection的doc欄位內含JSON文件:<br />
<br />
mysql> select doc from mycollection limit 4\G<br />
*************************** 1. row ***************************<br />
doc: {"_id": "13a90b0a4af7451c9affb89dae36d5a8", "age": 15, "name": "Sakila"}<br />
*************************** 2. row ***************************<br />
doc: {"_id": "9d0eec5aa65411e6904b0a0027000003", "policy": {"mainInsured": {"coverageList": [{"item": "ULOB"}]}}}<br />
*************************** 3. row ***************************<br />
doc: {"_id": "a34efb1c3344487f90c2d0802aa92098", "age": 39, "name": "Mike"}<br />
*************************** 4. row ***************************<br />
doc: {"_id": "c8a5d26905e843dfa2fc15083f6fbd0d", "age": 24, "name": "Susanne"}<br />
<br />
# mysql> select json_extract(doc,'$.name') from mycollection limit 4\G<br />
<br />
*************************** 1. row ***************************<br />
json_extract(doc,'$.name'): "Sakila"<br />
*************************** 2. row ***************************<br />
json_extract(doc,'$.name'): NULL<br />
*************************** 3. row ***************************<br />
json_extract(doc,'$.name'): "Mike"<br />
*************************** 4. row ***************************<br />
<br />
json_extract(doc,'$.name'): "Susanne"<br />
<br />
4 rows in set (0.00 sec)<br />
<br />
# 以"->"也能行到同樣的解果:<br />
<br />
mysql> select doc->'$.name' from mycollection limit 4\G<br />
<br />
*************************** 1. row ***************************<br />
doc->$.name': "Sakila"<br />
*************************** 2. row ***************************<br />
doc->$.name': NULL<br />
<br />
*************************** 3. row ***************************<br />
doc->'$.name': "Mike"<br />
*************************** 4. row ***************************<br />
doc->'$.name': "Susanne"<br />
<br />
4 rows in set (0.00 sec) <br />
<br />
iv. ->> 等同於JSON_UNQUOTE(JSON_EXTRACT()),脫掉引號再傳回,方便我們在WHERE條件中找出某些訊息做比較,例如:<br />
<br />
mysql> select doc->'$.name' from mycollection where doc->'$.age' > 20 limit 2;<br />
<br />
+--------------------+<br />
| doc->'$.name' |<br />
+--------------------+<br />
<br />
| "Sunny" |<br />
| "John" |<br />
+--------------------+<br />
<br />
2 rows in set (0.00 sec)<br />
<br />
mysql> select doc->>'$.name' from mycollection where doc->'$.age' > 20 limit 2;<br />
+--------------------------+<br />
| doc->>'$.name' |<br />
+--------------------------+<br />
| Sunny |<br />
| John |<br />
+--------------------------+<br />
<br />
2 rows in set (0.00 sec) <br />
<br />
由於JSON_EXTRACT會傳回物件,如果是字串,會帶雙引號,必需以JSON_UNQUOTE()將雙引號移除才能用於比較運算。<br />
<br />
<br />
1. 建立JSON物件<br />
<br />
l JSON_MERGE(json_doc,json_doc[,json_doc]…), 合併多個JSON文件成為一個JSON文件,例如:<br />
<br />
l JSON_ARRAY(val[,val]…),將傳入的值做成一個JSON陣列,例如:<br />
<br />
l JSON_OBJECT(key,val[,key,val]…),將傳入的一個以上的key(或identifier)-值對做成一個JSON物件,例如:<br />
<br />
mysql> SELECT JSON_OBJECT('id', 87, 'name', 'carrot');<br />
+----------------------------------------------------+<br />
| JSON_OBJECT('id', 87, 'name', 'carrot') |<br />
+----------------------------------------------------+<br />
| {"id": 87, "name": "carrot"} |<br />
+----------------------------------------------------+ <br />
<br />
2. 更改JSON文件<br />
<br />
i. JSON_REMOVE(json_doc,path[,path]…),自文件中移除由路徑所指定的部份文件,可移除多個路徑的物件或以*及**指定多個物件,範例如下:<br />
<br />
# 自文件文中移除”根”之下的陣列中第二位置的cell<br />
<br />
mysql> SET @j = '["a", ["b", "c"], "d"]';<br />
mysql> SELECT JSON_REMOVE(@j, '$[1]');<br />
+------------------------------------+<br />
| JSON_REMOVE(@j, '$[1]') |<br />
+------------------------------------+<br />
| ["a", "d"] |<br />
+------------------------------------+<br />
<br />
ii. JSON_APPEND(json_doc,path,val[,path,val]…), 在指定的陣列之後再加上所輸入的值,傳回加上該值後的JSON文件<br />
<br />
iii. JSON_SET(json_doc,path,val[,path,val]…),在指定的路徑沒有值時加上輸入的值,或指定的路徑有值時以輸入的值更之,並傳回加上或更新值後的JSON文件,如果如果文件中沒法定位該路徑,則傳回NULL值,<br />
<br />
iv. JSON_INSERT(),在指定的路徑加上輸入的值, 並傳回加上或更新值後的JSON文件,如果指定的路徑己經有值則不做任何更改<br />
<br />
v. JSON_REPLACE(),更新指定的路徑的值,並傳回加上或更新值後的JSON文件,如果找不到指定路徑,則不做任何更改<br />
<br />
以上三個函式的範例下:<br />
<br />
# 文件中位於’$.a’路徑的值原來為1,沒有’$.c’路徑;JSON_SET(@j, '$.a', 10, '$.c', '[true, false]')指定將路徑’$.a’的值改為10,在文件”根”之下加一個路徑為’$.c’,值為[true,false]的陣列<br />
<br />
mysql> SET @j = '{ "a": 1, "b": [2, 3]}';<br />
mysql> SELECT JSON_SET(@j, '$.a', 10, '$.c', '[true, false]');<br />
+-----------------------------------------------------------+<br />
| JSON_SET(@j, '$.a', 10, '$.c', '[true, false]') |<br />
+-----------------------------------------------------------+<br />
| {"a": 10, "b": [2, 3], "c": "[true, false]"} |<br />
+-----------------------------------------------------------+ <br />
<br />
<br />
# 文件中位於’$.a’路徑己有值,文件”根”之下沒有路徑’$.c’, JSON_INSERT(@j, '$.a', 10, '$.c', '[true, false]')不會改變文件路徑’$.a’的值,而會在文件的”根”之下插入一個陣列identifier “c”,其值為輸入的陣列<br />
<br />
#文件中位於’$.a’路徑原來的值為1,文件”根”之下沒有路徑’$.c’, JSON_REPLACE(@j, '$.a', 10, '$.c', '[true, false]')會以10替換在文件根之下indetifier ‘a’的值,不會在文件的”根”之下插入identifier “c”以及該函式所指定的陣列<br />
<br />
mysql> SELECT JSON_REPLACE(@j, '$.a', 10, '$.c', '[true, false]');<br />
+-------------------------------------------------------------------+<br />
| JSON_REPLACE(@j, '$.a', 10, '$.c', '[true, false]') |<br />
+-------------------------------------------------------------------+<br />
| {"a": 10, "b": [2, 3]} |<br />
+-------------------------------------------------------------------+<br />
<br />
l 輔助性的函式<br />
<br />
i. JSON_QUOTE(json_val),如果參數是一個字串或數值,則在其前後加上雙引號 - “使它成為JSON物件,如果字串中後有引號,則傳回的結果中會在前後加上一跳脫碼\,再加上雙引號,例如:<br />
<br />
mysql> SELECT JSON_QUOTE('null'), JSON_QUOTE('"null"');<br />
+--------------------+----------------------+<br />
| JSON_QUOTE('null') | JSON_QUOTE('"null"') |<br />
+--------------------+----------------------+<br />
| "null" | "\"null\"" |<br />
+--------------------+----------------------+<br />
mysql> SELECT JSON_QUOTE('[1, 2, 3]');<br />
+-------------------------+<br />
| JSON_QUOTE('[1, 2, 3]') |<br />
+-------------------------+<br />
| "[1, 2, 3]" |<br />
+-------------------------+ <br />
<br />
ii. JSON_UNQUOTE(val),脫掉只傳回的結果只取物件的內容值,例如:<br />
<br />
mysql> SET @j = '"abc"';<br />
mysql> SELECT @j, JSON_UNQUOTE(@j);<br />
+-------+------------------+<br />
| @j | JSON_UNQUOTE(@j) |<br />
+-------+------------------+<br />
| "abc" | abc |<br />
+-------+------------------+<br />
<br />
4. JOSN函式可以靈活的應用在處理於表中存JSON文件的各種場景,本文以建表時自JSON文件中找出指定的資料,和以指定以兩個表的JSON文件內的值做JOIN並更新表中的JSON文件為範例說明JSON函式的運用。<br />
<br />
l 在JSON文件建虛擬欄位和索引以加強性能<br />
<br />
在文件型資料庫中一堆JSON文件的集稱之為Collection(本文暫譯為“集”),在MySQL則以表對應collection,存放一堆文入。然而要如何在一堆JSON文件中快速找到符合查詢條件的那幾個文件(條件還要以JSON函式到文件中找出的值來比對)?這得靠 5.7版所提供的虛擬欄位,我們甚至可以用虛擬欄位所建的索引,使查詢能速定位到符合條的JSON文件上,再以JSON函式自文件中取出查詢所指定的資料。這也是X Protocol對Collection查詢,時資料庫在底層的InnoDB引擎中實現的過程。以下範例說明這個做法:<br />
<br />
# 建一個表 – t1,內含一個JSON欄位,和一個虛擬欄位 – id,而 id的值是經由JSON_EXTRACT函式算出的,”STORED”運算元指定它的值實際存放在表中,是佔用空間的欄位,由於我們把主鍵加在這個虛擬欄位,它必需為STORED.<br />
<br />
CREATE TABLE t1<br />
(data JSON, id INT AS (JSON_EXTRACT(data,”$.id”)) STORED,<br />
PRIMARY KEY(id)); <br />
<br />
#如果加上的是非主鍵,則可定為不佔空間的”VIRTUL”,在下例中為該”id”虚擬欄位加上索引時會自每一行的存效”data”欄位的JSON文件中找出各文件的”根”之下的”series”成員的值,將這個值加到索引的B+樹的節點上,也就是表不實際存id的值,但是索引”id_idx”的節點會存各文件的”series”成員的值<br />
<br />
ALTER TABLE t1<br />
ADD COLUMN series INT AS (JSON_EXTRACT(data, "$.series")),<br />
ADD INDEX series_idx (series); <br />
<br />
# 查詢的WHERE條件以函式”JSON_EXTRACT”找出各行”data”欄位的JSON文件中的”series”成員的值來比對是否在3和5之間<br />
<br />
SELECT data, series FROM t1 WHERE<br />
JSON_EXTRACT(data,"$.series") BETWEEN 3 AND 5;<br />
series BETWEEN 3 AND 5; <br />
<br />
# 傳回的結果如下:<br />
<br />
+------------------------------------+----+<br />
| data | series |<br />
+------------------------------------+----+<br />
| {"series": 3, "inverted": 8} | 3 |<br />
| {"series": 4, "inverted": 7} | 4 |<br />
| {"series": 5, "inverted": 6} | 5 |<br />
+------------------------------------+----+ <br />
<br />
# 由於JSON_EXTRACT(data,"$.series")的值都存在於索引”series_idx”,所以MySQL的優化器能利用該索引快速找到符合條件的JSON文件是位於那些行(這點可由EXPLAIN該SQL的產出證明)。這種以函式索引支援查詢是5.7版才出現的新功能。<br />
<br />
mysql> EXPLAIN SELECT data FROM t1 WHERE JSON_EXTRACT(data,"$.series") BETWEEN 3 AND 5 <br />
<br />
#傳回的結果如下:<br />
<br />
+----+----------------+--------+---------------+--------+…+------------------------------+<br />
| id | select_type | table | partitions | type | | Extra |<br />
+----+----------------+--------+---------------+--------+…+------------------------------+<br />
| 1 | SIMPLE | t1 | NULL | range | | Using index condition |<br />
+----+----------------+--------+---------------+--------+…+------------------------------+ <br />
<br />
上列SQL命令相當於直接在查詢的WHERE子句將series欄位當成搜尋條件<br />
<br />
select `test`.`t1`.`data` AS `data` from `test`.`t1` where (`test`.`t1`.`series` between 3 and 5) <br />
<br />
l 以JSON函式更新文件和做JOIN的條件:<br />
<br />
#下列 t1和t2表都有一個名為data的JSON欄位,我們想找出t1表中所有JSON文件”根”之下”series”成員的值和在t2表的JSON文件之”根”之下物件”b_series”陣列中第一個位置(cell)之值相等的行,並將該行的JSON文件的”根”之下名為”inverted”的物件的值改為11-‘t2表的JSON文件之”根”之下”b_series”陣列中第一個位置(cell)的值’,則更新資料的SQL命令如下:<br />
<br />
UPDATE t1, t2 <br />
SET t1.data= JSON_INSERT(t1.data,"$.inverted", 11 – JSON_EXTRACT(t2.data,"$.b_series[0]")) <br />
WHERE <br />
JSON_EXTRACT(t1.data, "$.series") = JSON_EXTRACT(t2.data,"$.b_series[0]"); <br />
<br />
由以上的說明顯示,MySQL加上了JSON資料型別和23個JOSN函式,使我們能透過傳統的SQL介面完整的操作JSON文件,並享有透過索引加快查詢的性能。同時由於能將JSON文件存於InnoDB表中,原來關聯式資料庫所有的支援事務,多版本併行控制(MVCC),以及備份監控等功能均能完整保留,另一方面資料庫管理師也不需另外適應一套新的資料庫技術。讓MySQL的用戶可以同時保有關聯式資料庫的嚴謹性,又能擁抱NoSQL技術的彈性和JSON文件不需要做JOIN,就能查出滿足應用的需求的VIEW所帶來的性能提升。<br />
然而,MySQL還不僅止於此,MySQL更進一步為我們提供一套全新的NoSQL介面 – X Protocol,使我們能以純NoSQL的技術開發新的應用。至於如何用X Protocol讓應用程式和使用者的介面—MySQL Shell直接存取資料庫中的JSON文件。我將在下一篇文章為各位分享。有興趣的朋友們敬請期待。<br />
<br />杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-21052447706761537752015-10-15T01:49:00.001-07:002015-10-15T01:53:45.242-07:00Install and configure MySQL Group ReplicationMySQL Group Replication是MySQL家族中最新的成員,它的功能是使不同MySQL伺服器之間能做到不損失資料的主主複製,同時支援寫的高可用。雖然MySQL Group Replication目前還沒有正式發行,在labs.mysql.com己經可以下載和試用。MySQL Group Replication 的架構如下圖所示,架在TCP和Corosync之上,所以要安裝它必須先有Corosync在伺服器之上,MySQL之上再跑複製。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj46W3H_6noGCwAMEn2CoXZmimmDvFbkk2fptEcfaB8HO1UjJ60a_rn8IMCgiI6aaywXtlnRUttbUhJeeipzuvAlAEjaDM4-C2O7kq_3kw18z5w2DS2fIAs3MtidqwPgKF2sOyzADn7qzj/s1600/gcs-block-diagram-stack.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj46W3H_6noGCwAMEn2CoXZmimmDvFbkk2fptEcfaB8HO1UjJ60a_rn8IMCgiI6aaywXtlnRUttbUhJeeipzuvAlAEjaDM4-C2O7kq_3kw18z5w2DS2fIAs3MtidqwPgKF2sOyzADn7qzj/s320/gcs-block-diagram-stack.png" width="320" /></a></div>
這裡先為各位說明Corosync的安裝,再<br />
<br />
<ol>
<li>安裝 corosync (以Ubuntu為例)的步驟:</li>
</ol>
<ul>
<li>安裝Corosync</li>
</ul>
$ sudo apt-get install corosync corosync-dev<br />
<ul>
<li> 設定Corosync</li>
</ul>
$ sudo mv /etc/corosync/corosync.conf.example /etc/corosync/corosync.conf <br />
$ sudo vi /etc/corosync/corosync.conf<br />
<ul>
<li> Corosync的設定檔的內容如下:</li>
</ul>
crypto_cipher: aes128<br />
crypto_hash: sha256<br />
...<br />
interface {<br />
…<br />
ringnumber: 0<br />
…<br />
bindnetaddr: 127.0.0.1<br />
…<br />
mcastaddr: 226.94.1.1 # 此二配置的實際值要問您的網路管理員<br />
mcastport: 5405<br />
<br />
<ul>
<li>編UIDGID檔指定用那個帳戶執行Corosync,且放到/etc/corosync/uidgid.d,</li>
</ul>
$ vi uidgid<br />
內容如下:<br />
<br />
uidgid {<br />
uid: <username><username></username></username><br />
gid: <groupnme><groupname></groupname></groupnme><br />
}<br />
<ul>
<li>將UIDGID檔抄到/etc/corosync之下</li>
</ul>
$ sudo mv udigid /etc/corosync/uidgid.d<br />
<ul>
<li>指定在開機時將Corosync啟動<br />
</li>
</ul>
$ sudo vi /etc/default/corosync<br />
<br />
START=yes<br />
<br />
<ul>
<li>開啟Corosync</li>
</ul>
$ sudo service corosync start<br />
$ sudo service corosync status<br />
$ corosync-cfgtool -s # 檢查corosync的狀況<br />
<br />
2. 安裝和設定MySQL databases以及group replication<br />
<br />
<ul>
<li>安裝database(加入group replication 的MySQL instance都要做),必須使用5.7.8版以後的MySQL,同時將自labs.mysql.com所下載的group_replication.so放到lib/plugin之下</li>
</ul>
<ul>
<li>5.7以後的MySQL不用mysql_install_db,必須用mysqld來初始化datadir, 且設定SSL的認證檔。初始化mysqld會在畫面上顯示一個隨機産的的密碼,一定要記下來,它是您第一次登入MySQL時所用的密碼</li>
</ul>
$ ./bin/mysqld --no-defaults --user=$USER --initialize --explicit_defaults_for_timestamp --basedir=. --datadir=./data<br />
$ ./bin/mysql_ssl_rsa_setup –basedir=. --datadir=./data<br />
<br />
<ul>
<li>編輯my.cnf,重點是binlog-format必須設為row,且GTID要開啟,另外要指定group_replication plugin的程式庫和設定transaction-write-set-extraction=MURMUR32。my.cnf的配置如下:</li>
</ul>
[mysqld] <br />
log-bin<br />
binlog-format=row # binlog format need to be set to row <br />
basedir=. <br />
datadir=./data <br />
gtid-mode=on # need to turn on gtid <br />
enforce-gtid-consistency <br />
log-slave-updates <br />
master-info-repository=TABLE # need setting master and relay log status repository to TABLE<br />
relay-log-info-repository=TABLE <br />
transaction-write-set-extraction=MURMUR32 # need to set to MURMUR32<br />
binlog-checksum=NON # no binlog checksum<br />
socket=<path-to-sock-folder>/mysql.sock </path-to-sock-folder><br />
server-id=1 <br />
plugin-load=group_replication.so # assign plugin library<br />
<br />
<ul>
<li>開mysqld和更改在初始化所産生的密碼(必須更改,因為初始化密碼只能用一次就過期了)</li>
</ul>
$ ./bin/mysqld –defaults-file=./my.cnf &<br />
$ ./bin/mysqladmin -u root -h 127.0.0.1 -P 13001 -p password "<password>"</password><br />
在此回應以mysqld初始化時所産生的密碼<br />
<br />
<ul>
<li>建複製所用的帳戶:</li>
</ul>
server1> CREATE USER 'rpl_user'@'%' IDENTIFIED BY 'rpl_pass';<br />
server1> GRANT REPLICATION SLAVE ON *.* TO rpl_user@'%';<br />
<ul>
<li>設定複製,指定任一個UUID給group_replication_name</li>
</ul>
server1> SET GLOBAL group_replication_group_name= "8a94f357-aab4-11df-86ab-c80aa9429562";<br />
server1> SET GLOBAL group_replication_recovery_user='rpl_user';<br />
server1> SET GLOBAL group_replication_recovery_password='<password>';</password><br />
server1> SET GLOBAL group_replication_recovery_retry_count= 2;<br />
<br />
<ul>
<li>開啟oup replication</li>
</ul>
server1> start group_replication;<br />
<ul>
<li>以上步驟只要在第一個MySQL instance做一次即可,其他的MySQL instance不需做</li>
</ul>
<ul>
<li>檢group replication 的狀況:</li>
</ul>
server1> SELECT * FROM performance_schema.replication_connection_status\G<br />
<br />
<ul>
<li>檢查group member:</li>
</ul>
server1> SELECT * FROM performance_schema.replication_group_members\G<br />
<ul>
<li>每個group replication members都要做:</li>
</ul>
server1> SET GLOBAL group_replication_group_name= "8a94f357-aab4-11df-86ab-c80aa9429562";<br />
server1> SET GLOBAL group_replication_recovery_user='rpl_user';<br />
server1> SET GLOBAL group_replication_recovery_password='<password>';</password><br />
server1> START GROUP_REPLICATION;<br />
<br />
<ul>
<li>測試group replication:</li>
</ul>
server1> CREATE DATABASE test; <br />
server1> CREATE TABLE test.t1 (c1 INT NOT NULL PRIMARY KEY, name varchar(30)); <br />
server1> INSERT INTO test.t1 VALUES (1, 'aaaa'); <br />
<br />
server2> select * from test.t1;<br />
server2> INSERT INTO test.t1 VALUES (2, 'bbb'); <br />
<br />
server1> select * from test.t1;<br />
<ul>
<li>此時查performance_schema.replication_group_members和performance_schema.replication_connection_status可以看到兩台個MySQL instance之間會相互複製的狀況</li>
</ul>
server1> SELECT * FROM performance_schema.replication_group_members\G<br />
server1> SELECT * FROM performance_schema.replication_connection_status\G<br />
<br />
server2> SELECT * FROM performance_schema.replication_group_members\G<br />
server2> SELECT * FROM performance_schema.replication_connection_status\G<br />
<br />
<ul>
<li>當有新的成員加入group replicaiton時做以下動作</li>
</ul>
server3> SET GLOBAL group_replication_group_name= "8a94f357-aab4-11df-86ab-c80aa9429562"; <br />
server3> SET GLOBAL group_replication_recovery_user='rpl_user'; <br />
server3> SET GLOBAL group_replication_recovery_password='<password>';</password><br />
<br />
<ul>
<li>當新的MySQL instance加入group replication時,它會自動和其他的成員同步,此時該MySQL instance在查group replication status時會顯其狀況為‘RECOVERING’,此時該instance不可以做任何操作。</li>
</ul>
杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-7709022016618531412015-02-25T20:21:00.001-08:002015-02-25T20:21:18.922-08:00決定MySQL Cluster 的效能的因素 - 在韓國的PoC的經驗談過年前一星期去了趟韓國協助那裡的同事為當地的大客戶做MySQL Cluster PoC,它的情境是一自個現有跑在另一個資料庫的應用系統移植過來,測試的環境架了一個有4個data node, 3個SQL node的MySQL Cluster。原有的應用系統有許多複雜的SQL命令(有derive table,join的base table和derrived 達62個),也有的table有text格式的欄位,這兩點是我比較擔心的。果然執行這些SQL命令所需要的時間由0.x秒增加到5~6秒,而導入3萬多行到一個有text欄位的table需要2~3個小時。為此檢查這些SQL命令,發現其中有些重複的join,甚至還有些會産生cartesian product。經過以下的調優使PoC獲得還不錯的結果:<br />
<ol>
<li>調整SQL命令,排除cartesian product</li>
<li>將text欄位改成varchar格式,因為NDB會為有text欄位的table開一個隱藏的table放text欄位的資料,而使table的DML産生更多的鎖</li>
<li>使用多個SQL節點,同時每個SQL節點開多個到data node的連線(在my.cnf設ndb-cluster-connection-pool=6,在config.ini開多個[mysqld] slot)</li>
<li>在SQL node使用thread pool plugin (在my.cnf設plugin-load=thread_pool.so)</li>
<li>在config.ini以ThreadConfig參數指定各種NDB thread所使用的CPU therad,以減少CPU的content switch</li>
<li>將一些不會online更改,較小的table由NDB改為InnoDB以解決太多NDB表的Join所造成的問題(最複雜的SQL由約30個NDB的table改為15個NDB table和十多個InnoDB table)</li>
</ol>
經過這些調整,我們得到不錯的結果,例如當SQL節點數增加時,整個呑吐量近乎等比的增加,這個結果使得客戶和合作夥伴很高興,對MySQL Cluster所帶來的效能和高可用性更有信心。杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-52196652805767063702014-12-25T00:45:00.003-08:002014-12-25T00:48:29.021-08:00在Ubuntu或Debian上設定MySQL PAM authenticationMySQL 5.5.16以後可以透過PAM(以OS或ldap server的帳號+密碼)登入MySQL,詳情在<a href="http://dev.mysql.com/doc/refman/5.6/en/pam-authentication-plugin.html">參考手冊</a>有詳細的説明,但在Ubuntu或Debian上照著該方法做會有登入失敗的問題,解決之道是在<br />
<pre class="note">/etc/pam.d/mysql中改為以下幾行(如果要以作業系統的帳號登入):</pre>
<pre class="note">@include common-auth
@include common-account
@include common-session-noninteractive </pre>
<pre class="note"> </pre>
<div class="note">
另外在登入mysql時在指令中加上 ---enable-cleartext-plugin 參數或設環境變數<code class="literal"> LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN=1</code></div>
杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-33968206724990719802014-08-26T00:12:00.004-07:002014-08-26T07:44:37.527-07:00MySQL小密訣 - 如何以SQL_MODE使資料輸入更有效率: <style type="text/css">PRE { direction: ltr; color: rgb(0, 0, 0); }PRE.western { font-family: "Courier New",monospace; }PRE.cjk { font-family: "細明體","MingLiU",monospace; }PRE.ctl { font-family: "Courier New",monospace; }P { margin-bottom: 0.21cm; direction: ltr; color: rgb(0, 0, 0); }P.western { font-family: "Times New Roman",serif; font-size: 12pt; }P.cjk { font-family: "Microsoft YaHei",sans-serif; font-size: 12pt; }P.ctl { font-family: "Mangal",serif; font-size: 12pt; }</style><br />
<span style="font-family: Courier New, monospace;">透過MySQL的SQL_MODE參數可以影響MySQL的行為,使我們在輸入/匯入或更改資料時能使MySQL依我們希望的方式來處理資料.這個參數可在my.cnf或mysqld開機參數設定到整個資料庫,或在登入MySQL後以”set SQL_MODE =;”的方式臨時改變MySQL對當下的連線的行為模式.這些SQL_MODE中有指定個別特性的,也可組合性的以一個MODE代表好幾個特性的組合,同一個MySQL instance或連線可以有多個SQL_MODE組合,例如”set SQL_MODE=ANSI,NO_ENGINESUBSTITUTE,STRICT_TRANS_TABLES;”.這些MODE可以使資料操作(例如自外部系統匯入資料)更方便,相反的也可能造成使用者的混肴或對MySQL的誤解.主要的指定個別特性的SQL_MODE如下:<br /><br /><b>ALLOW_INVALID_DATES</b><br />使MySQL只會檢查月份是否在1到12之間,日期是否在1到31之間,而不會檢查整個日期的合理性,例如您想要存入前端使用者輸入的一模一樣的日期資料,而此時使用者輸入的日期是”2014-04-31”,如果沒將此SQL_MODE設起來,此值會轉成”0000-00-00”並傳出一個warning.<br /><br /><b>ANSI_QUOTES</b><br />能把“"”當成辨識字的引號就如同“`”一樣,在輸入的資料中有“字符時能使它順利輸入到MySQL.<br /><br /><b>ERROR_FOR_DIVISION_BY_ZERO</b><br />如果沒設此MODE以0當分母的算式會傳回NULL,也不會有warning.<br /><br /><b>HIGH_NOT_PRECEDENCE</b><br />運算式最前面的 “NOT”是否要優先處理,這和對舊版MySQL的向上相容有關,預設是NOT (boolean預算),若打開此MODE則NOT會加入boolean式運算的第一個運萛中<br />,以下例解釋:<br />#以下相當於NOT (1 BETWEEN -5 AND 5)<br /> mysql> SET sql_mode = '';<br /> mysql> SELECT NOT 1 BETWEEN -5 AND 5;<br /> -> 0<br />#以下相當於(NOT 1) BETWEEN -5 AND 5<br /> mysql> SET sql_mode = 'HIGH_NOT_PRECEDENCE';<br /> mysql> SELECT NOT 1 BETWEEN -5 AND 5;<br /> -> 1<br /><br /><b>IGNORE_SPACE</b><br />使funciton名和”(“間可否有空白,內建function名當成保留字,要以保留字當成辨識字必需在期前後加上引號,例如<br /> mysql> CREATE TABLE count (i INT);<br /> ERROR 1064 (42000): You have an error in your SQL syntax<br />#加上引號後:<br /> mysql> CREATE TABLE `count` (i INT);<br /> Query OK, 0 rows affected (0.00 sec)<br /><br /><b>NO_AUTO_CREATE_USER</b><br />下GRANT指令時如果指定的使用者不存在時預設會建一個新的使用者,以此mode將此功能關閉.<br /><br /><b>NO_AUTO_VALUE_ON_ZERO</b><br />在插入AUTO_INCREMENT欄位時的值為0或NULL值可產生自動跳號的值插入該欄位中,以此mode會使0值留下來而不會跳號,只有NULL值才會產生跳號值.<br /><b><br />NO_BACKSLASH_ESCAPES</b><br />如果SQL指令中的值有'\'值會和MySQL的跳脫符號衝到,以此mode可使MySQL忽略跳脫符號,將'\'當成值插入欄位中.<br /><b><br />NO_DIR_IN_CREATE</b><br />建表時忽略 INDEX DIRECTORY和DATA DIRECTORY, 當主從資料庫間的目錄位置不一樣時,在從服務器上有以此mode解決這個問題.<br /><br /><b>NO_ENGINE_SUBSTITUTION</b><br />如果沒設這個mode,建表時如果指定的storage engine不存在,會有warning,再以default storage engine來建這個表.<br /><br /><b>NO_FIELD_OPTIONS</b><br />下SHOW CREATE TABLE時不顯示MySQL特有的欄位選項,以使mysqldump產生的檔案較有可攜性.<br /><br /><b>NO_KEY_OPTIONS</b><br />下SHOW CREATE TABLE時不顯示MySQL特有的key選項,以使mysqldump產生的檔案較有可攜性.<br /><br /><b>NO_TABLE_OPTIONS</b><br />下SHOW CREATE TABLE指令時不顯示MySQL特有的table選項,以使mysqldump產生的檔案較有可攜性.</span><br />
<span style="font-family: Courier New, monospace;"><b><br />NO_UNSIGNED_SUBTRACTION</b><br />UNSIGNED整數相減預設產生不可以產生負值的結果,此mode可使結果為SIGNED(有負值).<br /><br /><b>NO_ZERO_DATE</b><br />決定日期欄是否可以為’0000-00-00’,5.6.17以後的版本此mode為deprecated.<br /><b><br />NO_ZERO_IN_DATE</b><br />決定日期欄是否可有0(日或月).<br /><b><br />ONLY_FULL_GROUP_BY</b><br />規定在SELECT命令中有GROUP BY子句時,SELECT的非總合(aggregate)欄位,HAVING清單中或ORDER BY子句中不可以有非GROUP BY子句沒有指定到的欄位.範仃如下:<br /><br /> mysql> SELECT name, address, MAX(age) FROM t GROUP BY name;<br /> ERROR 1055 (42000): 't.address' isn't in GROUP BY</span><br />
<span style="font-family: Courier New, monospace;"><br /> mysql> SELECT name, MAX(age) AS max_age FROM t GROUP BY name<br /> -> HAVING max_age < 30;<br /> Empty set (0.00 sec)<br /> ERROR 1463 (42000): Non-grouping field 'max_age' is used in HAVING clause<br />第二個例子中改寫成HAVING MAX(age)就可執行因為該欄位在aggregate function.<br /><br /><b>PAD_CHAR_TO_FULL_LENGTH</b><br />CHAR欄位中的字串長度如果不到CHAR欄位定義的長度,設此MODE可將最後面補上空白字.例子如下:<br /><br /> mysql> CREATE TABLE t1 (c1 CHAR(10));<br /> Query OK, 0 rows affected (0.37 sec)<br /><br /> mysql> INSERT INTO t1 (c1) VALUES('xy');<br /> Query OK, 1 row affected (0.01 sec)<br /><br /> mysql> SET sql_mode = '';<br /> Query OK, 0 rows affected (0.00 sec)<br /><br /> mysql> SELECT c1, CHAR_LENGTH(c1) FROM t1;<br /> +------+-----------------+<br /> | c1 | CHAR_LENGTH(c1) |<br /> +------+-----------------+<br /> | xy | 2 |<br /> +------+-----------------+<br /> 1 row in set (0.00 sec)<br /><br /> mysql> SET sql_mode = 'PAD_CHAR_TO_FULL_LENGTH';<br /> Query OK, 0 rows affected (0.00 sec)<br /><br /> mysql> SELECT c1, CHAR_LENGTH(c1) FROM t1;<br /> +------------+-----------------+<br /> | c1 | CHAR_LENGTH(c1) |<br /> +------------+-----------------+<br /> | xy | 10 |<br /> +------------+-----------------+<br /> 1 row in set (0.00 sec)<br /><br /><b>PIPES_AS_CONCAT</b><br />在後多資料庫認可以||代表字串連接,MySQL可以此Mode把||當成字串連接功能. ,而不是OR的同意字.<br /><br /><b>REAL_AS_FLOAT</b><br />把REAL當成FLOAT的同意字,沒有此設定,MySQL會將REAL當戶DOUBLE.<br /><br /><b>STRICT_ALL_TABLES</b><br />所有的storage engine,表都以strict mode處理.<br /><br /><b>STRICT_TRANS_TABLES</b><br />使交易型storage engine的表以strict mode處理.<br /><b><br />STRICT_TRANS_TABLES</b><br />如果無法將值插入一個交易型的表,則放棄此指令.對非交易型的表,如果值出現在單一指令或在多行插入指令的第一個row則放棄此指令<br /><br /><b>TRADITIONAL</b><br />當有指令有錯誤資料時,如同典型資料庫一樣會有”error”而不時只有”warning.<br /></span><br />
<h3>
<span style="font-family: Courier New, monospace;">組合的SQL Modes</span></h3>
<span style="font-family: Courier New, monospace;"><br />以下組合幾個單項Mode成為一個SQL Mode,以方便使用,目的多為增加和某些第三方的資料庫的相容性:<br /><br /><b>ANSI</b><br />目當於一起使用REAL_AS_FLOAT, PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE<br /><br /><b>DB2</b><br />目當於一起使用Equivalent to PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS, NO_TABLE_OPTIONS, NO_FIELD_OPTIONS.<br /><br /><b>MAXDB</b><br />目當於一起使用PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS, NO_TABLE_OPTIONS, NO_FIELD_OPTIONS, NO_AUTO_CREATE_USER.<br /><br /><b>MSSQL</b><br />目當於一起使用PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS, NO_TABLE_OPTIONS, NO_FIELD_OPTIONS.<br /><br /><b>MYSQL323</b><br />目當於一起使用NO_FIELD_OPTIONS, HIGH_NOT_PRECEDENCE.<br /><br /><b>MYSQL40</b><br />目當於一起使用 NO_FIELD_OPTIONS, HIGH_NOT_PRECEDENCE.<br /><br /><b>ORACLE</b><br />目當於一起使用PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS, NO_TABLE_OPTIONS, NO_FIELD_OPTIONS, NO_AUTO_CREATE_USER.<br /><br /><b>POSTGRESQL</b><br />目當於一起使用_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS, NO_TABLE_OPTIONS, NO_FIELD_OPTIONS.<br /><br /><b>TRADITIONAL</b><br />目當於一起使用STRICT_TRANS_TABLES, STRICT_ALL_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, and NO_ENGINE_SUBSTITUTION. <br /> </span>杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-4608707318061399052014-08-03T00:09:00.002-07:002014-08-03T02:47:05.777-07:00MySQL Fabric 之二-實作及示範<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0Nk_Eys1SPfKeMdGdyNgJ6yoFOQnZWJKN5H7jx0ZWhFK9OR-vK1wBcSSud7OzgO_Se_dM1GpHgig2e0u8LlBoTU7HKvQ5dmA1VaImiO81T1XU1Ph-3LIf1OCzLzhUscNumk8dfGJ02uiP/s1600/%E6%9C%AA%E5%91%BD%E5%90%8D.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0Nk_Eys1SPfKeMdGdyNgJ6yoFOQnZWJKN5H7jx0ZWhFK9OR-vK1wBcSSud7OzgO_Se_dM1GpHgig2e0u8LlBoTU7HKvQ5dmA1VaImiO81T1XU1Ph-3LIf1OCzLzhUscNumk8dfGJ02uiP/s1600/%E6%9C%AA%E5%91%BD%E5%90%8D.png" height="56" width="320" /></a></div>
<br />
在上一篇文章中”MySQL Fabric -為您的應用系統提供高可用,高擴充的資料庫”中介紹了MySQL Fabric的用途和架構,本文是為有興趣自己動手以MySQL Fabric做資料分片(Data Shar)的人所寫的,希望本文能為您說明所有的安裝和設定的細節,同時透過範例程式使您能了解如何使用MySQL Fabric所管理的MySQL 資料庫Server Farm。<br />
<br />
<h3>
<b>演示環境及配置</b></h3>
<br />
本範例的MySQL資料庫 Server Farm有6個資料庫及存放Server Farm的設定訊息之Fabric Repository的資料庫,這7個資料庫全在一個電腦上其IP都是127.0.0.1,一開始的架構如下圖所示:<br />
Fabric Repository資料庫使用的端口為3506,其他用於Server Farm的資料庫分成三個高可用組(HA Group)分別為名為gp-global的global group其唯一的資料庫使用3606 <br />
做完Fabric設定後名為gp1的分片高可用組(HA Group),其下有三個資料庫分別使用3306、3308、和3314端口<br />
名為gp2的分片高可用組,其構成的資料庫有使用3408及3406端口的資料庫。<br />
一開始時沒有gp1和gp2 HA group,這6個資料庫之間並沒有關係,當以MySQL Fabric做完設定後才有主從複製的關係。<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<h3 class="separator" style="clear: both; text-align: left;">
<b> </b></h3>
<h3 class="separator" style="clear: both; text-align: left;">
<b>MySQL Fabric的下載及</b></h3>
<br />
MySQL Fabric並非單獨的軟體,它附在MySQL Utilities之下,是由Python Script所構成的系統。安裝MySQL Fabric必需下載MySQL Utilities,其下載網址為http://dev.mysql.com/downloads/utilities/ ,我比較習慣下載source code再compile安裝。MySQL Utilities只能執行於Python 2.7或2.6之下,要安裝前必需先確認電腦上的Python版本,其指令為:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">$ python –V</span><br />
<br />
以source code安裝MySQL Utilities的過程如下:<br />
在下載好MySQL Utilities的zip檔後,執行以下指令<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">$ unzip mysql-utilities-1.4.4.zip<br />$ cd mysql-utilities-1.4.4<br />$ python ./setup.py build<br />$ sudo python ./setup.py install</span><br />
<br />
安裝好MySQL Utilities後可以下列指令確認MySQL Fabric可以執行:<br />
<span style="font-family: "Courier New",Courier,monospace;"><br />$ mysqlfabric</span><br />
<h3>
</h3>
<h3>
設定MySQL Fabric</h3>
<br />
Fabric的設定過程如下:<br />
<br />
1. 在預定成為MySQL Fabric之Repository的資料庫上建立資料庫帳戶 (範例中為使用3506端口的資料庫):<br />
<br />
當在Fabric的設定檔中的[storage]段落中被指定為資料庫帳戶後(詳步驟3),在執行設定Fabric的設定時(執行步驟4的mysqlfabric manage setup的指令),Fabric會在該資料庫以此處所建立的資料庫帳戶建立所需要的表和資料庫物件。在登入MySQL後執行建立資料庫帳戶的指令如下:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">CREATE USER '<fabric-rep-user>'@'<fabric-host-ip>' IDENTIFIED BY '<password>';<br />GRANT ALL ON fabric.* USER '<fabric-rep-user>'@'<fabric-host-ip>';</fabric-rep-user></password></fabric-rep-user></span><br />
<br />
2. 建立server farm中的資料庫,範例中所有的資料庫用同一台電腦,只是使用的端口,資料目錄和socket不同,這些資料庫所用的端口分別為3606、3306、3308、3314、3406及3408,各資料庫的參數檔請參考附件的參數檔。<br />
<br />
3. 在參與Fabric運作的server farm中所有的資料庫執行建立帳戶和授權 (Server Farm所有的資料庫用同樣帳戶名和密碼):<br />
Fabric在執行server farm中的資料庫的某些設定命令時-例如mysqlfabric promote HA group或建立data shard等,會使用該帳戶在各server farm的資料庫中執行資料庫操作指令。這個動作是在登入各server farm的資料庫執行以下命令:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">CREATE USER '<fabric-db-user>'@'<fabric-host-ip>' IDENTIFIED BY '<password>';<br />GRANT ALL ON *.* TO '<fabric-db-user>'@'<fabric-host-ip>';</fabric-host-ip></fabric-db-user></password></fabric-host-ip></span><br />
4. 編輯Fabric的設定檔<br />
<br />
在Linux上Fabric設定檔預設的位置位於/et/mysql/fabric.cnf ,也可以在mysqlfabric的指令中加上—config=<fabric-config-file>指定配置檔,例如:mysqlfabric –config=~/myfabric.cnf manage setup<br />我的Fabric配置檔如附件的fabric.cnf所示,各參數的說明請參考手冊http://dev.mysql.com/doc/mysql-utilities/1.4/en/fabric-configure.html<br /><br />在此說明比較重要的段落:<br /><br />[storage]<br />指定Fabric Repository資料庫的位、Fabric在執行時和Repository互動時所用的帳戶等。<br />[servers]<br />指定Fabric在運作時,在對其管轄的server farm中所有的資料庫下命令(複製配置、偵測心跳、故障移轉等)所用的帳號。<br />[protocol.xmlrpg]<br />MySQL Fabric節點的參數,應用端在建立資料庫連線時,要對MySQL Fabric節點連線以取得MySQL資料庫server farm中各高可用組(HA Group)的相關設定參數,所需要的連線MySQL Fabric節點的帳號密碼等資訊。對Fabric的連線也可以走SSL,在此處可以指定SSL連線的CA、CERT、KEY等訊息。<br />[failure-tracking]<br />指定Fabric對高可用組的資料庫多久Ping一次,ping多少次沒回應就會判定資料庫已經有問題,而啟動故障移轉對相關資訊。<br /><br />5. 使用MySQL Fabric指令操作Fabric的:<br />MySQL Fabric所有的操作均使用mysqlfabric指令,只有參數不同。mysqlfabric help commands指令可列示這些操作的詳細用法及其說明。<br />MySQL Fabric的Server Farm操作過程如下:<br />初始化Fabric,在Fabric Repository的資料庫中建立Fabric所用的表<br /><br /><span style="font-family: "Courier New",Courier,monospace;"> </span></fabric-config-file><br />
<span style="font-family: "Courier New",Courier,monospace;">$ mysqlfabric manage setup</span><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrjdkMINBpEvl59oQu9T61fXzXemIKQguTG6eh0D9sOFUkh1lHefiPQ4gCqaSiXdsJP_kvGcM6qCLeZMkK5V1OT_vPD6UJm2AIcBiwqQS2bgwYHDTA-og_Hj5HvaEnG5ybOz_WASdxU0b2/s1600/FabricServerFarm-s.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrjdkMINBpEvl59oQu9T61fXzXemIKQguTG6eh0D9sOFUkh1lHefiPQ4gCqaSiXdsJP_kvGcM6qCLeZMkK5V1OT_vPD6UJm2AIcBiwqQS2bgwYHDTA-og_Hj5HvaEnG5ybOz_WASdxU0b2/s1600/FabricServerFarm-s.png" height="220" width="640" /></a> <br />
<h3>
Fabric節點的設定</h3>
<br />
<span style="font-family: "Courier New",Courier,monospace;">執行以下指令, 開啟MySQL Fabric</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><br /></span>
<span style="font-family: "Courier New",Courier,monospace;">$ mysqlfabric mange start</span> <span style="font-family: "Courier New",Courier,monospace;">&</span><br />
<br />
做完這個指令後,整個Fabric的架構如上圖所示,MySQL Fabric節點及其Reporitory資料庫均開啟,Server Farm的資料庫可以開啟,但是在執行Fabric指令前,這些資料庫是獨立的彼此間沒有關係。<br />
<br />
<ul>
<li>建立3個高可用組,分別是準備當global group的”gp-global”,和兩個要做shard 的”gp1” 和”gp2”。其指令如下,</li>
</ul>
<br />
<span style="font-family: "Courier New",Courier,monospace;">$ mysqlfabric group create gp-global<br />$ mysqlfabric group create gp1<br />$ mysqlgabric group create gp2</span><br />
<br />
<ul>
<li>執行完建立高可用組的指令後只會在Fabric的Repository中增加一些紀錄,以下指令為各高可用組加入資料庫和promote資料庫才會使server farm中的資料庫有主從關係。所以先指定各組的資料庫:</li>
</ul>
<br />
<span style="font-family: "Courier New",Courier,monospace;">$ mysqlfabric group add gp-global 127.0.0.1:3606<br />$ mysqlfabric group add gp1 127.0.0.1:3306<br />$ mysqlfabric group add gp1 127.0.0.1:3308<br />$ mysqlfabric group add gp1 127.0.0.1:3314<br />$ mysqlfabric group add gp2 127.0.0.1:3406<br />$ mysqlfabric group add gp2 127.0.0.1:3408</span><br />
<br />
<ul>
<li>讓MySQL Fabric 為各高可用組指定一個主資料庫,組內其他資料庫成為其從資料庫,指令如下:</li>
</ul>
<span style="font-family: "Courier New",Courier,monospace;"><br />$ mysqlfabric group promote gp1<br />$ mysqlfabric group promote gp2</span><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivnMlouLrsp_6Y-ljIk-UzFdU6F6mnlQEAq8kOkSz4jDbYJOhkhUW1ppyeiJ7A5Thv6NvZXxqYSo3bcYr74qLdFEmPtojBvbVdUDR1xCGaNMT9nnZAIt0eKDXqCwEdhvJNpv-m88t0ssFV/s1600/Fabric-configured-farm-s.png" style="margin-left: 1em; margin-right: 1em;"></a><br />
<ul>
<li>由於gp-global中只有一個資料庫,所以不需promote (實務上還是要有兩個以上資料庫以支援高可用) 。讓Fabric 能主動偵測server farm中所有資料庫的狀況,並在主資料庫有問題時由Fabric自動做故障移轉</li>
</ul>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivnMlouLrsp_6Y-ljIk-UzFdU6F6mnlQEAq8kOkSz4jDbYJOhkhUW1ppyeiJ7A5Thv6NvZXxqYSo3bcYr74qLdFEmPtojBvbVdUDR1xCGaNMT9nnZAIt0eKDXqCwEdhvJNpv-m88t0ssFV/s1600/Fabric-configured-farm-s.png" style="margin-left: 1em; margin-right: 1em;"></a><br />
<span style="font-family: "Courier New",Courier,monospace;">$ mysqlfabric group activate gp1<br />$ mysqlfabric group activate gp2</span><br />
<br />
以上指令在執行時Fabric會對server farm中各資料庫下指令進行主從複製的設定(如下圖所示)。注意,為了使這些設定順利進行,各資料庫的參數檔必需加上以下參數:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">log-binlog<br />log-slave-update<br />binlog-formate=ROW<br />server-id=<unique-server-id><br />gtid-mode=on<br />enforce-gtid-consistency</unique-server-id></span><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNnid9B8-QbOL0lrUQ-p51H-Y9kBco1dxdS8cQPEE2Kz1NbIlkp-_0sol99wnENm-D6H9TDvUvprEGyj1WvKIsRR67wNGihrnxkU0PpnJgrJJ8NgjJG2R-6dVzpp2Nnxuq1kbyUVnGCn7m/s1600/fabric-commands-s.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNnid9B8-QbOL0lrUQ-p51H-Y9kBco1dxdS8cQPEE2Kz1NbIlkp-_0sol99wnENm-D6H9TDvUvprEGyj1WvKIsRR67wNGihrnxkU0PpnJgrJJ8NgjJG2R-6dVzpp2Nnxuq1kbyUVnGCn7m/s1600/fabric-commands-s.png" height="268" width="640" /></a><br />
執行以上指令後(紅色箭頭代表Fabrtic下指令的方向),各組之內的主從關係就建立起來了,可用以下指令查各組的內容:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">$ mysqlfabric group lookup_server <group-id></group-id></span><br />
<br />
<group-id>是各組的名稱,例如gp1,gp2</group-id><br />
<ul>
<li>在global group (gp-global)建立shard的定義 ,shard定義必需加到global group中,目前MySQL Fabric支援RANG和HASH shard,本範例中用RANGE shard:</li>
</ul>
<span style="font-family: "Courier New",Courier,monospace;"><br />$ mysqlfabric sharding create_definition RANGE gp-global</span><br />
<br />
<ul>
<li>上述指令會傳出一個mapping_id的序號(由1開始往後跳號),以後的shard設定中會用到該mapping_id,假定mapping_id是”1”</li>
</ul>
將shard table加入shard的定義中:<br />
<span style="font-family: "Courier New",Courier,monospace;"><br />$ mysqlfabric sharding add table 1 employees.employees id</span><br />
<br />
此指令中add table後的“1”是上一個指令傳出的mapping_id (意味著加在gp-global上的data shard),要做shard (分表分庫)的表為employees schema之下的employees表。 最後一個參數”id”代表employees.employees表中的各行以名為id的欄位中所存的值決定各該欄位要存於那一個shard中。<br />
<ul>
<li>指定各shard (HA group)所存放的記錄:</li>
</ul>
<span style="font-family: "Courier New",Courier,monospace;">$ mysqlfabric sharding add_shard 1 gp1/1,gp2/1000 --state=ENABLED</span><br />
<br />
上列指令指定當employees表中某一記錄的id欄位之值在1~999之間,Fabric會將該行存於HA group gp1中,id的值大於或等於1000的記錄則會存到HA group gp2中。本範例中gp1的主資料庫會使用由Fabric所挑選3314的資料庫,則當插入的記錄之id小於1000時會由Fabric aware connector送到3314的資料庫,再透過主從複製傳到HA group中其他的從資料庫(使用3306及3308的資料庫),如果插入的記錄id的值大於等於1000,則會將該指入指令送到gp2的主資料庫(3408的資料庫),再以複製的方式傳到gp2的從資料庫 (用3406的資料庫) 。<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivnMlouLrsp_6Y-ljIk-UzFdU6F6mnlQEAq8kOkSz4jDbYJOhkhUW1ppyeiJ7A5Thv6NvZXxqYSo3bcYr74qLdFEmPtojBvbVdUDR1xCGaNMT9nnZAIt0eKDXqCwEdhvJNpv-m88t0ssFV/s1600/Fabric-configured-farm-s.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivnMlouLrsp_6Y-ljIk-UzFdU6F6mnlQEAq8kOkSz4jDbYJOhkhUW1ppyeiJ7A5Thv6NvZXxqYSo3bcYr74qLdFEmPtojBvbVdUDR1xCGaNMT9nnZAIt0eKDXqCwEdhvJNpv-m88t0ssFV/s1600/Fabric-configured-farm-s.png" height="226" width="640" /></a><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcAMdqhdYK8y597097CwO7NIFcGR_W1ufjGSZzimL__7hSntvYLU42LV0eSSvi-0_dH1FQl_-Ofp0_hJfg1csLVksA7vfH0sPDRHW48jvn-nFPOGTYlsCwVcg3PISc5deXCmU82vMXVCu8/s1600/ApplicationGlobalWrite-s.png" style="margin-left: 1em; margin-right: 1em;"></a><br />
<br />
經過以上的指令,MySQL Server Farm會有如上圖所示的架構(藍色箭頭代表複製的方向),使用3606的資料庫是使用3314之資料庫和使用3408之資料庫的主資料庫,使用3314的資料庫又是使用3308之資料庫和使用3314之資料庫的主資料庫,另一個HA Group中使用3408的資料庫又是使用3306之資料庫的主資料庫。如果您有MySQL Enterprise Monitor可以如下圖所示的replication監看畫面看到這個架構。<br />
<br />
<h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnjKgOPWh928olKyUobeaR6vCaB0Z_qRBeW4XWZHbhPzvLRXMI0KuoYHVFpwqkujGTsRzM9gClsy0kNirSvZQOkrIpaXMS62DMlThyphenhyphenGKyWHBD67M4n-Jn9So_C351cDiKtn5sWbbw4u3In/s1600/Fabric-shard-replicaiton-MEM-s.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnjKgOPWh928olKyUobeaR6vCaB0Z_qRBeW4XWZHbhPzvLRXMI0KuoYHVFpwqkujGTsRzM9gClsy0kNirSvZQOkrIpaXMS62DMlThyphenhyphenGKyWHBD67M4n-Jn9So_C351cDiKtn5sWbbw4u3In/s1600/Fabric-shard-replicaiton-MEM-s.png" height="206" width="640" /></a></div>
</h3>
<h3>
使用MysQL Fabric的客戶端</h3>
<br />
MySQL Fabric能使應用系統的程式在對資料庫下SQL指令時幾乎不需要了解shard table是如何在各資料庫間分配其資料,應用程式透過Fabric aware connector (目前有Connecotr/J、Connector/Python及Connector/PHP) 到Fabric節點取得Fabric Server Farm的設定訊息,以此設定訊息配合SQL查詢或更新指令中的WHERE條件所用到的shard key之值,及插入指令中的shard key的值來決定要指命送到那一個資料庫執行。<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT7PP1RORDTxUFOISG8l8tkZnSQYSomk5OV6Xj0rjXnzulFO8YH1SRJEfKw_zBlKadf7Pvdmq5OK1N4rU3pEbQxHA6SxjSdgfZpjUSOsEQd2fPDhrQWxh2BybdUM9LfoAGRoBDrolT5pMe/s1600/FabricApplicationSide-s.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT7PP1RORDTxUFOISG8l8tkZnSQYSomk5OV6Xj0rjXnzulFO8YH1SRJEfKw_zBlKadf7Pvdmq5OK1N4rU3pEbQxHA6SxjSdgfZpjUSOsEQd2fPDhrQWxh2BybdUM9LfoAGRoBDrolT5pMe/s1600/FabricApplicationSide-s.png" height="226" width="640" /></a><br />
本範例先示範以Java使用Fabric Server Farm,如上圖所示,Connector/J在新建Connection object時的URL中的主機名和端口都指向Fabric 節點所在的位置,以下的Java程式片段顯示Fabric節點的位置在127.0.0.1,使用的端口為32272。在開發Java應用前要先下載Connector/J 5.1.30或之後的版本 (下載網址在http://dev.mysql.com/downloads/connector/j/),並將其library的位址加入Java執行環境的CLASSPATH中。<br />
<br />
<ul>
<li>對MySQL的Server Farm下DDL及Global Table的DML指令:</li>
</ul>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcAMdqhdYK8y597097CwO7NIFcGR_W1ufjGSZzimL__7hSntvYLU42LV0eSSvi-0_dH1FQl_-Ofp0_hJfg1csLVksA7vfH0sPDRHW48jvn-nFPOGTYlsCwVcg3PISc5deXCmU82vMXVCu8/s1600/ApplicationGlobalWrite-s.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcAMdqhdYK8y597097CwO7NIFcGR_W1ufjGSZzimL__7hSntvYLU42LV0eSSvi-0_dH1FQl_-Ofp0_hJfg1csLVksA7vfH0sPDRHW48jvn-nFPOGTYlsCwVcg3PISc5deXCmU82vMXVCu8/s1600/ApplicationGlobalWrite-s.png" height="226" width="640" /></a><br />
<br />
如上圖所示綠色箭頭所示,Java程式中要下DDL或對global table (此處為employees.departments) 做DML時,建Connection Object的URL中要加fabricServerGroup參數,且指向global group(此處為gp-global)。以下程式片段說明這個過程:<br />
<span style="font-family: "Courier New",Courier,monospace;"><br />/*<br />Fabric connection的Java Class 為Fabric特有的com.mysql.fabric.jdbc.FabricMySQLConnection<br />*/<br />import com.mysql.fabric.jdbc.FabricMySQLConnection;<br />…<br />/*<br />. 建Fabric Connection的URL中host name指向Fabric節點的主機<br />. port number指向32274,如同fabric.cnf中所指定的本範例使用32274<br />. 建connection的URL中要加上” fabricServerGroup”參數,且指向global group,本範例的global group名為”gp-global”<br />*/<br />String baseUrl= "jdbc:mysql:fabric://<fabric-node-host-ip>:32274";<br />String database= "world";<br />rawConnection = DriverManager.getConnection(baseUrl + database + "?<br /> fabricServerGroup=gp-global“,user, password);<br />statement = rawConnection.createStatement();<br />…<br />/*<br />建employees表的DDL<br />*/<br />statement.executeUpdate("create table employees.employees (emp_no int<br /> not null, first_name varchar(50), last_name varchar(50),<br /> department_id int, primary key (emp_no))");<br />…<br />/*<br />插入兩筆記錄到global table-departments<br />*/<br />statement.executeUpdate("insert into employees.departments values<br /> (1,'Sales'),(2,'Financial')");</fabric-node-host-ip></span><br />
<ul>
<li>Shard Table的操作:</li>
</ul>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmIGAq4FdQyUXMHmmJObCLsn0rlHQ1Uc_MJpfIA9rutPn_fHHlZgbdNavzedJ0iLcFzBUYr6BJox_8Yui-Z3151Oei-z2dc19y3RsAE35jZJhfo_cF-yOXdciewp4jtfYV-Vp10xfx77HM/s1600/shardWrite-s.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmIGAq4FdQyUXMHmmJObCLsn0rlHQ1Uc_MJpfIA9rutPn_fHHlZgbdNavzedJ0iLcFzBUYr6BJox_8Yui-Z3151Oei-z2dc19y3RsAE35jZJhfo_cF-yOXdciewp4jtfYV-Vp10xfx77HM/s1600/shardWrite-s.png" height="268" width="640" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT7PP1RORDTxUFOISG8l8tkZnSQYSomk5OV6Xj0rjXnzulFO8YH1SRJEfKw_zBlKadf7Pvdmq5OK1N4rU3pEbQxHA6SxjSdgfZpjUSOsEQd2fPDhrQWxh2BybdUM9LfoAGRoBDrolT5pMe/s1600/FabricApplicationSide-s.png" style="margin-left: 1em; margin-right: 1em;"></a><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEc0cU8fbgAW9Ao6c5X5t1gS4u2EMDZjxuZAMEWZpO3cXt_D_yzQUwohfNnKo7LmMN2dZ_T1hnMRv4ZGS7XI9nUHLIJCiIiZ4wsv4Li3bUFfNA3oWFZGLr3KcxVyQqbk3NyoMmmFE4Mc_B/s1600/FailOver2-s.png" style="margin-left: 1em; margin-right: 1em;"></a><br />
<br />
如上圖所示下半段的綠色箭頭所示,對Sharded Table (本範例中為employees)的操作必需在建connection object時加上參數” fabricShardTable”,本範例的shard table為employees.employees,這個表在前述Fabric設定shard table時以 ” mysqlfabric sharding add table 1 employees.employees id” 指令設定到Fabric中。如此可在employees表大到無法以單一資料庫來處理時,可將其資料分散到多個shard database中,同時在下SQL命令不需担心這些指令要送到那一個資料庫去執行,由Fabric aware Connector (此範例中是Connecto/J)。<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">/*<br />建Connection Object時要加上fabricShardTable參數且指向己在Fabric中設定的shard table名稱<br />建立的Connection Object 要Down Cast成FabricMySQLConnection Class的Object,由此Connection Object所下的SQL指令會依各記錄的id欄位中的值,送到不同的HA group的Primary (master) database<br />*/<br />rawConnection = DriverManager.getConnection("jdbc:mysql:fabric://127.0.0.1:32274/mysql?<br />fabricShardTable=employees.employees“, user, password);<br />FabricMySQLConnection connection = (FabricMySQLConnection)rawConnection;<br />/*<br />插入四筆記錄到employees.employees表中,依Fabric在” $ mysqlfabric sharding add_shard 1 gp1/1,gp2/1000 --state=ENABLED”設定指令中所定義的資料存放的原則,id為1,2的記錄會依Fabric中記錄的Server Farm設定存到gp1 高可用組中,id為10001,10002的記錄會依Fabric設定的shard table的記錄存放原則存到gp2 高可用組中<br />*/<br />PreparedStatement ps = connection.prepareStatement(<br /> "INSERT INTO employees.employees VALUES (?,?,?,?)");<br />Integer ids[] = new Integer[]{1, 2, 10001, 10002};<br />String firstNames[] = new String[]{"John", "Jane", "Andy", "Alice"};<br />String lastNames[] = new String[]{"Doe", "Doe", "Wiley", "Wein",};<br />String departmentIds[] = new String[]{"1", "2", "1", "2"};<br />for (int i = 0; i < 4; ++i) {<br /> connection.setShardKey(ids[i].toString());<br /> ps.setInt(1, ids[i]);<br /> ps.setString(2, firstNames[i]);<br /> ps.setString(3, lastNames[i]);<br /> ps.setString(4, departmentIds[i]);<br /> ps.executeUpdate();<br />}</span><br />
<ul>
<li>唯讀的操作</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEh62FPiM6l0p8HBCKtF2x_UzrkGCpLxL4TuIOjly0fuxDe-uSC-zdxn98d5oTsRkRNILfUukiIrbEH6YfylBXD86rHSsYWeyQTWOB5Ovbphv8mc3dPggkCht4B0ePHtrMw3_x2If5gcww/s1600/ReadOnly-s.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEh62FPiM6l0p8HBCKtF2x_UzrkGCpLxL4TuIOjly0fuxDe-uSC-zdxn98d5oTsRkRNILfUukiIrbEH6YfylBXD86rHSsYWeyQTWOB5Ovbphv8mc3dPggkCht4B0ePHtrMw3_x2If5gcww/s1600/ReadOnly-s.png" height="248" width="640" /></a></div>
<br />
當Fabric的MySQL Server Farm的HA group中配置多個database時,其中除了有一個資料庫由Fabric挑選為master database,其他的資料庫均為該master database的slave database,這些slave database除了支援故障移轉外,還可支援唯讀的操作。只要在執行shard table之Connection object 上的setReadOnly(true) method後,透過這個Connection Object所下的查詢指令會隨機送到各HA group的secondary database (不會送到Mater Database)去執行,而達到讀寫分離的功能。同樣的Java程式開發者在下SQL指令時也不需担心要送到那一個資料庫,而由Fabric aware connector (Connector/J)負責將查詢指令送到適當的資料庫。<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">FabricMySQLConnection newConn = (FabricMySQLConnection)rawConnection;<br />/*<br />將Connection Object設為唯讀,經由此Connection Object所下的查詢會送到各HA group的secondary (slave) database<br />*/<br />newConn.setReadOnly(true);<br />/*<br />SQL指令中shard table – employees.employees JOIN global table -employees.departments以查各employee的部門名稱,再JOIN information_schema.global_variables,以列示執行這個SQL指令的資料庫所用使的端口<br />*/<br />ps = newConn.prepareStatement(<br />"select emp_no, first_name, last_name, d.name, i.variable_value<br />from employees.employees e, information_schema.global_variables i,<br />employees.departments d where e.department_id = d.department_id<br />and i.variable_name='port' and emp_no = ?");<br />for (int i = 0; i < 4; ++i) {<br /> // we need to specify the shard key before accessing the data<br /> newConn.setShardKey(ids[i].toString());<br /> ps.setInt(1, ids[i]);<br /> ResultSet rs = ps.executeQuery();<br /> rs.next();<br /> System.out.format("%7d | %-30s | %-30s | %-30s | %-30s%n", rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4),rs.getString(5));<br /> rs.close();<br />}</span><br />
<ul>
<li>Java程式的執行結果:</li>
</ul>
未執行Java程式前,所有資料庫都的employees和departments表中都沒有資料, 以下指令證明這個狀態<br />
<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">$ ./bin/mysql -uroot -p -h127.0.0.1 -P3314 employees<br />Enter password: <br />Reading table information for completion of table and column names<br />You can turn off this feature to get a quicker startup with -A<br /><br />Welcome to the MySQL monitor. Commands end with ; or \g.<br />Your MySQL connection id is 11360<br />Server version: 5.6.15-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)<br /><br />Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.<br /><br />Oracle is a registered trademark of Oracle Corporation and/or its<br />affiliates. Other names may be trademarks of their respective<br />owners.<br /><br />Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.<br /><br />mysql> <br />mysql> select * from employees;<br />Empty set (0.00 sec)<br /><br />mysql> select * from departments;<br />Empty set (0.00 sec)</span><br />
<br />
<ul>
<li>執行Java程式 (範例中的程式為demo.fabric.EmployeeJDBC.java),此程式配合Fabric的設定,會將id為1,2的記錄會送到使用端口3314的資料庫,id為10001,10002的記錄會送到使用端口3408的資料庫,這點由執行完插入指令後的查核SQL指令所查出的port number可證實。</li>
</ul>
<br />
<span style="font-family: "Courier New",Courier,monospace;">$ java -jar dist/demo.fabric.jar <br />Querying employees</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: xx-small;"> emp_no | first_name | last_name | deptartment | port <br />--------+--------------------------------+--------------------------------+--------------------------------+------------------<br /> 1 | John | Doe | Sales | 3314 <br /> 2 | Jane | Doe | Financial | 3314 <br /> 10001 | Andy | Wiley | Sales | 3408 <br /> 10002 | Alice | Wein | Financial | 3408 <br /><br />Querying employees with read only<br /> emp_no | first_name | last_name | deptartment | port <br />--------+--------------------------------+--------------------------------+--------------------------------+------------------<br /> 1 | John | Doe | Sales | 3308 <br /> 2 | Jane | Doe | Financial | 3308 <br /> 10001 | Andy | Wiley | Sales | 3406 <br /> 10002 | Alice | Wein | Financial | 3406 </span></span><br />
<br />
<ul>
<li>驗證Data Shard的作用</li>
</ul>
<br />
登入到使用端口3314和3408的資料庫下查詢命令,以驗證所有資料庫都有global table – departments的資料,而shard table – employees只有Fabric設定所指定的資料-使用3314端口的資料庫只有id欄位小於1000的記錄,使用3408端口的資料庫只有id欄位大於或等於1000的記錄<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">$ ./bin/mysql -uroot -p -h127.0.0.1 -P3314 employees<br />Enter password: <br />Reading table information for completion of table and column names<br />You can turn off this feature to get a quicker startup with -A<br /><br />Welcome to the MySQL monitor. Commands end with ; or \g.<br />Your MySQL connection id is 11360<br />Server version: 5.6.15-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)<br /><br />Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.<br /><br />Oracle is a registered trademark of Oracle Corporation and/or its<br />affiliates. Other names may be trademarks of their respective<br />owners.<br /><br />Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.<br /><br />mysql> select * from employees;<br />+--------+------------+-----------+---------------+<br />| emp_no | first_name | last_name | department_id |<br />+--------+------------+-----------+---------------+<br />| 1 | John | Doe | 1 |<br />| 2 | Jane | Doe | 2 |<br />+--------+------------+-----------+---------------+<br />2 rows in set (0.00 sec)<br /><br />mysql> select * from departments;<br />+---------------+-----------+<br />| department_id | name |<br />+---------------+-----------+<br />| 1 | Sales |<br />| 2 | Financial |<br />+---------------+-----------+<br />2 rows in set (0.01 sec)</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">$ ./bin/mysql -uroot -p -h127.0.0.1 -P3408 employees<br />Enter password: <br />Reading table information for completion of table and column names<br />You can turn off this feature to get a quicker startup with -A<br /><br />Welcome to the MySQL monitor. Commands end with ; or \g.<br />Your MySQL connection id is 11721<br />Server version: 5.6.15-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)<br /><br />Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.<br /><br />Oracle is a registered trademark of Oracle Corporation and/or its<br />affiliates. Other names may be trademarks of their respective<br />owners.<br /><br />Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.<br /><br />mysql> select * from employees;<br />+--------+------------+-----------+---------------+<br />| emp_no | first_name | last_name | department_id |<br />+--------+------------+-----------+---------------+<br />| 10001 | Andy | Wiley | 1 |<br />| 10002 | Alice | Wein | 2 |<br />+--------+------------+-----------+---------------+<br />2 rows in set (0.00 sec)<br /><br />mysql> select * from departments;<br />+---------------+-----------+<br />| department_id | name |<br />+---------------+-----------+<br />| 1 | Sales |<br />| 2 | Financial |<br />+---------------+-----------+<br />2 rows in set (0.00 sec)</span><br />
<br />
<ul>
<li>故障移轉</li>
</ul>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv_mDcx4gUgU4sdz7n_1bb_7fbso_dNzjXxzeWqWfZbHGVsa25XZfqhhnc3TuwnQ8SiGGPMLEUT4iti6pmK-7salmGKPJF8jgj9XueySirJEqQaEQbBVYCvgkflC0j2tPry67Adrjrz6pc/s1600/FailOver1-s.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv_mDcx4gUgU4sdz7n_1bb_7fbso_dNzjXxzeWqWfZbHGVsa25XZfqhhnc3TuwnQ8SiGGPMLEUT4iti6pmK-7salmGKPJF8jgj9XueySirJEqQaEQbBVYCvgkflC0j2tPry67Adrjrz6pc/s1600/FailOver1-s.png" height="232" width="640" /></a><br />
<br />
如上圖所示,關掉使用3314端口的資料庫,再觀查Server Farm的狀況,和同樣的Java程式執行的結果是否有變化。<br />
<br />
關掉HA group gp1的primary database (使用端口3314的資料庫)<br />
<br />
關掉使用端口3314的資料庫後可觀察到Fabric偵測到HA group gp1的primary database不見了,隨後變更gp1的primary database到另一個資料庫。<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">./bin/mysqladmin -uroot -p -h127.0.0.1 -P3314 shutdown<br />Enter password: </span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: "Courier New",Courier,monospace;">$
140801 12:56:20 mysqld_safe mysqld from pid file
/home/ivan/mysql-advanced-5.6.15-linux-glibc2.5-x86_64/data3/ivan-PORTEGE-R930.pid
ended</span> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><br />$ <br />$ [WARNING] 1406868972.991539 - FailureDetector(gp1) - Server (6bc545e1-ebc9-11e3-8463-b4b6769a2ef5) in group (gp1) is unreachable.<br /><br />$ [WARNING] 1406868975.002187 - FailureDetector(gp1) - Server (6bc545e1-ebc9-11e3-8463-b4b6769a2ef5) in group (gp1) is unreachable.<br /><br />ivan@ivan-PORTEGE-R930:~/mysql56$ [WARNING] 1406868977.012753 - FailureDetector(gp1) - Server (6bc545e1-ebc9-11e3-8463-b4b6769a2ef5) in group (gp1) is unreachable.<br />[WARNING] 1406868977.029330 - Executor-2 - Reported issue (FAULTY) for server (6bc545e1-ebc9-11e3-8463-b4b6769a2ef5).<br />[INFO] 1406868977.036337 - Executor-2 - Master (6bc545e1-ebc9-11e3-8463-b4b6769a2ef5) in group (gp1) has been lost.<br />[INFO] 1406868977.208566 - Executor-2 - Master has changed from 6bc545e1-ebc9-11e3-8463-b4b6769a2ef5 to 68930fd6-ebc9-11e3-8463-b4b6769a2ef5.</span><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN220k-NhW1aXbkdNheM-KMx78F4dR1Hi3YqoW2OkDdPUJJp1W7ctyI0Y2kk_5xhBH-hWwUNdPgsXS4NtfPMdVsgOrkeRnz5o7836l0qIxcnpC-g7DShiLlkJS4pfQSXUQVgAbN8bVaXPy/s1600/FailOverMEM-s.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN220k-NhW1aXbkdNheM-KMx78F4dR1Hi3YqoW2OkDdPUJJp1W7ctyI0Y2kk_5xhBH-hWwUNdPgsXS4NtfPMdVsgOrkeRnz5o7836l0qIxcnpC-g7DShiLlkJS4pfQSXUQVgAbN8bVaXPy/s1600/FailOverMEM-s.png" height="201" width="640" /></a><br />
<br />
由MySQL Enterprise Monitor觀察到的Server Farm在Failover之後的狀態<br />
MySQL Enterprise Monitor報告使用3314的資料庫無法使用 (出現火災符號),MEM報告使用3308的資料庫成為使用3306的資料庫的master database,同時它也的master database也由使用3314的資料庫轉為使用3606的資料庫。由此證實Fabric所發動的故障移轉成功。<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEc0cU8fbgAW9Ao6c5X5t1gS4u2EMDZjxuZAMEWZpO3cXt_D_yzQUwohfNnKo7LmMN2dZ_T1hnMRv4ZGS7XI9nUHLIJCiIiZ4wsv4Li3bUFfNA3oWFZGLr3KcxVyQqbk3NyoMmmFE4Mc_B/s1600/FailOver2-s.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEc0cU8fbgAW9Ao6c5X5t1gS4u2EMDZjxuZAMEWZpO3cXt_D_yzQUwohfNnKo7LmMN2dZ_T1hnMRv4ZGS7XI9nUHLIJCiIiZ4wsv4Li3bUFfNA3oWFZGLr3KcxVyQqbk3NyoMmmFE4Mc_B/s1600/FailOver2-s.png" height="220" width="640" /></a><br />
<ul>
<li>故障移轉後再Java程式的結果</li>
</ul>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKk-xMpJVoZ2Jp5bP1hs2sJm88z7YCbNYmJFXY52eKuVWsvmJmcpjher5r8S8i53EnOVCDVYdKmvvr2w7PlesxOERkAiGr6om5OQGWmSEc8gyTzKQ_Sf6swggCWDWS2_WZconuNVOi7WAa/s1600/FailOverMEM-s.png" style="margin-left: 1em; margin-right: 1em;"></a><br />
如上圖所示,故障移轉完成後,應插入HA group gp1的指令送到Fabric所選擇的故障移轉資料庫-使用端口3308資料庫執行,對gp1的read only查詢由於使用端口3308資料庫己成為gp1的primary (slave)資料庫,則會送到另一個secondary database -使用端口3308資料庫。<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">$ java -jar dist/demo.fabric.jar<br />Querying employees<br /><span style="font-size: xx-small;"> emp_no | first_name | last_name | deptartment | port <br />--------+--------------------------------+--------------------------------+--------------------------------+------------------<br /> 1 | John | Doe | Sales | 3308 <br /> 2 | Jane | Doe | Financial | 3308 <br /> 10001 | Andy | Wiley | Sales | 3408 <br /> 10002 | Alice | Wein | Financial | 3408 <br /><br />Querying employees with read only<br /> emp_no | first_name | last_name | deptartment | port <br />--------+--------------------------------+--------------------------------+--------------------------------+------------------<br /> 1 | John | Doe | Sales | 3306 <br /> 2 | Jane | Doe | Financial | 3306 <br /> 10001 | Andy | Wiley | Sales | 3406 <br /> 10002 | Alice | Wein | Financial | 3406 </span></span><br />
<ul>
<li>以Python使用Fabric</li>
</ul>
<br />
以下是一個名為add_emp_fabric.py的Python範例程式,由此Python程式驗證同一個Fabric 的Server Farm可同時支援Java和Pthon應用程式的存取:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">import mysql.connector<br />from mysql.connector import fabric<br />def add_emp(conn,emp_no,first_name,last_name,department_id):<br /> conn.set_property(tables=["employees.employees"], key=emp_no,mode=fabric.MODE_READWRITE)<br /> cur = conn.cursor()<br /> cur.execute(<br /> "INSERT INTO employees.employees VALUES (%s, %s, %s, %s)",<br /> (emp_no,first_name,last_name,department_id)<br /> )<br />conn = mysql.connector.connect(<br /> fabric={"host" : "localhost", "port" : 32274, "username": "admin", "password" : "welcome1"},<br /> user="root", database="employees", password="welcome1",<br /> autocommit=True<br />)<br />conn.set_property(tables=["employees.employees"], scope=fabric.SCOPE_LOCAL)<br /><br />add_emp(conn, 22, "Billy", "Bob","1")<br />add_emp(conn, 8372, "Banana", "Man","2")<br />add_emp(conn, 9, "Bill", "Ben","1")<br />add_emp(conn, 5006, "Andy", "Pandy","1")<br />add_emp(conn, 15050, "John", "Smith","1")<br />add_emp(conn, 8, "Tommy", "Cannon","2")</span><br />
<br />
執行指令 $ python ./add_emp_fabric.py 後到使用端口3308及3406的資料庫查詢可得到以下的結果:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">$ ./bin/mysql -uroot -p -h127.0.0.1 -P3308<br />Enter password: <br />Welcome to the MySQL monitor. Commands end with ; or \g.<br />Your MySQL connection id is 42326<br />Server version: 5.6.15-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)<br /><br />Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.<br /><br />Oracle is a registered trademark of Oracle Corporation and/or its<br />affiliates. Other names may be trademarks of their respective<br />owners.<br /><br />Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.<br /><br />mysql> select * from employees.employees;<br />+--------+------------+-----------+---------------+<br />| emp_no | first_name | last_name | department_id |<br />+--------+------------+-----------+---------------+<br />| 1 | John | Doe | 1 |<br />| 2 | Jane | Doe | 2 |<br />| 8 | Tommy | Cannon | 2 |<br />| 9 | Bill | Ben | 1 |<br />| 22 | Billy | Bob | 1 |<br />+--------+------------+-----------+---------------+<br />5 rows in set (0.00 sec)<br /><br /><br /><br />$ ./bin/mysql -uroot -p -h127.0.0.1 -P3406<br />Enter password: <br />Welcome to the MySQL monitor. Commands end with ; or \g.<br />Your MySQL connection id is 42258<br />Server version: 5.6.15-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)<br /><br />Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.<br /><br />Oracle is a registered trademark of Oracle Corporation and/or its<br />affiliates. Other names may be trademarks of their respective<br />owners.<br /><br />Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.<br /><br />mysql> select * from employees.employees;<br />+--------+------------+-----------+---------------+<br />| emp_no | first_name | last_name | department_id |<br />+--------+------------+-----------+---------------+<br />| 5006 | Andy | Pandy | 1 |<br />| 8372 | Banana | Man | 2 |<br />| 10001 | Andy | Wiley | 1 |<br />| 10002 | Alice | Wein | 2 |<br />| 15050 | John | Smith | 1 |<br />+--------+------------+-----------+---------------+<br />5 rows in set (0.00 sec)</span><br />
以此驗證Connector/Python也能依Fabric所設定的data shard規則到適當的資料庫中存取資料。<br />
<br />
<ul>
<li>切分shard (Split Shard)</li>
</ul>
如果一個shard的資料太多,MySQL Fabric還能支援資料庫Shard的分割-自原有的HA group 切分更多HA group ,進而將原shard中應存於新shard的資料搬到新的HA group中,其作法是:<br />
i. 開一個新的資料庫,例如使用3706端口<br />
ii. 開一個Fabric HA group:<br />
<span style="font-family: "Courier New",Courier,monospace;">$ mysqlfabric group create gp3</span><br />
iii. 為新開的資料庫加上MySQL database instance<br />
<span style="font-family: "Courier New",Courier,monospace;">$ mysqlfabric group add gp3 <host-ip>:3706</host-ip></span><br />
iv. 分割HA group,將值大於2000的HA group 之內的記錄移到新的HA group中<br />
<span style="font-family: "Courier New",Courier,monospace;">$ mysqlfabric sharding split_shard 2 gp3 –split_value=2000</span><br />
上列指令的結果會使Fabric的MySQL Server Farm多一個shard,並啟動mysqldump(在Fabric的設定檔中指定用此程式導出資料)將id大於等於2000的記錄搬到新的gp3中,以後Connector/J在處理SQL指令時會將屬於gp3的記錄的操作送到使用端口3706的資料庫。<br />
<br />
<h3>
結論</h3>
<br />
以上的配置和Fabric應用的開發的說明,是用以展示MySQL Fabric的功能和特性,希望讀者能透過實作,實際體驗Fabric的功能和特性,如果您有興趣,可在https://drive.google.com/file/d/0B1hoXeCyIS3WdkgwaWUtcXNEWFE/edit?usp=sharing 下載我已做好的Fabric指令script、資料庫配置和應用程, 其中資料庫及Fabric要先準備好, 各資料庫的my.cnf的datadir的位置要指向各資料實際的資料目錄。<br />
<br />
另外, 我在MySQL第一次聚會也做過 Fabric的示範, 那次所用的簡報存於http://www.slideshare.net/ivantu/my-sql-fabric-webinar-tw2 供需要的人參考<br />
<br />
MySQL Fabric的產品理念相當先進,但是它還是一個相當新的產品,還有許多功能改進的空間,已有許多列在其WL中,這些包括:<br />
<ul>
<li>更友善的操作及管理介面</li>
<li>更多的shard policy例如LIST shard</li>
<li>MySQL Fabric Node本身的高可用</li>
<li>一道SQL查詢到多個shard收齊所有的記錄再傳回應用程式</li>
<li>Shard內部能支援更多的高可用架構,例如主備-DRBD,或MySQL Cluster</li>
</ul>
我們歡迎大家一起來試用MySQL Fabric,且將您的意見回饋給開發團隊。<br />
<br />
<br />
<br />
<br />杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com1tag:blogger.com,1999:blog-225517704087781928.post-36447734902686461602014-07-14T22:26:00.001-07:002014-07-14T22:26:30.774-07:00MySQL Fabric - 為您的應用系統提供高可用、高擴充性的資料庫<div style="margin-top: 0.42cm; page-break-after: avoid; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglsw88S_88Ykhm1Syax5U9kedtS2r6EUAoB61nox15RVYwyLadSzlYMVVZYSb-1aAyz7dVspNTh6Xfaf-p_xYP3XaedlaMMqo-r4e6V10vLsVzNWK6RB67FDOTJ8pQ91kTVkq_YJFlWkW-/s1600/dolphin_bright_fabric.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglsw88S_88Ykhm1Syax5U9kedtS2r6EUAoB61nox15RVYwyLadSzlYMVVZYSb-1aAyz7dVspNTh6Xfaf-p_xYP3XaedlaMMqo-r4e6V10vLsVzNWK6RB67FDOTJ8pQ91kTVkq_YJFlWkW-/s1600/dolphin_bright_fabric.jpg" height="150" width="200" /></a><span style="font-family: Arial, sans-serif;"><span style="font-size: large;"><b>MySQL
Fabric </b></span></span>
</div>
<span style="font-family: 新細明體, serif;"><b><span style="color: #0000ee;"><u> - </u></span>為您的應用系統提供高可用、高擴充性的資料庫</b></span><br />
<br />
<div lang="zh-TW">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Oracle</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">在今年</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">5</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">月初推出了一套為各方寄以厚望的在</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">產品
– </span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,單從字面上似乎不太能看出它是啥咪碗糕,但是由名稱上還是有跡可循的,”</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Fabric”</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">是</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">"</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">織</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">"</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">或</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">"</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">織品</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">"</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,這意味著它是用來</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">"</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">織</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">"</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">起</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">"</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">一片”</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">資料庫。</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">是一套資料庫伺服器場</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(Database
Server Farm)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的架構管理系統。</span></span></div>
<div lang="zh-TW">
<br /></div>
<div lang="zh-TW">
<span style="font-family: 新細明體, serif;"><span style="font-size: x-small;"><b>MySQL Fabric是什麼?</b> </span></span></div>
<div lang="zh-TW">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric </span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">能
『組織』多個</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">資料庫</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">,</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">使應用系統能將大於幾</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">TB</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的表分散到多個資料庫
– 做</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Data
Shard(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">或資料分片</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">;在同一分片之內又可以含多個資料庫</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">,</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">並且由</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">自動挑一個適合的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">有最新的交易的資料</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">當主資料庫,其他的資料庫自動配置成從資料庫
</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">-
</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">做資料庫主從複製;進而在主資料庫當機時由各從資料中挑一個適合的提升為主資料庫,那麼其他的從資料庫自動轉向這個新的主資料庫找新的交易資料來複製。注意,這裡所說的
『自動』是指由</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">在背後為您完成,您不需要手動參與這些更改配置的動作。最重要的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">是</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">GPL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的開源軟體,也就是在符合</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">GPL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的規範下您可以自由的使用及修改這個軟體。</span></span></div>
<span style="font-family: 新細明體, serif;"><b> </b></span>
<br />
<div lang="zh-TW">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;"><b>MySQL
Fabric</b></span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;"><b>要決解的問題</b></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: 新細明體, serif;"><span style="font-size: x-small;"><b><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxaAOwtRzO5s44quwsgDtujrhOAQduZ9VGxz1wycLc8qusFOK2VJZOnBl7dnqftPKnSI3O_VNq6emNIVBm0tp83yOG7YPOns4gnDqyn1wWGM4CnFwj9uqH5znw9InOFSA91olSgadTQ1qc/s1600/Proxy-based-shard.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxaAOwtRzO5s44quwsgDtujrhOAQduZ9VGxz1wycLc8qusFOK2VJZOnBl7dnqftPKnSI3O_VNq6emNIVBm0tp83yOG7YPOns4gnDqyn1wWGM4CnFwj9uqH5znw9InOFSA91olSgadTQ1qc/s1600/Proxy-based-shard.jpg" height="239" width="320" /></a></b></span></span></div>
<br />
<div lang="zh-TW">
<span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">為什麼要做</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Data
Shard</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">?當您的應用需要處理的表有大於</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">1TB</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的資料時,</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Data
Shard</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">常常就是一個不得不為之惡。這麼大的表不論在查詢、更新的效率上,或是備份、更改結構所需要的時間上都會造成窒礙難行的問題。然而當您將這樣大的表分散到多個資料庫伺服器上,又會使每一台資料庫伺服器都可能是單點固障點,只要有一台當機就會使整個系統的查詢都會有問題,另一方面應用端的程式也會因為每個查詢都要依其查詢條件</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(where</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">子句的內容</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">分別指向不同的資料庫而變得更為複雜。再者,當</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Data
Shard</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的結構改變時</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">例如增加一個資料庫</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">會使應用端所有的程式都必需修改,而使維護變得即為複雜。</span></span></div>
<div lang="zh-TW">
<span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">為了解決應用程式複雜度增加的問題,有人在應用端和資料庫之間加了一個代理器</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(proxy)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">或者稱為</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">switch</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,應用端所有對資料庫的指令先送到</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">switch</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,再由</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">switch</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">判斷要轉到那一個資料庫,右圖是這個方案的示意架構。這也許可以解決應用端程式複雜度的問題,但是當應用端的數量增加,資料庫分片增加或系統的壓力增加時,這個</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">switch</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">會成為容量及性能的瓶頸和單點固障</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">當它當機時所有的應用端都找不到資料庫</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,而且所有對資料庫的指令均要傳兩次</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">先到</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">switch</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">再到資料庫</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,每個查詢都會造成額外的負荷,而能降低應用系統的效能。</span></span></div>
<div lang="zh-TW">
<span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">
</span></span></div>
<div lang="zh-TW">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;"><b>MySQL
Fabric</b></span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;"><b>的架構</b></span></span></div>
<div lang="zh-TW">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">則採取不一樣的做法,其架構如下圖所示,主要的特點是把</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">switch</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">合併到各應用端的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">connector(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">或是</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">driver)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">中,以解決單一</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">switch</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的單點固障和性能瓶頸的問題。。</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">主要由三個部份所構成:</span></span></div>
<div lang="zh-TW">
<br /></div>
<div lang="zh-TW">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPe-mbAo2VdN-dP5xrJnPRx9TixreoKXKeWF-oOZ8RKSB4py_3sXsm9omTu65epQ23CHi8qBqdP_x-ptAml0PU03zT0Ginl2ZddqGpmCWAMkyp33veJCiamafx7MK1jdcJMVD0TlkN3dny/s1600/Fabric-shard.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPe-mbAo2VdN-dP5xrJnPRx9TixreoKXKeWF-oOZ8RKSB4py_3sXsm9omTu65epQ23CHi8qBqdP_x-ptAml0PU03zT0Ginl2ZddqGpmCWAMkyp33veJCiamafx7MK1jdcJMVD0TlkN3dny/s1600/Fabric-shard.jpg" height="360" width="640" /></a></div>
<div lang="zh-TW">
<br /></div>
<div lang="zh-TW">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">1.MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">管理節點:</span></span></div>
<div lang="zh-TW">
<span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">是一個</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Python</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">脚本,由它整個架構的核心,</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">管理節點主要的功能是管理整個資料庫伺服器場</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(server
farm)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,它開啟時會找</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">/etc/mysql/fabric.cnf</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">配置檔</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">或以—</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">config</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">參數指定配置檔</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,由它指定</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">背後當成存放</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Server
Farm</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">架構和配置之</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">repository</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">資料庫位置、所用的端口、和連線帳號等資訊,</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">在初始化時</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">執行</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">mysqlfabric
manage setup</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">命令</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,會在</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">資料庫上開一個</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">schema
(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">通常是名稱為</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">database)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,存放</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">server
farm</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">配置相關的資料,例如那些伺服器組由那些</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">資料庫構成,各伺服器組中以那一個</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">資料庫為主那些為從,各分庫的表要拆分到那些伺服器組中,各</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">shard
table</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">要以那個欄位的內容做拆分,拆分的政策為何</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(RANGE,KEY)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">?如果是</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">RANGE</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">拆分,各組存放的是那些範圍</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">例如</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;"><1000 font=""><!--1000--></1000></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的存第一個</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">shard,
>1000</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的存於第二個</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">shard)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">?</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">節點在設定配置時會對</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">server
farm</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">中各</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">資料庫下達建立主從複製的指令</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">下圖紅色線條</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,在正常運時會定期</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">pin</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">各組的主資料庫,當它發現主資料庫沒有正運作,它會啟動固障移轉程序,在該</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">server
farm</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的從資料庫中找一個適合的提升為主,其他的從資料庫轉向新的主資料庫繼續複製交易資料。</span></span></span></div>
<div lang="zh-TW">
<br /></div>
<div lang="zh-TW">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">2.</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">資料庫伺服器場</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(database
server farm)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">:</span></span></div>
<div lang="zh-TW">
<span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">是整個架構中的工作引擎,在傳統的資料庫應用中這是單一</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">資料庫,</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">則是以多個資料庫支持大資料量表</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(TB</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">級以上的表</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">和高可用資料庫的需求。這些資料庫分成幾個高可用組</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(HA
Group</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">或稱為</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">server
group)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,每個組包含一個以上的資料庫伺服器,上圖中最下面幾個灰色和淺藍色的圓角方塊代表高可用組,如果高可用組中有多個資料庫,</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">會</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">以</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">mysqlfabric
group promote <group_id></group_id></span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">指令</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">自其中挑一個提升為主資料庫,其他資料庫則成為從資料庫,從資料庫複製主資料庫的變化
</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">-
</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">完成設定同一高可用組內的主從複製。自此以後</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">會定期監看這個主資料庫,當主資料庫當機時,</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">會自該高可用組內的從資料庫中挑一個提升為主資料庫,其他的資料庫會轉向這個新的主資料庫繼續複製。另一方面</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">也會指示應用端的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">connector</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">對這些主從資料庫做讀寫分離,當應用程式對資料庫做讀寫兼具的交易性操作,</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">connector</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">會將交易性指令送到主資料庫,如果某一段應用程式只會對資料庫下讀的指令,且連線的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">read_only</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">參數調為”</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">ON”</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,則所有的查詢均輪流送到這幾個從資料庫。藉由讀寫分離,應用系統的資料處理能量得以增加。此外,如前一段所描述的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">還能處理需要拆分到多個資料庫服務器的表</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(sharding
tables)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,每一個高可用組</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">上圖灰色圓角方塊</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">都可能存放</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">shard
table</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的部份資料,應用端的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">connector</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">會將對</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">shard
table</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的指令依</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">管理節點的設定送到不同的高可用組,如此可使資料庫的容量隨著高可用組的數量呈同比例的增長。同時,對非拆分的表所下的指令和所有的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">DDL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">會由</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Connector</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">送到全域性高可用組</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(Global
Group</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,上圖淺藍色的圓角方塊</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,全域性組的主資料庫又被</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">設為其他高可用組的主資料庫,所有存拆分表的高可用組的主資料庫會複製</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">global
group</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的變異,這麼一來其他高可組都有一份非拆分表的資料,而使</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">SQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">中拆分表對非拆分表的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">JOIN</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">操作</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">由於所需的資料都在同一資料庫中</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">變得更簡單。例如在一個訂單系統中有</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">ORDER</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">、</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">ORDER_LINE</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">、</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">PRODUCT</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">三個表,</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">ORDER</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">和</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">ORDER_LINE</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">依客戶代號</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(customer_id)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">做</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">KEY
shard</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">PRODUCT</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">表不拆分,則每個高可用組的資料庫有一部份</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">ORDER</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">和</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">ORDER_LINE</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">表的資料,在做過正規化的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">ORDER_LINE</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">表只有參照</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">PRODUCT</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的外鍵加在</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">product_id</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">欄位上不會有</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">product_name</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">欄位,如果要查各</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">ORDER_LINE</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">買的是什麼產品和產品名稱,必需在</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">SQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">指令中</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">JOIN
PRODUCT</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">表,由於</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">PRODUCT</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">表的操作都先打到</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Global
Group</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,再複製到各高可用組</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(Global
Group</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的從資料庫</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,如此使得</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">ORDER_LINE
JOIN PRODUCT</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的指令可找到所有需要的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">PRODUCT</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">之資料。</span></span></div>
<div lang="zh-TW">
<br /></div>
<div lang="zh-TW">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">3.Connector</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">:</span></span></div>
<div lang="zh-TW">
<span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">應用系統在運作時,每個</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">SQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">指令會經由</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">connector</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">送到資料庫。</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">所搭配的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">connector</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">和一般使用單機的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">資料庫一樣,只是在較新版的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">connector</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">是</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">fabric
aware connector</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">多了一些能處理資料庫伺服器場</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(database
server farm)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的功能,使它們能在建立資料庫連線時</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">,</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">以</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">XML-RPC</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">協定查一下</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的管理節點中</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">server
farm</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的配置,然後透過該連線所下的查詢可依</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的指示送到適當的資料庫,如此一來就常見的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">database
shard</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">方案中可能造成效能瓶頸和單點固障的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">proxy(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">或圖一中的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">switch)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">收到</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Connector</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">裡面,從而解決這些問題</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">由各應用端的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">database
driver</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">決定要將指令送到那一個資料庫</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">。目前</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">支援的技術有</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Java</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">、</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Python</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">、</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">PHP</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,即</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Connector/J</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">、</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Connector/Python</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">和</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Connecotr/PHP</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">都是</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Fabric-aware</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">。以</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Java</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">為例,</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">JDBC
driver </span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">必需是</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Connector/J
5.1.30</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">以後的版本</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">可自網址</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">dev.mysql.com/download</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">下載</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Fabirc</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Java</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">程式和一般對單機</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的查詢的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Java</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">程式差不多,只是在建</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">database
connection object</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">時</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">database
conneciton URL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">不是指向資料庫,改為指向</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">管理節點</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;"><span style="font-style: normal;">伺服器的</span></span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;"><span style="font-style: normal;">IP</span></span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;"><span style="font-style: normal;">和端口</span></span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;"><span style="font-style: normal;">-</span></span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;"><span style="font-style: normal;">通常是</span></span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;"><span style="font-style: normal;">32274</span>)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">。當查詢的表是全域性表</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">不做</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">table
shard)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">或</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">DDL(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">例如建表或改表結構</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">時,建立</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">connection
object</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的要加上
“</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">fabricServerGroup=<global-group-id>”</global-group-id></span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">參數
,之後透過這個</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">connection
object</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">所下的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">SQL
</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">指令會送到</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Global
Group</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的主資料庫,再由資料庫複製到其他的高可用組</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(shard)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">中。如果</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">SQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">指令所要操作的表是分區表</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(shard
table)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,則建立</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">connection
object</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">時要在參數加上
“</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">fabricShardTable=<shard-table-name>”
</shard-table-name></span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,之後透過這個</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">connection
object</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">所下的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">SQL
</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">指令會依</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabirc</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">所設定的分表</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(shard)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">原則送到各分區</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(shard)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的高可用組。這樣一來應用程式對這些</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">shard
table</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">下</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">SQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">指令時不需在</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">SQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">中判斷要送到那個資料庫,完全由</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Connector</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">在建立資料庫連線</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(connection)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">時向</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric </span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">所查到的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">server
farm</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的配置資訊</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">那個資料庫屬於那個</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">shard
group</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">、各</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">shard
table</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的拆分原則為何</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">...)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">所決定,而且這個配置在建主連線後就緩存</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(cache)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">在</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Connector</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">所在的應用端</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(Java
memory heap</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">或</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Python</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">或</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">PHP</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">cache</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">中</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,如此在每次下</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">SQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">指令時不需要重復查</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">管理節點,而依存於應用端的分表配置直接送到正確的資料庫而使應用程式的效能不會因為要做表拆分</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(table
shard)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">而有任何降低。</span></span></div>
<div lang="zh-TW">
<br /></div>
<div lang="zh-TW">
<span style="font-family: 新細明體, serif;"><span style="font-size: x-small;"><b>結論</b></span></span></div>
<div lang="zh-TW">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">推出正式發行版才兩個多月,已經引起許多重量級</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">用戶的注意和試用,而</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Oracle</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">也不吝於加大對它投資,以加速使其功能更趨完善,在現在已推出了一個更新版,在最新版的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric
</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">加上了對</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">SSL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">連線的支持,近期內對</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">改良的重點將著重於使</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">對應用程式更透明化</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">例如單一個</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">SQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">對</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">shard
table</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的查詢條件可以跨</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">shard)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">、支援更多的高可用方案</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">例如高可用組之內的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">可以</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">DRBD</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">做高可用或用</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Cluster)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">、提供更友善易用的使用介面等。在此建議關心</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">發展的朋友可以留意這個產品的發展,進一步試用它,將您的意見和心得</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">(</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">或發現的</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">bug)</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">反應給</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Oracle</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">,如果您滿意它所提供的功能和穏定度,可以將它放入您的投產系統正式營運,</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的開發團會很歡迎大家對這個</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">家族的新成員所做的任何貢獻。本篇文章的目的在于介紹</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">MySQL
Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">要解決的問題和</span></span><span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Fabric</span></span><span style="font-family: 新細明體, serif;"><span style="font-size: x-small;">的架構,至於詳細的設定和操作步驟
,容我在下一個文章中以一個範例和各位分享,敬請祈待。</span></span></div>
<div lang="zh-TW">
<br /></div>
杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-78223172983503588772013-01-21T02:30:00.000-08:002013-01-21T02:30:03.739-08:00MySQL Utility的新功能<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisywpKFWnDQXgJReOaLfUIWu4ZPb7zxc5UtanB3ezcBgKGaxNOgXTHxzqAffpvJIenaqqDxHSdM-hbMGtg68dVqEHR5dr5FEBaATz3mAguQgyOECpEVs-wrZsbYNDiusX3ixNKbvJbKfkA/s1600/workbench-utilities.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
除了MySQL數据庫,自dev.mysql.com/downloads還能找到不少的好東西,包括了各種connector,proxy等...。其中MySQL Workbench是較少為人注意到的一個軟體,然而對DBA或資料庫開發者,MySQL Workbench是一個能為我們增加生產力的一個利器。用過MySQL Workbench的人大概都知道它有三大功能-SQL Development、Data Modeling、Server Administrator,分別支援以圖形介面自資料庫查詢/修改資料,以正向工程或反向工程,以圖形化介面做資料庫設計,並以此建立資庫的Data Schema和將Data Dictionary轉為圖形化的資料庫設計模型,以及以圖形化介面協助DBA管理MySQL資料庫,包括開、關、調整、授權、調校資料庫等工作。但是我在這裡想要和各位分享的却是MySQL Workbench自5.2版以後的新功能 - MySQL Utility。<br />
<br />
MySQL Utility是內嵌於MySQL Workbench的一套以Python開發的script,使我們能不用花工夫寫script,以一道指令執行一連串的操作,例如在不資料庫間抄資料、比對資料、故障移轉、設定主從複製等。除了透過MySQL Workbench,它也可以自launch pad(https://launchpad.net/mysql-utilities)下載。<br />
<br />
如果透過MySQL Workbench使用MySQL Utility可自Workbench上列之工具列最右邊的一個工具(如下圖所示)帶出來,或在Workbench的選單中選 'Plugins',再選'Start Shell for MySQL Utilities'即可帶出一個command mode 的terminal。<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisywpKFWnDQXgJReOaLfUIWu4ZPb7zxc5UtanB3ezcBgKGaxNOgXTHxzqAffpvJIenaqqDxHSdM-hbMGtg68dVqEHR5dr5FEBaATz3mAguQgyOECpEVs-wrZsbYNDiusX3ixNKbvJbKfkA/s1600/workbench-utilities.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisywpKFWnDQXgJReOaLfUIWu4ZPb7zxc5UtanB3ezcBgKGaxNOgXTHxzqAffpvJIenaqqDxHSdM-hbMGtg68dVqEHR5dr5FEBaATz3mAguQgyOECpEVs-wrZsbYNDiusX3ixNKbvJbKfkA/s320/workbench-utilities.gif" width="320" /></a></div>
<br />
<br />
MySQL Utility提供的script有以下種類:<br />
1. 資料庫操作,包括-<br />
<ul>
<li>mysqldbcompare – 比對兩個database間的差異,包括table definition和table其中的資料 ,在比對table中的資料時會lock該table;另外還可以加上 '--changes-for' 參數,以一個資料庫為主去改另一個資料庫,使兩個資料庫一致化。這個工具在主從複製時,查是否有資料還有資料沒有自主資料庫複製到從資料庫相當有用。 </li>
</ul>
<br />
範例如下:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$ mysqldbcompare --server1=root:welcome1@localhost:3308 --server2=root:welcome1@localhost:3306 world:world --run-all-test --show-reverse <br /># server1 on localhost: ... connected. <br /># server2 on localhost: ... connected. <br /># Checking databases world on server1 and world on server2 <br /># <br /># WARNING: Objects in server1.world but not in server2.world: <br /># TABLE: tt <br /># <br /># Defn Row Data <br /># Type Object Name Diff Count Check <br /># ------------------------------------------------------------------------- <br /># TABLE City pass pass pass <br /># TABLE Country pass pass pass <br /># TABLE CountryLanguage pass FAIL FAIL <br /># <br /># Row counts are not the same among world.CountryLanguage and world.CountryLanguage. <br /># <br /><br /># Rows in world.CountryLanguage not in world.CountryLanguage <br />+--------------+-----------+-------------+-------------+ <br />| CountryCode | Language | IsOfficial | Percentage | <br />+--------------+-----------+-------------+-------------+ <br />| TWN | Taiya | F | 0.2 | <br />| TWN | Lukai | F | 0.2 | <br />+--------------+-----------+-------------+-------------+ <br /><br /># <br /># Rows in world.CountryLanguage not in world.CountryLanguage <br /># +--------------+-----------+-------------+-------------+ <br /># | CountryCode | Language | IsOfficial | Percentage | <br /># +--------------+-----------+-------------+-------------+ <br /># | TWN | Taiya | F | 0.2 | <br /># | TWN | Lukai | F | 0.2 | <br /># +--------------+-----------+-------------+-------------+ <br /># <br /># Database consistency check failed. <br /># <br /># ...done </span></span><br />
上例顯示比對 在同一個server上,用不同port(3306,3308)的兩個database instance的內容,用3308的資料庫多了一個table – tt,另外用3308的資料庫在CountryCode還多了兩個rows.<br />
<br />
<ul>
<li>mysqldbcopy – 指定database object,將database自來源資料庫instance抄到目的資料庫instance,是一個𨗴輯層的抄寫,以登入來源資料庫,下SELECT指令,再INSERT到目的資料庫的方式進行抄寫。但是現在的問題(MySQL 5.6.9 搭配MySQL Workbench 5.2.45)是執行mysqldbcopy時會有 ‘ERROR: Query failed. 1840: GTID_PURGED can only be set when GTID_EXECUTED is empty.’ 的錯誤訊息' ,bug report上說會在5.6.11解決此問題,參考http://bugs.mysql.com/bug.php?id=68038。</li>
</ul>
<br />
<ul>
<li>mysqldbexport – 倒出資料及資料詞典資料,和mysqldump類似,但能有更多的選項,可導出更多種的格式,以 '--format' 指定產出的格式,可產出sql﹑grid﹑csv﹑tab﹑vertical (各column垂直列示) 。如果沒指定 '--export=data' 則只會傳出建table的SQL DDL</li>
</ul>
<br />
範例如下:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$ mysqldbexport --server=root:welcome1@127.0.0.1:3306 --export=data -v world</span></span><br />
<br />
<ul>
<li>mysqldbimport – 倒入資料及資料詞典資料</li>
</ul>
<br />
<ul>
<li>mysqldiff – 比對不同資料庫物件的定義的差異,和mysqldbcompare不同,它不會比對table內各行的值,只會看table况stored procedure是否有差異。</li>
</ul>
<br />
範例如下:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$mysqldiff --server1=root:welcome1@127.0.0.1:3306 --server2=root:welcome1@127.0.0.1:3308 --difftype=context world.CountryLanguage:world.CountryLanguage</span></span><br />
2. 一般性的作業,包括 - <br />
<ul>
<li>mysqldiskusage – 顯示資料庫對磁碟空間的使用,大致上等同在OS下 ‘du' 的指令。</li>
</ul>
<br />
<ul>
<li>mysqlindexcheck – 檢查是否有多餘的索引。</li>
</ul>
<br />
範例如下:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$ mysqlindexcheck --server=root:welcome1@127.0.0.1:3306 world <br /># Source on 127.0.0.1: ... connected. <br /># The following indexes are duplicates or redundant for table world.CountryLanguage: <br /># <br />CREATE INDEX CountryCode ON world.CountryLanguage (CountryCode) USING BTREE <br /># may be redundant or duplicate of: <br />ALTER TABLE world.CountryLanguage ADD PRIMARY KEY (CountryCode, Language) </span></span><br />
<br />
<ul>
<li>mysqlmetagrep – 找尋指定(可加wild card到搜尋字串)的資料物件的定義,包括stored program。</li>
</ul>
<br />
範例如下:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$ mysqlmetagrep --pattern="t%" --server=root:welcome1@127.0.0.1 --format=vertical world<br />************************* 81. row ************************* <br /> Connection: root:*@127.0.0.1:3306 <br /> Object Type: TABLE <br /> Object Name: table_io_waits_summary_by_table <br /> Database: performance_schema <br /> Field Type: TABLE <br /> Matches: table_io_waits_summary_by_table <br />************************* 82. row ************************* <br /> Connection: root:*@127.0.0.1:3306 <br /> Object Type: TABLE <br /> Object Name: table_lock_waits_summary_by_table <br /> Database: performance_schema <br /> Field Type: TABLE <br /> Matches: table_lock_waits_summary_by_table </span></span><br />
<br />
<ul>
<li>mysqlprocgrep – 指定類型找show processlist的資訊。</li>
</ul>
<br />
<br />
3. 高可用 <br />
<br />
<ul>
<li>mysqlfailover – 為MySQL 5.6.5以後的MySQL資料庫做自動故障移轉,我個人認為這是MySQL Utilities最有趣的一部份,它能監測主從複製架構中各資料庫的健康狀況(特別是主資料庫),在主資料庫不能使用時自動故障移。要使該程式發生作用,必需將GTID(Global Transaction Identifier)開啟,也就是在my.cnf檔串加上GTID_MODE=ON的參數配置,用戶還以設定—interval參數以秒為單位指定多久去測一次主數据庫的狀況,再以—ping參數設定多少次測試沒回應,就以—failover-mode參數所指定的故障移轉方式進行故障移轉。--failover-mode可指定的故障移轉方式有:</li>
</ul>
<ol>
<li>auto:依mysqlfailover所指定的故障移轉侯選資料庫順序自動做故障移轉,如果在故障移轉序列中沒有找到可用的資料庫,則到所有的從服務器中找故障移轉的資料庫;當故障移轉到從資料庫,且將之升級為主資料庫,其他的從資料庫會將此新的(剛升級的)主資料庫設為主資料庫。如果完全找不到可以作故障移轉的從資料庫,則會產生一個錯誤訊息再結束該命令。</li>
<li>elect:和auto類似,只是當主資資料庫當掉時,自故障移轉侯選資料庫序列中找不到適合的資料庫,則不會找其他的從資料庫,直接丟錯誤訊息,然後結束該命令。</li>
<li> fail:主資料庫當掉時,不做故障移轉,直接丟錯誤訊息,然後結束該命令。</li>
</ol>
<br />
mysqlfailover的使用範例如下:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">$ mysqlfailover --master=root:welcome1@127.0.0.1:3306 --discover-slaves-login=root:welcome1
<br /># Discovering slaves for master at 127.0.0.1:3306
<br /># Checking privileges.
<br /># WARNING: You may be mixing host names and IP addresses. This may result in negative status reporting if your DNS services do not support reverse name lookup.
<br />#
<br /># Failover console will start in 10 seconds.
</span></span><br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">MySQL Replication Failover Utility
<br />Failover Mode = auto Next Interval = Mon Jan 21 11:34:06 2013
<br /><br />Master Information
<br />------------------
<br />Binary Log File Position Binlog_Do_DB Binlog_Ignore_DB
<br />ivan-ubuntu-bin.0000 231
</span></span><br />
<br />
當mysqlfailover成功開啟後,在console上可看到以下訊息,它顯示mysqlfailover定期(此處為10秒)ping主資料庫和從資料庫。<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">GTID Executed Set
<br />CE495FF3-5965-11E2-8479-0023184A0390:1-10 [...]
<br /><br />Replication Health Status
<br />+------------+-------+---------+--------+------------+---------+
<br />| host | port | role | state | gtid_mode | health |
<br />+------------+-------+---------+--------+------------+---------+
<br />| 127.0.0.1 | 3306 | MASTER | UP | ON | OK |
<br />| localhost | 3308 | SLAVE | UP | ON | OK |
<br />| localhost | 3310 | SLAVE | UP | ON | OK |
<br />+------------+-------+---------+--------+------------+---------+
</span></span><br />
<br />
上列指令會自動找連上該指定的主資料庫之從資料庫,當成故障移轉序列資料庫;在mysqlfailover的console上可觀查到有一個主資料庫在IP為127.0.0.1,佔用端口為3306,兩個從資料庫分別在localhost,佔用端口為3308及3310。但是要注意的是,在該指令生效前必需在my.cnf中加上以下參數:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">report-host=<host_ font="font" size="2">name></host_></span><master-host><br />report-port=<port font="font" size="2">#></port></master-host></span><master-port><br />report-user=<user font="font" size="2">></user></master-port><br />
<slave-server-account><br />report-password=<password><slave-server-account-password><br />relay-log-info-repository=table
<br />master-info-repository=table
</slave-server-account-password></password></slave-server-account><br />
對上列參數的說明請參考http://dev.mysql.com/doc/refman/5.6/en/slave-logs.html<br />
<br />
當故障移轉發生時-例如關掉主資料庫,可在mysqlfailover console上看到下列訊息,它顯示mysqlfailover開始做故障移轉,且挑在localhost用3308的從資料庫升級成主資料庫。<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Failover starting in 'auto' mode...
<br /># Candidate slave localhost:3308 will become the new master.
<br /># Preparing candidate for failover.
<br /><br />MySQL Replication Failover Utility
<br />Failover Mode = auto Next Interval = Mon Jan 21 11:47:40 2013
<br /><br />Master Information
<br />------------------
<br />Binary Log File Position Binlog_Do_DB Binlog_Ignore_DB
<br />ivan-ubuntu-bin.0000 271 </span></span>
<br />
<br />
當故障移轉完成時, console上可看到以下訊息,它顯示新的主資料庫在localhost,所用的端口為3308;<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">GTID Executed Set
<br />68E65F0B-5A40-11E2-8A0B-0023184A0390:1-4 [...]
<br /><br />Replication Health Status
<br />+------------+-------+---------+--------+-----------+---------------------------------------------------------------------+
<br />| host | port | role | state | gtid_mode |health |
<br />+------------+-------+---------+--------+-----------+---------------------------------------------------------------------+
<br />| localhost | 3308 | MASTER | UP | ON |OK |
<br />| localhost | 3310 | SLAVE | UP | ON | SQL thread is not<span style="font-size: x-small;"> </span>running., Slave has 1 transactions behindmaster. |
<br />+------------+-------+---------+--------+-----------+---------------------------------------------------------------------+
</span></span><br />
<br />
mysqlreplicate – 配置主從複製,該指令可使我們不需登入MySQL客戶端直接設定主從複製架構,範例如下:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">$ mysqlreplicate --master=root:welcome1@127.0.0.1:3306 --slave=root:welcome1@127.0.0.1:3308 --master-log-file=ivan-ubuntu-bin.000014 --master-log-pos=231 –rpl-user=root
<br /><br /># master on 127.0.0.1: ... connected.
<br /># slave on 127.0.0.1: ... connected.
<br /># Checking for binary logging on master...
<br /># Setting up replication...
<br /><br /># ...done.</span></span><br />
<ul>
<li>mysqlrpladmin – MySQL 5.6.5 為MySQL 5.6.5做主從複製管理、切換、故障移轉;這是除了mysqlfailover之外另一個很用的工具。它使我們能簡化主從複製資料庫的管理工作,能應用系統的交易自主資料庫切換到指定的從資料,同時在切換時會鎖定資料庫,使它不會丟失任何交易;在把交 易切回原主資料庫時,會等原主資料庫的資料都補齊時才會切回來。</li>
</ul>
本工具的指令如下:<br />
<ol>
</ol>
<ul><ul>
<li>elect:根据GTID自一序列從資料庫中選一個資料庫當成switchover或failover的對象(找GTID跟得最近的)</li>
</ul>
</ul>
<ol>
</ol>
<ul><ul>
<li> failover:依elect或指定的從資料庫做故障移轉 </li>
</ul>
</ul>
範例如下:<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">$ mysqlrpladmin --master=root:welcome1@127.0.0.1:3306 --discover-slaves-login=root:welcome1 failover
<br /><br /># Discovering slaves for master at 127.0.0.1:3306
<br /># Checking privileges.
<br /># Performing failover.
<br /># Candidate slave localhost:3308 will become the new master.
<br /># Preparing candidate for failover.
<br /># Creating replication user if it does not exist.
<br /># Stopping slaves.
<br /># Performing STOP on all slaves.
<br /># Switching slaves to new master.
<br /># Starting slaves.
<br /># Performing START on all slaves.
<br /># Checking slaves for errors.
<br /># Failover complete.
<br />#
<br /># Replication Topology Health:
<br />+------------+-------+---------+--------+------------+---------+
<br />| host | port | role | state | gtid_mode | health |
<br />+------------+-------+---------+--------+------------+---------+
<br />| localhost | 3308 | MASTER | UP | ON | OK |
<br />+------------+-------+---------+--------+------------+---------+
</span></span><br />
<ol>
</ol>
<ul><ul>
<li>gtid:找出指定主資料庫及其從資料庫目前的GTID</li>
</ul>
</ul>
<ol>
</ol>
範例如下:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$ mysqlrpladmin --master=root:welcome1@127.0.0.1:3306 --discover-slaves-login=root:welcome1 gtid
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Discovering slaves for master at 127.0.0.1:3306
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Checking privileges.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">#
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># UUIDS for all servers:
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">+------------+-------+---------+---------------------------------------+
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| host | port | role | uuid |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">+------------+-------+---------+---------------------------------------+
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| 127.0.0.1 | 3306 | MASTER | ce495ff3-5965-11e2-8479-0023184a0390 |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| localhost | 3308 | SLAVE | df6e1330-5965-11e2-847a-0023184a0390 |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| localhost | 3310 | SLAVE | 68e65f0b-5a40-11e2-8a0b-0023184a0390 |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">+------------+-------+---------+---------------------------------------+
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">#
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Transactions executed on the server:
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">+------------+-------+---------+----------------------------------------------+
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| host | port | role | gtid |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">+------------+-------+---------+----------------------------------------------+
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| 127.0.0.1 | 3306 | MASTER | CE495FF3-5965-11E2-8479-0023184A0390:1-11 |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| 127.0.0.1 | 3306 | MASTER | DF6E1330-5965-11E2-847A-0023184A0390:1-2 |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| localhost | 3308 | SLAVE | 68E65F0B-5A40-11E2-8A0B-0023184A0390:1-4 |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| localhost | 3308 | SLAVE | CE495FF3-5965-11E2-8479-0023184A0390:1-11 |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| localhost | 3308 | SLAVE | DF6E1330-5965-11E2-847A-0023184A0390:1-17 |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| localhost | 3310 | SLAVE | 68E65F0B-5A40-11E2-8A0B-0023184A0390:1-5313 |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| localhost | 3310 | SLAVE | CE495FF3-5965-11E2-8479-0023184A0390:1-11 |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| localhost | 3310 | SLAVE | DF6E1330-5965-11E2-847A-0023184A0390:1-4 |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">+------------+-------+---------+----------------------------------------------+
</span></span><br />
<br />
<ol>
</ol>
<ul><ul>
<li>health:列示指定的主資料庫和其從資料庫的狀況</li>
</ul>
</ul>
<ol>
</ol>
範例如下:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$ mysqlrpladmin --master=root:welcome1@127.0.0.1:3306 --discover-slaves-login=root:welcome1 health
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Discovering slaves for master at 127.0.0.1:3306
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Checking privileges.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">#
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Replication Topology Health:
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">+------------+-------+---------+--------+------------+---------+
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| host | port | role | state | gtid_mode | health |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">+------------+-------+---------+--------+------------+---------+
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| 127.0.0.1 | 3306 | MASTER | UP | ON | OK |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| localhost | 3308 | SLAVE | UP | ON | OK |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| localhost | 3310 | SLAVE | UP | ON | OK |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">+------------+-------+---------+--------+------------+---------+
</span></span><br />
<br />
<ol>
</ol>
<ul><ul>
<li>reset:清掉所有的主從複製的設定,相當於在所有的從資料庫上下'stop slave; reset slave all;'的指令</li>
</ul>
</ul>
<ol>
</ol>
範例如下:<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">$ mysqlrpladmin --master=root:welcome1@127.0.0.1:3306 --discover-slaves-login=root:welcome1 reset
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># Discovering slaves for master at 127.0.0.1:3306
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># Checking privileges.
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># Performing STOP on all slaves.
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># Executing stop on slave localhost:3308 Ok
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># Executing stop on slave localhost:3310 Ok
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># Performing RESET on all slaves.
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># Executing reset on slave localhost:3308 Ok
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># Executing reset on slave localhost:3310 Ok
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># ...done.
</span></span><br />
<ol>
</ol>
<ul><ul>
<li>start:開始主從複製,相當於在所有的從資料庫下'start slave;'</li>
</ul>
</ul>
<ol>
</ol>
<ul><ul>
<li>stop:關掉主從複製,相當於在所有的從資料庫下'stop slave;'</li>
</ul>
</ul>
<ol>
</ol>
<ul><ul>
<li>switchover:主從複製架構中,主從角色對掉</li>
</ul>
</ul>
<ol>
</ol>
<br />
範例如下:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$ mysqlrpladmin --master=root:welcome1@127.0.0.1:3306 --new-master=root:welcome1@127.0.0.1:3308 switchover
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Checking privileges.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Performing switchover from master at 127.0.0.1:3306 to slave at 127.0.0.1:3308.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Checking candidate slave prerequisites.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Waiting for slaves to catch up to old master.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Stopping slaves.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Performing STOP on all slaves.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Switching slaves to new master.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Starting all slaves.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Performing START on all slaves.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Checking slaves for errors.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Switchover complete.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">#
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Replication Topology Health:
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">+------------+-------+---------+--------+------------+---------+
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| host | port | role | state | gtid_mode | health |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">+------------+-------+---------+--------+------------+---------+
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">| 127.0.0.1 | 3308 | MASTER | UP | ON | OK |
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">+------------+-------+---------+--------+------------+---------+
</span></span><br />
<br />
在執行前要確認複製的設定都正,例如,配置成兩個主資料庫,要清乾淨原來的從資料庫設定要用'reset slave all;'指令<br />
<br />
<ul>
<li>mysqlrplcheck – 檢查主從複製的配置,範例如下:</li>
</ul>
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">$ mysqlrplcheck --master=root:welcome1@127.0.0.1:3308 --slave=root:welcome1@127.0.0.1:3310 –show-slave-status
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># master on 127.0.0.1: ... connected.
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># slave on 127.0.0.1: ... connected.
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Test Description Status
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">---------------------------------------------------------------------------
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Checking for binary logging on master [pass]
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Are there binlog exceptions? [pass]
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Replication user exists? [pass]
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Checking server_id values [pass]
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Checking server_uuid values [pass]
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Is slave connected to master? [pass]
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Check master information file [pass]
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Checking InnoDB compatibility [pass]
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Checking storage engines compatibility [pass]
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Checking lower_case_table_names settings [pass]
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Checking slave delay (seconds behind master) [pass]
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># Slave status:
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Slave_IO_State : Waiting for master to send event
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_Host : localhost
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_User : root
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_Port : 3308
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Connect_Retry : 60
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_Log_File : ivan-ubuntu-bin.000010
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Read_Master_Log_Pos : 271
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Relay_Log_File : ivan-ubuntu-relay-bin.000001
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Relay_Log_Pos : 4
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Relay_Master_Log_File :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Slave_IO_Running : Yes
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Slave_SQL_Running : No
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Replicate_Do_DB :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Replicate_Ignore_DB :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Replicate_Do_Table :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Replicate_Ignore_Table :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Replicate_Wild_Do_Table :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Replicate_Wild_Ignore_Table :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Last_Errno : 1593
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Last_Error : Failed during slave workers initialization
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Skip_Counter : 0
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Exec_Master_Log_Pos : 0
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Relay_Log_Space : 7705
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Until_Condition : None
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Until_Log_File :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Until_Log_Pos : 0
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_SSL_Allowed : No
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_SSL_CA_File :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_SSL_CA_Path :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_SSL_Cert :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_SSL_Cipher :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_SSL_Key :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Seconds_Behind_Master : None
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_SSL_Verify_Server_Cert : No
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Last_IO_Errno : 0
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Last_IO_Error :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Last_SQL_Errno : 1593
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Last_SQL_Error : Failed during slave workers initialization
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Replicate_Ignore_Server_Ids :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_Server_Id : 2
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_UUID : df6e1330-5965-11e2-847a-0023184a0390
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_Info_File : mysql.slave_master_info
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> SQL_Delay : 0
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> SQL_Remaining_Delay : None
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Slave_SQL_Running_State :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_Retry_Count : 86400
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_Bind :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Last_IO_Error_Timestamp :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Last_SQL_Error_Timestamp : 130121 11:42:31
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_SSL_Crl :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Master_SSL_Crlpath :
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Retrieved_Gtid_Set : DF6E1330-5965-11E2-847A-0023184A0390:5-17
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> Executed_Gtid_Set : 68E65F0B-5A40-11E2-8A0B-0023184A0390:1-5313,
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">CE495FF3-5965-11E2-8479-0023184A0390:1-10,
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">DF6E1330-5965-11E2-847A-0023184A0390:1-4
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># ...done.
</span></span><br />
<br />
<ul>
<li>mysqlrplshow – 列示複製結構的拓樸圖,範例如下:</li>
</ul>
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">$ mysqlrplshow --master=root:welcome1@127.0.0.1:3308 --discover-slaves-login=root:welcome1
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># master on 127.0.0.1: ... connected.
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># Finding slaves for master: 127.0.0.1:3308
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># Replication Topology Graph
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">127.0.0.1:3308 (MASTER)
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> |
</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> +--- 127.0.0.1:3310 - (SLAVE)
</span></span><br />
<br />
<ul>
<li>mysqlserverclone – 在空的資料庫中以現有的資料庫為範本建一個新的資料庫,範例如下:</li>
</ul>
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$ mysqlserverclone --server=root:welcome1@localhost:3306 --new-data=./data4 --new-port=3312 --new-id=4 --root-password=welcome1
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Cloning the MySQL server running on localhost.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Creating new data directory...
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Configuring new instance...
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Locating mysql tools...
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Setting up empty database and mysql tables...
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Starting new instance of the server...
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Testing connection to new instance...
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Success!
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Setting the root password...
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Connection Information:
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># -uroot -pwelcome1 --socket=/home/ivan/data4/mysql.sock
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">#...done.
</span></span><br />
<br />
我原本以為會以指定的資料庫instance為範本-在localhost上用3306端口,完全複製同樣內容的資料庫instance到./data4,同時用3312為端口;但是出乎我意料之外的是,我只看到一個空的資料庫instance,只有預訊的資料庫 -如mysql,information_schema,先前我在第一個資料庫instance以手動方式建的資料庫在新的資料庫完全看不到。<br />
<br />
<ul>
<li>mysqlserverinfo – 列示資料庫伺服器的資訊,範例如下:</li>
</ul>
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$ mysqlserverinfo --server=root:welcome1@127.0.0.1:3308 --format=vertical
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Source on 127.0.0.1: ... connected.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><br /></span></span>
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">************************* 1. row *************************
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> server: 127.0.0.1:3308
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> version: 5.6.9-rc-log
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> datadir: /mysql56/data2/
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> basedir: /home/ivan/mysql-5.6.9-rc-linux-glibc2.5-i686
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> plugin_dir: /home/ivan/mysql-5.6.9-rc-linux-glibc2.5-i686/lib/plugin/
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> config_file: /etc/mysql/my.cnf, /home/ivan/mysql-5.6.9-rc-linux-glibc2.5-i686/my.cnf
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> binary_log: ivan-ubuntu-bin.000010
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> binary_log_pos: 271
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> relay_log: ivan-ubuntu-relay-bin.000001
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> relay_log_pos: 4
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">1 rows.
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">#...done.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-12841759882316577502011-09-13T02:49:00.000-07:002011-09-21T07:24:38.542-07:00Oracle MySQL/Linux/Virtual Machine (LVM) Integrated Demo Script<span style="font-weight: bold;">Objective</span><br />To show that MySQL runs on top of Oracle Virtual Machine and Oracle Enterprise Linux would maximize the value for the customers by offering the lowest total cost of ownership, the highest performance, scalability and productivity. This Oracle LVM integrated demo includes several software/techinques from Oracle, they are MySQL Enterprise Monitor, MySQL Database, MySQL replication, MySQL Proxy, Oracle Virtual Machine, Oracle Virtual Machine Template and Oracle Linux. Those products would bring the following the users:<br />MySQL Enterprise Monitor helps MySQL DBA managing the database, improving performance, and increase DBA's skill. It maximize the SLA of the database and help the DBAs increase their productivity.<br />MySQL Proxy enable scale out solution by offering read-write splitting features in the most cost effective manner.<br />MySQL replication helps the user increase availability and capacity of the database in a lowest cost.<br />The user would enjoin the best performance by adopting MySQL on top of Oracle Enterprise Linux.<br />Oracle Virtual Machine template for MySQL increase the productivity of the DBA by per-configured/optimized MySQL database, and decrease the resource needed for deploying MySQL.<br />Oracle Virtual Machine would help the users with maximize HA from virtual machine layer, it helps MySQL application get zero down time, when migrating the virtual machine between different servers.<br /><br /><span style="font-weight: bold;">Demo Environment</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrF-oGaGBXZvylnJBigS9QXi6vP74yGGwX9PzHtlGCNOEcqeNaFStjct4mUSNmWF8u8nWwQB8M8YMXtDLd6elyt9JgCur-Shlt4hyphenhyphenK3Nm6utZnI3BDvgUMytoNaTsIZGPUNIIeaxahUM8H/s1600/Demo_Flow.png"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 313px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrF-oGaGBXZvylnJBigS9QXi6vP74yGGwX9PzHtlGCNOEcqeNaFStjct4mUSNmWF8u8nWwQB8M8YMXtDLd6elyt9JgCur-Shlt4hyphenhyphenK3Nm6utZnI3BDvgUMytoNaTsIZGPUNIIeaxahUM8H/s400/Demo_Flow.png" alt="" id="BLOGGER_PHOTO_ID_5651784962851850514" border="0" /></a><span style="font-weight: bold;">The Servers of the Demo Environment</span><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0YW-FqCtP4S7-ZUO7qFVkifmDM791wz0agMDujLSq3e-HuR1EnRoq2huN0eBq-Hd_TOqT4ognuyXR_1DHJ36i0bvfyiU81pBHWubhveTkcRg6t1BAidw3VYlwnrLMPyCknc2z4Lp_Ee4H/s1600/servers.png"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 243px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0YW-FqCtP4S7-ZUO7qFVkifmDM791wz0agMDujLSq3e-HuR1EnRoq2huN0eBq-Hd_TOqT4ognuyXR_1DHJ36i0bvfyiU81pBHWubhveTkcRg6t1BAidw3VYlwnrLMPyCknc2z4Lp_Ee4H/s400/servers.png" alt="" id="BLOGGER_PHOTO_ID_5651782090539496386" border="0" /></a><span style="font-weight: bold;">Install and Configure the Demo Environment</span><br />As above graph shows, we apply 3 physical servers – ovmm, ov1, ovs2, ovmm contains OVM Mangaer, PHP pages that act as MySQL client application, and MySQL Enterprise Monitor, ovs1 and ovs2 need to be registered on Oracle Virtual Machine manager as virtual machine server, ovs2 contains one virtual machine for master database, and one virtual machine for first slave, ovs2 contains one virtual machine for 2nd slave database, and ovs2 also act as the backup server for the master database, we will demo the fail-over features by live migration on the Virtual Machine layer. The details of install OVM with HA please refer the document http://www.rachelp.nl/userfiles/file/Create_oraclevm_haserverpool.pdf and. There are several points need to take care of while installing the environment, I list them as below:<br />For high availability from the virtual machine layer, we need to configure HA options with OVM servers pool on OVM manager, and the servers that support HA need to attach to a shared storage, in this case, it is NFS, and we need to add read_write, sync, and no_root_squash options when doing NFS export, refer http://download.oracle.com/docs/cd/E15458_01/doc.22/e15440/toc.htm#BABDEFDG for the details.<br />MySQL virtual machine template will runs firewall when ever is started, we need to turned if off manually.<br />To enable replication and MySQL Enterprise Monitor Agent, the time lag between each virtual machine servers could not larger than a certain period, for say 15 seconds.<br />The available space on the shared storage need to larger than 70 GB.<br />For some cases when restart virtual machine the option file - /etc/my.cnf could reset to the default value.<br /><span style="font-weight: bold;">Demo Flow</span><br />1 Show MySQL, OVM, Oracle Linux, Oracle Virtual Machine, Oracle Virtual Machine Template for MySLQ download address on Oracle eDelivery.<br />2 OVM/OEL Demo<br /><ul><li>Navigate OVM interface.</li></ul><ul><li><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf6trM6WwwH5ty8Qu_KO3wOG6tG_Aa2Of_2ek7FjHWzAMCEiofnXfzC9U4x5-XBlN9GX82Ia5EvMBPaynTm3MWk3VLmHGzM8gA52OAZlR5qcCzL4WuJS0W5BX_gdZMElzln4BrauV0fVIf/s1600/OVM_Console.png"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 157px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf6trM6WwwH5ty8Qu_KO3wOG6tG_Aa2Of_2ek7FjHWzAMCEiofnXfzC9U4x5-XBlN9GX82Ia5EvMBPaynTm3MWk3VLmHGzM8gA52OAZlR5qcCzL4WuJS0W5BX_gdZMElzln4BrauV0fVIf/s400/OVM_Console.png" alt="" id="BLOGGER_PHOTO_ID_5651783342603391954" border="0" /></a>Create/Initiate virtual machine with Oracle Virtual Machine Template for MySQL (the template was imported on the “Resource” tab).</li></ul>OVM template for MySQL offers the users with a configured/tuned MySQL environment, we do not need to tune MySQL options and it can be a base for customized template to foster the deploying speed. For example, we can create template for slave servers from the standard OVM template for MySQL, so we can easily extend the capacity by adding more slave servers from the customized OVM MySQL slave template.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrygv8NAYuJXksJG6xFzbJ3NGadlpZxOEIyHyBmoO_vSDOo9VhAWzUd0JZyr7HhIK77xyyeMkm_Dw6bHtcM-FV1iZmfdk4WmFtSSJcoXnuNcecovIoQ_MPFT5OdB0IiUrKwiQlW_lJuroM/s1600/OVM_Create_Template.png"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 144px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrygv8NAYuJXksJG6xFzbJ3NGadlpZxOEIyHyBmoO_vSDOo9VhAWzUd0JZyr7HhIK77xyyeMkm_Dw6bHtcM-FV1iZmfdk4WmFtSSJcoXnuNcecovIoQ_MPFT5OdB0IiUrKwiQlW_lJuroM/s400/OVM_Create_Template.png" alt="" id="BLOGGER_PHOTO_ID_5651786071658291426" border="0" /></a>3 MySQL Demo<br /><ul><li>Show slide 17 of MySQL technical presentation, explain the demo scenario to the audience</li></ul><ul><li>Show MySQL master on 10.186.122.69</li></ul>ssh root@10.186.122.69, password: “oracle”<br />login MySQL master server, with username “root” and pssword “oracle” by<br />mysql -h 10.186.122.69 -P 3306 -u root -p oracle<br />use world;<br />show tables;<br />select code, name, continent, population, gnp from Country;<br /><ul><li>Show MySQL slave 1 on 10.186.122.72 and slave 2 on 10.186.122.174</li></ul>login MySQL slave 1 with usrname “root”, password “oracle”<br />mysql -h 10.186.122.72 -P3306 -u root -p oracle<br />show slave status\G<br />use world;<br />show tables;<br />select code, name, continent, population, gnp from Country;<br />login MySQL slave 1 with usrname “root”, password “oracle”<br />mysql -h 10.186.122.174 -P3306 -u root -p oracle<br />show slave status\G<br />use world;<br />show tables;<br />select code, name, continent, population, gnp from Country;<br /><ul><li>Show MySQL Proxy on ovmm.sg.oracle.com</li></ul>ssh root@ovmm.sg.oracle.com, password “Pass0rd”<br />ps -ef | grep proxy (show MySQL Proxy command)<br /><ul><li>Show PHP demo application source code on ovmm.sg.oracle.com</li></ul>vi /var/www/html/worldApp/application/phpQueryPage.php and /var/www/html/worldApp/application/phpUpdatePage.php<br />high light the code of<br />$con = mysql_connect("127.0.0.1:4040", "root", "oracle");<br />show the audience that the database connection is through MySQL Proxy, and read-write splitting is accomplished by this service.<br /><ul><li>Display phpQueryPage page from browser, the URL is below:</li></ul>http://ovmm.sg.oracle.com/worldApp/application/phpQueryPage.php<br />show audience the host name on the page, it will change to the other slave when the current slave server is down (it shows slave 1 at this moment)<br />shutdown slave 1 (shutdown virtual machine – slave 1 is an approach that close to the real case, but it take more time, shutdown database would be fast, it should be easier to keep the pace of demo)<br />show audience the host name on the page, it had changed to the slave 2 at this moment<br /><ul><li>Demo the master slave replication feature by:</li></ul>Show phpUpdatePage.php<br />Query the data by type “HKG” in the “Code” field, and press enter<br />Insert one record by changing the “Code” field form “HKG” to “ABX”, and press “Insert” button, and query the new record out by type “ABX” on the “Code” filed then press “Query” button.<br />Back to phpQueryPage.php, the country code “ABX” shows on the query page<br /><ul><li>Demo the live migration feature, and MySQL HA supported by the feature</li></ul>Ping 10.186.122.69 from ovmm.sg.oracle.com, show the response and message sequence numbers displayed on the terminal<br />Live migration from OVM interface, from OVM manager by pick “Live Migration” from the “More Action” list.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiScwJU1dATFBmRuRuA2AUWSJFUUClRxGaH_u1MQyugwzrG-mmdGT-5nvH9V0gFJMX9twIDuuoLBCK9OH0QC4mo45nEhCDa618Ic5N1u8yWThFl84-kykdcDS65Xy09GjxzXh2-buE_kXTP/s1600/LiveMigration.png"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 153px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiScwJU1dATFBmRuRuA2AUWSJFUUClRxGaH_u1MQyugwzrG-mmdGT-5nvH9V0gFJMX9twIDuuoLBCK9OH0QC4mo45nEhCDa618Ic5N1u8yWThFl84-kykdcDS65Xy09GjxzXh2-buE_kXTP/s400/LiveMigration.png" alt="" id="BLOGGER_PHOTO_ID_5651788330316361042" border="0" /></a>Show “ping <db_ip>”, there is a gap with the message sequence number from the ping output after live migration, but the interruption is very small (less than 2 seconds)<br />Show the message sequence number leap, but the phpUpdatePage.php works fine after live migration, the user interface has no interruption for the migration on the virtual machine layer.<br /></db_ip>杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-64074741380254060682011-05-08T05:20:00.000-07:002011-05-19T20:16:11.051-07:00Benchmark MySQL 5.5.9 on Oracle Sun X4170 M2<span style="font-family:Arial, sans-serif;">As I posted the testing result from MySQL on HP server (refer to the previous benchmark), my colleagues from Oracle System Practice are very interesting in MySQL performance on Sun's x86 servers (of course we hope we can proof the servers from Oracle are superior than HP). With the help from our VAD partner - Bestcom, we got a Sun X7140 M2 installed in our data center, thanks for the endeavor form my colleague Cano Lai, the server was setup and and ready for testing very soon.<br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">Technical Specification</span></span><br /><br />The configuration of the system as below:<br /><br /><span style="font-weight: bold;">Server</span></span><span style="font-family:Arial, sans-serif;"><br /></span><br /><ul><li><span style="font-family:Arial, sans-serif;">CPU: 6 Core Intel E5640 * 2, 2 threads with each core, 12 Cores/24 Threads in total</span></li><li><span style="font-family:Arial, sans-serif;">Memory: 16G Bytes</span></li><li><span style="font-family:Arial, sans-serif;">Hard Disk: 146GB * 2</span></li></ul><span style="font-family:Arial, sans-serif;"><br /><span style="font-weight: bold;">Operating System</span><br /><br />Red Hat Enterprise Linux 5.6, with base kernel ( Linux Kernel 2.6.18-238.el5 ) 1st run, Oracle Enterprise Kernel ( Linux Kernel 2.6.32-100.26.2 el5) for the 2nd run.<br /><br /><span style="font-weight: bold;">Database</span><br /><br /> MySQL 5.5.9 Community Edition with InnoDB storage engine<br /><span style="font-size:130%;"><br /><span style="font-weight: bold;">Tasks</span></span><br /><br /></span><ul><li><span style="font-family:Arial, sans-serif;">Setup Sun X4170 M2</span></li><li><span style="font-family:Arial, sans-serif;">Install Red Hat Linux 5.6</span></li><li><span style="font-family:Arial, sans-serif;">Install MySQL 5.5.9</span></li></ul><span style="font-family:Arial, sans-serif;">We downloaded MySQL for Red Hat & Oracle Enterprise Linux 5 (x86, 64-bit) from MySQL download site, apart from MySQL server, shared component is needed for compiling Sysbench.<br /></span><ul><li><span style="font-family:Arial, sans-serif;"> Install Sysbench 0.4.12</span></li></ul><span style="font-family:Arial, sans-serif;">Following the installion steps on Sysbench web site http://sysbench.sourceforge.net/docs/#install, would get things done easily, the only thing that need to take care of is to install MySQL shared component in advanced, and let the software and libraries should be accessible.<br /></span><ul><li><span style="font-family:Arial, sans-serif;">Tune MySQL</span></li></ul><span style="font-family:Arial, sans-serif;">Some of tuned options in my.cnf file are list as below:<br /><br /># The number of threads might be more than 1000, set to 1500 to accommodate it<br />max_connections = 1500<br /># The server has 16 GB RAM, evaluate the overhead from OS and Sysbench,<br /># 12 GB innodb buffer pool, could be fully utilize the available memory<br />innodb_buffer_pool_size = 12G<br /># Multiple innodb buffer pools could reduce contention for some of resources such as<br /># free lists, flush lists, LRUs and buffer pool mutex<br />innodb_buffer_pool_instance=3<br /># New file format from MySQL 5.5<br />innodb_file_format=Barracuda<br />innodb_file_per_table<br /># Increase the number of threads for writing dirty pages<br />innodb_write_io_threads = 8<br /># Increase the number of I/O threads for read operations<br />innodb_read_io_threads = 8<br /># Increase the number of innodb_thread_concurrency to fully utilize the multiple<br /># cores/threads environment<br />innodb_thread_concurrency = 24<br /># innodb_flush_log_at_trx set to 1, InnoDB will flush (fsync) the transaction logs to the<br /># disk at each commit, which offers full ACID behavior. This a conservative approach.<br /># If set this to 0 or 2 might reduce disk I/O and increase the measurements of the test.<br />innodb_flush_log_at_trx_commit = 1<br /><br /></span><ul><li><span style="font-family:Arial, sans-serif;">Test against MySQL on Red Hat 5.6 based kernel with Sysbench</span></li></ul><span style="font-family:Arial, sans-serif;"> The following command would generate data for the test, we had 100 million rows in the largest table.<br /><br />nohup sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=100000000 --mysql-user= --mysql-password= prepare<br /><br /> Execute the test with the following command, and collect the test results from the outputs of nohup<br /><br />nohup sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=100000000 --num-threads= --mysql-user= --mysql-password= run<br /></span><ul><li><span style="font-family:Arial, sans-serif;">Substitute Red Hat 5.6 based kernel with Oracle Enterprise Linux Kernel</span></li></ul><span style="font-family:Arial, sans-serif;">Apart from MySQL performance on Oracle server, we were curious if there is any difference between the Based Kernel and Oracle Unbreakable Kernel. There was time available after the 1st run, we decided to have the same benchmark on the 2nd run which had the same configuration with the previous run, but replace the OS kernel with Oracle UEK. To upgrade the kernel is not a difficulty job, the required command as below:<br /><br /># cd /etc/yum.repos.d/<br /># wget http://public-yum.oracle.com/public-yum-ol6.repo<br /># wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6<br /># yum -y install kernel-*<br /><br />After reboot the server, you will see the kernel had been upgraded with the following command:<br /><br /># uname -a<br /># yum info kernel-uek<br /></span><ul><li><span style="font-family:Arial, sans-serif;">Test against MySQL on Oracle Enterprise Kernel</span></li></ul><span style="font-family:Arial, sans-serif;">The steps are the same as task 6.<br /></span><ul><li><span style="font-family:Arial, sans-serif;">Consolidate the testing results Collect the number of read/write and transactions with each run, and generate line charts.</span></li></ul><span style="font-family:Arial, sans-serif;"><span style="font-size:130%;"><span style="font-weight: bold;">Testing Results</span></span><br /><br />The benchmark result summarized as chart 1 and Chart 2, for the scale of transaction per second was too small, I created the 3rd chart to depict it.<br /><br /></span><ul><li><span style="font-family:Arial, sans-serif;">Chart 1 is the measurement for read-only transaction, MySQL on OEL got more than 54,000 operations at 900 threads while with everything the same except Red Hat, we got around 20,000 read-only operations and down to 11,000 at 900 threads.</span></li><li><span style="font-family:Arial, sans-serif;">In Chart 2, the red line is number of read/write operations with Red Hat based Kernel, the number of average read/write was 15,426 compare the measurement from the previous benchmark of average 4,033 read/write operations, this 382% improvement is a very one improvement (although the power of the server was better the previous one).</span></li><li><span style="font-family:Arial, sans-serif;">In Chart 2, the purple line shows the number of read/write operations with Oracle Unbreakable Kernel, it performed much better than the original kernel, Oracle UEK start from 32,110 and reach to the peak of 39,941 at 700 threads. On the contractually, Red Hat Based Kernel got 20,493 at the smallest number of threads and slipped down onward. Oracle UEK get 36,200 operations which is 234% improvement! And if we compare the measure from the previous benchmark, with technical stack from Oracle (hardware and OS kernel) we can enjoin near 9 times throughput.</span></li><li><span style="font-family:Arial, sans-serif;">The number of transaction shows in chart 3, it is consistent to the chart 1, UEK start from 1,690 transaction per second, creep to 2,102 at 700 threads, however Based Kernel start from 1,078 and slip down there after, the gap extended to 1,343 at 700 threads.</span></li></ul><br /><h3 style="TEXT-INDENT: -1.27cm; MARGIN-LEFT: 2.5cm" class="cjk" lang="zh-TW"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-3QffA9Bz6azzKohvhPCSqAV8wYng7nJU5sBuxe3riAiu_Pvrm6_NzXCm6dLP2X9VCDFAqtsgkKAeYg7htOfgHrn_wZNrbEaIqn1QdJNnlb9bNFjrZbykMzma1f0uG9vuYmU6m2FrTrDB/s1600/read-only.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 371px; DISPLAY: block; HEIGHT: 185px; CURSOR: pointer" id="BLOGGER_PHOTO_ID_5604320146757792226" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-3QffA9Bz6azzKohvhPCSqAV8wYng7nJU5sBuxe3riAiu_Pvrm6_NzXCm6dLP2X9VCDFAqtsgkKAeYg7htOfgHrn_wZNrbEaIqn1QdJNnlb9bNFjrZbykMzma1f0uG9vuYmU6m2FrTrDB/s400/read-only.png" border="0" /></a></h3><br /><div style="TEXT-ALIGN: center">Chart 1. Read-only benchmark<br /><br /></div><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 455px; DISPLAY: block; HEIGHT: 291px; CURSOR: pointer" id="BLOGGER_PHOTO_ID_5604321582787151058" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUB1dfhAkv9gJy70po9XPfqhJrQGn6m7Ege4d3p174ES2oRG_Hz6efzrulDMm-xyk_enkU1uTN2rcWNOFQfsigSqtnuEN5z8WC64hoNKsYZTGZe9uMlqnhPzcTPSBOiQYtqgRGDbVXHIkr/s400/rw.png" border="0" /><br /><div style="TEXT-ALIGN: center">Chart 2. Read-Write Benchmark<br /><br /></div><div style="text-align: center;"><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 524px; DISPLAY: block; HEIGHT: 264px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5606602071632279218" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRdblFQl0fZyz5Omsv8DX3l_htWfqz7aSRqzhni9K-aF__9gejHz98KxWtch6KeTuyDf-6CLmVMY0oN253PpGsEkDboZwxNwN6K3k05a3E5hRBAozmV9jp_1R4Xk4S7gB6iOUDnIk34Sz9/s400/rw-tps.png" border="0" />Chart 3. Read-write benchmark with transaction per second measurement<br /><br /></div><span style="font-weight: bold;font-family:Arial, sans-serif;font-size:130%;">Conclusion</span><span style="font-family:Arial, sans-serif;"><br />In the passed year, MySQL had lots of improvements, they enable MySQL to be the database that support mission critical applications. We hope the testing would help us figure out the right technical combination (from hardware, operating system to the database) for our customers. The result of this benchmark shows Oracle technical stack would offer superior performance for the user. With Oracle Linux we got near 300% performance improvement when the number of concurrent connection is 900, and compare with the result form previous benchmark, we got almost 9 times throughput, although the configuration of the hardware is better, it's still a significant improvement.</span><span style="font-family:Arial, sans-serif;"><br />However I did not apply any performance analyze tool (for example sar) to collect the performance related information from the operating system layer, thus I have no idea what makes this huge difference between Red Hat based Kernel and Oracle UEK, hope I could have the opportunity to run the same benchmark with performance analyze tool.</span>杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-9286552524707201432011-01-12T23:42:00.000-08:002011-01-12T23:54:20.117-08:00MySQL5.5.8和5.0.77间运算效能的比较-简体中文版<strong>前言<br /></strong>前一阵子和Oracle MySQL大中华区的业务负责人 – Sott Chen讨论制做一个MySQL DB appliance的可行性,希望能做出一套经过优化、即插即用(plug & play)的数据库设备(database appliance),这套设备在经过验证的情况下(例如,特定数量之下的同时联机数、数据量和SQL指令类型)可确保能达成一定的反应时间和吞吐量。这样的设备需要的技术应该有:<br />1.多核芯的X86硬件<br />2.经过调校的Linux或Unix操作系统<br />3.经过调校的MySQL数据库<br />为了验证这个想法的可行性,先从我最容易做的地方开始-证明经过调校的新版MySQL数据库的效能比一般Linux附带的MySQL社群版数据库效能更佳。<br /><br /><strong>测试环境<br /></strong>1.基础设备,我请Oracle Linux部门的Hans Qing帮忙找到一台HP x86服务器,并在这台机装上Oracle Enterprise Linux,这台机器的配备如下:<br />CPU: 4x Intel(R) Xeon(R) CPU E5520 @ 2.27GHz, 16 Cores<br />Memory: 12GB<br />Hard Disk:300GB<br />OS: Oracle Enterprise Linux 5.5.8 x86_64<br /><br /><strong> </strong>基本上这是一个压力测试,我的测试脚本是对一个有一亿行的table做读写兼具的OLTP作业。<br />我用Sysbench当作测试工具,Sysbench和MySQL都在同一台x86的PC Server上,所以网络的迟滞影响可降到最低。<br />Sysbench的指令如下:<br />1.nohup sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=100000000 --mysql-user=root --mysql-password=welcome1 --mysql-host=127.0.0.1 --mysql-port=3306 prepare<br />上述指令,Sysbench会在MySQL数据库建一个名为"sbtest" 的table,并且插入一亿行到该table中(详情请参阅Sysbench的手册 http://sysbench.sourceforge.net/docs/ ) ,第一个指令-nohup是要Linux在背景执行随后的sysbench指令,终端机可在执行sysbench时接受下一个的指令。<br />2.nohup sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=100000000 --num-threads=<thread#> --mysql-user=root --mysql-password=welcome1 --mysql-host=127.0.0.1 --mysql-port=3306 run<br />上述指令是用Sysbench当成MySQL客戶端的程序对MySQL下达SQL指令,MySQL会将执行结果的报告存于nohup的记录档中-nohup.out,我们在执行上述指令时只需更动<thread#> 的值就可仿真当并行联机数增加时MySQL之负荷状况及效能的变化<br /><br /><strong>MySQL的调整和设定<br /></strong>由于Innodb为本测试所用的主要storage engine,我的调整主要针对innodb的相关参数做设定,MySQL 5.0.77的参数档(my.cnf)的内容如下:<br /><br />max-connections=4000<br />innodb_buffer_pool_size=6G<br />key_buffer_size=512M<br />innodb_flush_method=O_DIRECT<br />innodb_file_per_table<br />innodb_log_buffer_size=4M<br /><br />主要的调整有:<br />innodb_buffer_size设为6G,这台x86 PC Server有12G 的内存,因为Sysbench也用同一台机器,设得较为保守,如果整台机器只有MySQL在用应可设为总内存的75% (在这台机器上应为8G)。<br />innodb_flush_method设为O_DIRECT,少了重复的Buffer对DML会有一定的帮助。<br /><br />MySQL 5.5.8的option file (my.cnf)调整如下:<br />max-connections=4000<br />innodb_buffer_pool_size=6G<br />key_buffer_size=512M<br />innodb_flush_method=O_DIRECT<br />innodb_file_per_table<br />innodb_log_buffer_size=4M<br />innodb_file_format=Barracuda<br />innodb_change_buffering=all<br />innodb_thread_concurrency=33<br />innodb_io_capacity=400<br />innodb_buffer_pool_instances=3<br />innodb_fast_shutdown=0<br />innodb_purge_threads=1<br /><br />innodb_file_format设为新的格式-Barracuda,如此可完全发挥InnoDB 1.1的效能。<br />innodb_change_buffering设为all,在更改或删除数据时,若该table有非主键的index,可加速效能。<br />innodb_thread_concurrency设为33,为核芯数的两倍再加一。<br />innodb_io_capacity设为400,以增加在大量更新数据时flush dirty buffer到硬盘的效能。<br />innodb_buffer_pool_instances设为3,以增加同时做DML的容量。<br />innodb_fast_shutdown设为0,以开启多个rollback segment,增加DML的容量和效能。<br />innodb_purge_threads设为1,以在main thread之外再开一个purge thread,以改善5.1版以前main thread的忙碌程度。<br /><br /><strong>测试结果<br /></strong>本测试由10个threads逐次增加到1020个threads(仿真1020个同时联机),其结果如下两图所示,蓝色线为经调校的MySQL 5.5.8的结果,橘线为经调校的MySQL 5.0.77的结果,黄线为未调校(完全用默认的参数) 的MySQL 5.0.77。图一为每秒交易量,图二为每秒的读写量。这两种吞吐量的衡量标准的结果基本上是一致的。经调校的5.5.8比经调校的5.0.77效能高7%至60%,5.5.8比未经调校的5.0.77效能高113%到11%。5.5.8最佳吞吐量出现在208个threads,5.0.77则出现在96个threads。<br /><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 569px; DISPLAY: block; HEIGHT: 259px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5561573972796420722" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuh0sMLDKO1_eUqu5nhQ5jm7NoVhBnWujVJLp01saX8T77OJITrw3BEwtg9-xnG2fpFmv-EU_GG1eBpNW7vPvy9Oes7qyIluskt5uPgFIhJTjQIId6x3MmqBk6btPkksQiVM5HwkbMurrU/s400/MySQL55_Workbench1.jpg" /> <div align="center">图一 - 每秒的交易量 </div><div align="center"><br />另外,未经调校的MySQL 5.0.77的效能在threads数超过368时比经调校的MySQL 5.0.77高,可能的原因为InnoDB Buffer Pool在调校的MySQL设为6GB,而Sysbench的table (sbtest)一个row为250 Bytes,一亿个row为25GB,当SQL指令取用范围近乎均分散在整个table(Sysbench的测试特性),而且同时连线使用数多达一定数量时,MySQL会有大量的资料自磁碟载入,这所增加的负荷超会过InnoDB Buffer Pool所带来的记忆体缓存效益。 </div><br /><br /><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 589px; DISPLAY: block; HEIGHT: 266px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5561574473066228786" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8laQyHWD79G2keq-fME8GtPPlcdAcj8LNc_TVuKQ0R5dmVlf6vOf9V0CBAkZPQT64YWL84KzSoX4_BKcmK6U3iMbYYeyKyxFKeMp-DO7kAB02FtGrb_0NlWhtk3zWiORHRFUgiceG4WIb/s400/MySQL55_Workbench2.jpg" /><br /><div align="center">图二 - 每秒的读写量 </div><div align="left"><br /><strong>进一步改善的可能性</strong><br />由于时间的限制-这台x86 PC Server的借用期间只有一个月,同时在测时期间又参加在北京的Oracle OpenWorld 和大中华区的MySQL road show等杂事缠身,能用的时间实在不多,没有机会测操作系统层的调整对MySQL效能的影响。另外Table大小对效能的影响也没测到。<br />另外还有一些对效能有影响的MySQL参数在这次测试中也没用上,包括:<br />Innodb_commit_concurrency<br />InnoDB_log_file_size<br />InnoDB_flush_logs_at_trx_commit<br />InnoDB_file_io_threads<br />Innodb_max_dirty_pages_pct<br />row_format 设为compress<br />transaction isolation level的比较<br />等都值得一试,希望下次能有更寛裕的时间都能测到。<br /><br /><strong>结论<br /></strong>新推出的MySQL5.5在效能、扩充性和可用度等各方面和以前的版本比起来均有长足的进步,尤其对最重要的储存引擎做了相当多的改良,使得MySQL更能发挥新进的硬件和操作系统在多个processor、大容量内存的优势,DBA们能用的工具也更多了,相对对的也使得MySQL的复杂度有些许的增加。本次的测试验证了MySQL的进步,和Oracle对MySQL用户的承诺。 </div>杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com3tag:blogger.com,1999:blog-225517704087781928.post-29498639161197103442011-01-12T06:56:00.000-08:002011-01-12T23:30:26.097-08:00MySQL5.5.8和5.0.77間運算效能的比較<div align="center"><br /><br /></div><div align="left"><strong>前言<br /></strong>前一陣子和Oracle MySQL大中華區的業務負責人 – Sott Chen討論製做一個MySQL資庫設備(DB appliance)的可行性,希望能做出一套經過最佳化、即插即用(plug & play)的資料庫設備(database appliance),這套設備在經過驗證的情况下(例如,特定數量之下的同時連線數、資料量和SQL指令類型)可確保能達成一定的反應時間和吞吐量。這樣的設備需要的技術應該有:<br />1.多核芯的x86硬體<br />2.經過調校的Linux或Unix作業系統<br />3.經過調校的MySQL資料庫<br />為了驗證這個想法的可行性,先從我最容易做的地方開始-證明經過調校的新版MySQL資料庫的效能比一般Linux附帶的MySQL社群版資料庫效能更佳。<br /><br /><strong>測試環境<br /></strong>1.基礎設備,我請Oracle Linux部門的Hans Qing幫忙找到一台HP x86伺服器,並在這台機裝上Oracle Enterprise Linux,這台機器的配備如下:<br />CPU: 4x Intel(R) Xeon(R) CPU E5520 @ 2.27GHz, 16 Cores<br />Memory: 12GB<br />Hard Disk:300GB<br />OS: Oracle Enterprise Linux 5.5.8 x86_64<br /><br /><strong>測試方法<br /></strong>基本上這是一個壓力測試,我的測試據本是對一個有一億行的table做讀寫兼具的OLTP作業。<br />我用Sysbench當作測試工具,Sysbench和MySQL都在同一台x86的PC Server上,所以網路的遲滯影響可降到最低。<br />Sysbench的指令如下:<br />1.nohup sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=100000000 --mysql-user=root --mysql-password=welcome1 --mysql-host=127.0.0.1 --mysql-port=3306 prepare<br />上述指令,Sysbench會在MySQL資料庫建一個sbtest table,並且插入一億行到該table中(詳情請參閱Sysbench的手冊 http://sysbench.sourceforge.net/docs/ ) ,第一個指令-nohup是要Linux在背景執行隨後的sysbench指令,終端機可在執行sysbench時接受下一個的指令。<br />2.nohup sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=100000000 --num-threads=<thread#> --mysql-user=root --mysql-password=welcome1 --mysql-host=127.0.0.1 --mysql-port=3306 run<br />上述指令是用Sysbench當成MySQL Client的程式對MySQL下達SQL指令,MySQL會將執行結果報的告存於nohup的記錄檔中-nohup.out,我們在執行上述指令時只需更動 <thread#>的值就可模擬當併行連線數增加時MySQL之負荷狀況及效能的變化<br /><br /><strong>MySQL的調整和設定<br /></strong>由於Innodb為本測試所用的主要storage engine,我的調整主要針對innodb的相關參數做設定,MySQL 5.0.77的參數檔(my.cnf)的內容如下:<br /><br />max-connections=4000<br />innodb_buffer_pool_size=6G<br />key_buffer_size=512M<br />innodb_flush_method=O_DIRECT<br />innodb_file_per_table<br />innodb_log_buffer_size=4M<br /><br />主要的調整有:<br />innodb_buffer_size設為6G,這台x86 PC Server有12G 的記憶體,因為Sysbench也用同一台機器,設得較為保守,如果整台機器只有MySQL在用應可設為總記憶體的75% (在這台機器上應為8G)。<br />innodb_flush_method設為O_DIRECT,少了重複的Buffer對DML會有一定的幫助。<br /><br />MySQL 5.5.8的option file (my.cnf)調整如下:<br />max-connections=4000<br />innodb_buffer_pool_size=6G<br />key_buffer_size=512M<br />innodb_flush_method=O_DIRECT<br />innodb_file_per_table<br />innodb_log_buffer_size=4M<br />innodb_file_format=Barracuda<br />innodb_change_buffering=all<br />innodb_thread_concurrency=33<br />innodb_io_capacity=400<br />innodb_buffer_pool_instances=3<br />innodb_fast_shutdown=0<br />innodb_purge_threads=1<br /><br />innodb_file_format設為新的格式-Barracuda,如此可完全發揮InnoDB 1.1的效能。<br />innodb_change_buffering設為all,在更改或刪除資料時,若該table有非主鍵的index,可加速效能。<br />innodb_thread_concurrency設為33,為核芯數的兩倍再加一。<br />innodb_io_capacity設為400,以增加在大量更新資料時flush dirty buffer到硬碟的效能。<br />innodb_buffer_pool_instances設為3,以增加同時做DML的容量。<br />innodb_fast_shutdown設為0,以開啟多個rollback segment,增加DML的容量和效能。<br />innodb_purge_threads設為1,以在main thread之外再開一個purge thread,以改善5.1版以前main thread的忙碌程度。<br /><br /><strong>測試結果 </strong><br />本測試由10個threads逐次增加到1020個threads(模擬1020個同時連線),其結果如下兩圖所示,藍色線為經調校的MySQL 5.5.8的結果,橘線為經調校的MySQL 5.0.77的結果,黃線為未調校(完全用預設的參數) 的MySQL 5.0.77。圖一為每秒交易量,圖二為每秒的讀寫量。這兩種吞吐量的衡量標準的結果基本上是一致的。經調校的5.5.8比經調校的5.0.77效能高7%至60%,5.5.8比未經調校的5.0.77效能高113%到11%。5.5.8最佳吞吐量出現在208個threads,5.0.77則出現在96個threads。 </div><p align="center"><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 648px; DISPLAY: block; HEIGHT: 335px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5561515351546614514" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSR5rRYwSTUsOd5RWGsZXhUmQdmP-muS9x7h8UziOiHsIJrgzh5ZB3DyunGlnXGJeN3dJQJGy51HfuJTGtScYrThJ7HUhLf4R_7aWN8s6QbmDxv8A0DeObvPOrxQzfZApsqL9O6MbSfyZz/s400/MySQL55_Workbench1.jpg" /><br />圖一 - 每秒的交易量</p><p>另外,未經調校的MySQL 5.0.77的效能在threads數超過368時比經調校的MySQL 5.0.77高,可能的原因為InnoDB Buffer Pool在調校的MySQL設為6GB,而Sysbench的table(sbtest)一個row為250 Bytes,一億個row為25GB,當SQL指令取用範圍近乎均分散在整個table(Sysbench的測試特性),而且同時連線使用數多達一定數量時,MySQL會有大量的資料自磁碟載入,這個增加的負荷超會過InnoDB Buffer Pool所帶來的記憶體緩存效益。 <img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 646px; DISPLAY: block; HEIGHT: 413px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5561516240315251986" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtJlh-OZfsPlmRfWN1fDBr5b2ugquoUCSV1QB9_gF6jErmmVeKBkL-8zQ2sV5L_TokRtjkHkMnE9RvKeElg1PU-AHazupmwmlX1F6rXqiMMm8WJcUuJeluILLHGkFs-d_gU_-4xP4eiB6n/s400/MySQL55_Workbench2.jpg" /></p><p align="center">圖二 - 每秒的讀寫量</p><p align="left"><br /><strong>進一步改善的可能性<br /></strong>由於時間的限制-這台x86 PC Server的借用期間只有一個月,同時在測時期間又參加在北京的Oracle OpenWorld 和大中華區的MySQL road show等雜事纏身,能用的時間實在不多,没有機會測作業系統層的調整對MySQL效能的影響,Table大小對效能的影響也没測到。<br />另外還有一些對效能有影響的MySQL參數在這次測試中也没用上,包括:<br />Innodb_commit_concurrency<br />InnoDB_log_file_size<br />InnoDB_flush_logs_at_trx_commit<br />InnoDB_file_io_threads<br />Innodb_max_dirty_pages_pct<br />row_format 設為compress<br />transaction isolation level的比較<br />等都值得一試,希望下次能有更寛裕的時間都能測到。<br /><br /><strong>結論<br /></strong>新推出的MySQL5.5在效能、擴充性和可用度等各方面和以前的版本比起來均有長足的進步,尤其對最重要的儲存引擎做了相當多的改良,使得MySQL更能發揮新進的硬體和作業系統在多個processor、大容量記憶體的優勢,DBA們能用的工具也更多了,相對對的也使得MySQL的複雜度有些許的增加。本次的測試驗證了MySQL的進步,和Oracle對MySQL使用者的承諾。 </p>杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-14475504622800264162010-10-31T20:16:00.001-07:002010-10-31T20:16:55.438-07:00My S Q L Introduction for 1 day trainingCheck out this SlideShare Presentation: <div style="width:425px" id="__ss_5589637"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/ivantu/my-s-q-l-introduction-s" title="My S Q L Introduction for 1 day training">My S Q L Introduction for 1 day training</a></strong><object id="__sse5589637" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=mysqlintroductions-1288242729-phpapp01&stripped_title=my-s-q-l-introduction-s&userName=ivantu" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse5589637" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=mysqlintroductions-1288242729-phpapp01&stripped_title=my-s-q-l-introduction-s&userName=ivantu" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object><div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/ivantu">Tu Ivan</a>.</div></div>杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0tag:blogger.com,1999:blog-225517704087781928.post-67028603504391929112010-09-23T02:21:00.000-07:002010-10-05T06:02:23.869-07:00MySQL Benchmark - A Telecom Case Study<span style="font-weight: bold;">Preface</span><br />This benchmarking exercise was part of a feasibility study for a Telecom User. This was one of my most important tasks during my last 6 months at Sun Software Practice, and through it I gained a lot of useful knowledge about MySQL. I wish here to show my special appreciation to my colleagues. Eric Li was technical account manager of the system team. He took care of platform issues and brought a lot of creativity to the project. Kajiyama-san is the MySQL evangelist for the Asian-Pacific area, and devoted ample time to addressing our special needs. He introduced some critical new features to the project and helped us solve many tough issues in a professional and timely manner.<br /><br /><span style="font-weight: bold;">Initiatives</span><br />The User is facing a vigorous challenge from competitors—and subsequently pressure from stockholders—expressing a need to squeeze more margin from a market which is becoming increasingly barren. The User hoped MySQL would bring them such benefits as:<br /><ul><li>Cost Savings</li></ul>The high costs of the current proprietary database regimen has been a sore point since day one: It has continuously eroded operating margins. The User sharply felt a need to find some way out from this constraint, in order to free up cash for promising new IT development projects.<br /><ul><li>Open Source Model Adoption</li></ul>The Open Source community has proven to be a source of truly mature innovations in recent years. The User expressed their hope that by using MySQL they could take advantage of some of this innovation and break the lock-in from the legacy database. In short, Open Source has for some time signaled the promise of increased real-world competitiveness.<br /><ul><li>The Special Case of CRD (Call Detail Records) Cost Scaling</li></ul>CDR databases are huge. Under our current legacy database pricing regimen, only 3 months of data can be stored. This is a limiting factor, and is about to meet the challenge of upcoming new government regulations which will require telecoms to keep 6 months of call details online. MySQL imposes no scaled costs on database size. Seeing also that the preponderance of CDR operations are READ-only (relatively risk-free) and that those DML operations are performed in batch mode (not real-time critical) the case for a migration to MySQL is further strengthened. However CDR functionality, itself, is mission critical, and therefore the User needs to consider both the cost savings and risks carefully before committing to migration.<br /><p><span style="font-weight: bold;">Objectives</span><br /></p><p>The proposes of these benchmarks are as follows:<br /></p><ul><li>To evaluate the traits and performance characteristics of MySQL</li></ul><p>Before deciding to use MySQL, the User needs to gain a clear understanding of MySQL, and know the pros and cons of any proposed migration paths. This information will help ensure that MySQL is used effectively.<br /></p><ul><li>To ascertain specific applications to which MySQL may be especially pertinent</li></ul><p>The user has a large applications profile, ranging from small task force scheduling to a mission critical BOSS system. We need to know which applications can reasonably use MySQL. Ideally, MySQL would not be limited to small and simple applications. Perhaps certain large systems with specific traits could also be good candidates for migration. The further up the chain we can safely and effectively go, the greater the cost savings.<br /></p><ul><li>To collect sizing information for capacity plan and architecture design</li></ul><p>Every database system has its own peculiar overhead costs and performance characteristics. Typically, the larger the data collections, the sooner one encounters idiosyncrasies. And it is these system traits that ultimately impact operating costs; for example in the area of backup and recovery. So we need to find out the traits of MySQL—coupled with varied storage engines—that could impact capacity plans and architecture designs for the target applications, some of which manage huge bases of information.<br /></p><ul><li>To evaluate possible cost savings</li></ul><p>In setting up a test database that is designed to parallel a production one, we can take pains to measure the total costs associated with using MySQL (servers, software license, storage, network etc.) with some precision, and compare these figures against those for the existing platform. In short, we can know with some certitude the possible cost savings from MySQL.</p><p><br /><span style="font-weight: bold;">Testing Tasks<br /></span></p><ul><li>Install, configure the environment </li></ul>We configured two servers running Redhat ES 5 Linux and one storage server running Sun Open Storage, with 10 terabytes of capacity. The databases were configured using a master-slave replication architecture, detailed in the System Architecture section, below. To migrate data from the current CDR database, we created a virtual environment and installed Windows Server 2003 and SQLWays on the virtual machine. We used SQLWays to extract data from the current CDR database, and store it as plain, “flat” text files in a directory of the storage system. This is described in greater detail, below. This directory was network-shared with the Windows virtual environment and its host environment.<br /><ul><li>Setup a LVM snapshot for backing up the database</li></ul>We set up LVM on the Redhat servers and created a logical volume for a MySQL data directory. We used LVM to create a snapshot against the data directory and dump the data from the snapshot to the backup sets directories. With this technique, the impact of backup operations on MySQL database availability would be decreased.<br /><ul><li>Install/Configure a monitoring system for collecting performance related data</li></ul>In the beginning we used nmon to collect and show performance related information from the servers. Later, we used sar and ksar to simplify data collection and decrease overhead caused by nmon’s rather over-intensive data collection demon.<br /><ul><li>Port data from the original database to plain text CSV files</li></ul>We used SQLWays to extract data from the proprietary database into CSV files. These were kept in shared storage. We dumped 650 gigabytes; data only, no indexes. This is one month’s worth of PBX-generated records.<br /><ul><li>Load data into MySQL and create indexes for each table</li></ul>We used the "load data infile..." command to load data from the CSV files into MySQL tables and then regenerated indexes identical to those from the current production database.<br />Stress test with client applications to emulate DML from daily operations<br />Most of the DML operations performed on the CDR database are in batch mode. In the current production system, the procedure for stocking tables from the PBX with data that is then available for query is:<br /><ol><li> load plain text data from the PBX into temporary tables. This step is basically identical to that described in the task described above; “Load data into MySQL…”.</li><li>Use stored procedures to dispatch call data from the temporary tables into permanent tables—one table for each day, by date that the call was put. After the data has been loaded, the stored procedure regenerates indexes for permanent tables.</li></ol>In implemented the above procedure, most of the effort would involve the rewrite of stored programs performing that second step. An easier task would be writing, testing, and introducing a processing step in which delimiters are inserted into raw PBX data: The MySQL load data command needs field delimiters, and data from the PBX currently lacks these. I wrote this program. It uses a property file that describes the delimiter character and field column widths of the source records.<br /><ul><li>Stress test with a multi-threaded Java program that issues SQL statements to emulate concurrent database accesses</li></ul>This was one of the most challenging parts of benchmark development; to generate SQL command executions that closely match those of a real production system. I looked for an off-the-shelf testing tool to do this—where SQL commands roll up data generated from several tables dynamically, based on the time period that the queries are covered—but couldn’t find one. I applied the following strategy to solve the issue:<br /><ol><li>With help from the User’s CDR operation team, we logged the SQL commands hitting the production database over a period of time. We got a file containing more than 5112 timed SQL statements, reflecting database activity over a 10-hour period.</li><li>I wrote a Java program to perform the stress test. It reads the file mentioned above, and uses that information to emulate a query regimen against the MySQL database undergoing testing. This Java program logs both the queries and system responses in a CSV file for later performance evaluation. The program runs in multiple threads to simulate multiple concurrent connections.<br /></li></ol><ul><li>Failover test with the MySQL master-slave architecture</li></ul>We implemented a slave server as a failover database. The User needs the assurance that there will be no data lag between the master and slave servers in the event of failover. This needs to be tested.<br />There are 3 options for triggering failover with MySQL: Virtual IP, load balancer, and multiple hosts with the JDBC connection string. Due to resource constraints, and given that the last option was the cheapest, I only tested the last one. All I had to do was fill in a multitude of host names in the database host name parameter of the stress testing program while running the test.<br /><ul><li>Backup the database with an LVM snapshot and then recover the database from the backup sets—including support for incremental backup/recovery</li></ul>I configured a logical volume for the MySQL’s data directory, and used Zmanda Recovery Manager as a user interface for creating a backup from the snapshot which was configured in the 2nd task mentioned above. I also tested incremental backup with ZRM.<br /><ul><li>Test the feasibility of point-of-failure recovery</li></ul>For point-of-failure recovery, we need to recover the data from the full backup set stored in the backup target directory, and then apply the binary logs from the time after that full backup, up to the last records before the database crashed.<p><span style="font-weight: bold;">System Architecture</span><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNwAH_aT-wKkP0sOSrvfEmNqPN9OiLHYbR9l44XciP16VeDVYtFM1Jt1kRUNl5IQ7QsPoHLfRmEUENMupjDWDjiFSFX6oaWiZdHwxuRI0Xn_8LDQzlUE-kxGlEToDvlrrU3OfN_-iXHx1k/s1600/P_archi.JPG"><img id="BLOGGER_PHOTO_ID_5520422844689583330" style="margin: 0px 10px 10px 0px; float: left; width: 368px; height: 248px;" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNwAH_aT-wKkP0sOSrvfEmNqPN9OiLHYbR9l44XciP16VeDVYtFM1Jt1kRUNl5IQ7QsPoHLfRmEUENMupjDWDjiFSFX6oaWiZdHwxuRI0Xn_8LDQzlUE-kxGlEToDvlrrU3OfN_-iXHx1k/s320/P_archi.JPG" border="0" /></a>As the graph on the left shows, we had:<br /></p><ol><li>One Sun X4600 server as the master server; this server also acted as host server for the virtual machine running Windows Server 2003. SQLWays ran on the virtual environment for unloading tables from the existing database into CSV files. The server is equipped with 8 CPUs each with 4 cores, the server has 32 cores in total, and 32 gigabytes of RAM.</li><li>One Sun X4450, with two 4-core CPUs (8 cores in total), and 8 gigabytes of RAM. The server acted as the slave server.</li><li>One Sun 7410 storage server, equipped with 64 gigabytes of RAM. We configured the 20 terabytes of disk capacity into a mirror, making the effective available space 10 terabytes. This has 4 data channels, each with of 1 gigabit/second bandwidth. In the beginning only one channel was used. In later tests this was increased to 2 channels for tuning the performance of data loading. The storage is shared between the two abovementioned servers, and each one had their own partition.<br /></li></ol><p><span style="font-weight: bold;">The result</span><span style="font-weight: bold;">s</span></p><ul><li>Exporting data from original database to csv text files</li></ul>SQLWays worked well, normally taking 1 hour and 45 minutes to export 22G bytes data (the data generated by the PBX in one day), I found that the job was I/O bound when exporting data with a single task thread: There should not be much room for improvement.<br /><ul><li>Loading data into MySQL and creating table indexes</li></ul>We started with MySQL 5.1.41, with a built-in Innodb storage engine. We tested both Innodb and MyISAM tables, we found that loading and indexing the 22G bytes data—generated by the PBX in a single day—into Innodb tables took more than 24 hours: A totally unacceptable arrangement! We tuned the “my.cnf” option file, increasing the innodb_buffer_pool_size and changing the flush method to O_DIRECT. This shorted the data processing task to 12 hours 32 minutes; still significantly slower than the current legacy database which only requires around 8 hours to load data into temporary tables and then dispatch them to the permanent tables. Most daunting of all was the thought that if the database crashed while loading such a large amount of data, the time needed to recover from that failure would be very long when restarting the database; much more than the time needed to load the data.<br /><br />Thanks to the new Innodb plugin storage engine, we found a way out. We used Innodb 1.0.6. set the file format to "Barracuda". The following table shows the results. The time for loading the 22 gigabytes of data shrunk to 42 minutes, with an additional 1 hour and 47 minutes to create the indexes—a tremendous improvement! Furthermore, loading and creating indexes with MyISAM tables provided even more stability. It took 51 minutes to load data, and index generation needed less than 278 minutes. Further details on our database tuning exercise will be narrated in the next post of this blog.<br />Although the Innodb plugin performed much better than the legacy database, it’s still quite annoying to have to wait a such a long time in the recovery stage when restarting MySQL from a crashed state while loading large amounts of data. And as most of the DMLs in the CDR system are performed by a batch job, there is no need to incur data integrity overhead on transaction, so we decide to use MyISAM in the later tests.<br /><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnOmtH0izfRww9wLOBxsJ8jvmR6wQkpp5LXWiJB32gUYIeE15AE9SjNPypqPdpLIsDmYpz97k7YTbX_YaljHHjfBaUUPz0CKVx-enliINYVVZ9u4P_IzeqF-wubThs7qICiaxKXptwVzCP/s1600/load_result.JPG"><img id="BLOGGER_PHOTO_ID_5520492003042575202" style="margin: 0px auto 10px; display: block; width: 669px; cursor: pointer; height: 249px; text-align: center;" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnOmtH0izfRww9wLOBxsJ8jvmR6wQkpp5LXWiJB32gUYIeE15AE9SjNPypqPdpLIsDmYpz97k7YTbX_YaljHHjfBaUUPz0CKVx-enliINYVVZ9u4P_IzeqF-wubThs7qICiaxKXptwVzCP/s400/load_result.JPG" border="0" /></a></p><ul><li>Stress testing with client application to emulate daily DML operation tasks</li></ul>Because the raw data from the PBX has no separators, and the MySQL load data command needs delimiters to elucidate the fields, I wrote a program to add separators based on a properties file that can be edited by the users. This file contains two types of info, 1) a specification of the delimiter character, and 2) column positions for each delimiter.<br />Apart from loading data, almost all the DMLs are performed by a set of stored procedures which dispatch data in the temporary tables to permanent tables, with a new set of tables generated for each day. I rewrote the current stored procedures from the existing proprietary database language to MySQL's ANSI SQL compliant store procedures. The syntax converting job was not as hard as I thought it would be. After the learning experience of the first rewrite, the job became routine and easy. However, there were dynamic SQLs that created tables and indexes dynamically; it took a while to figure out how to implement them via local variables and call procedures with the variables as parameter. Details regarding this conversion experience will be described in a subsequent blog entry.<br />Most of the DMLs in the dispatching stored procedure are insert commands. The insert speed of MySQL stored procedures is amazing: It only took 57 minutes to dispatch 66 gigabytes/210 million rows of data (3 days worth of PBX data), and 3 hours 20 minutes to dispatch the data to tables, compared with more than 5 hours to dispatch a single day's data in the existing system; it's a significant leap!<br />Summing up the time required for the whole procedure –adding separators, loading the CSVs to temporary tables, and dispatch the temporary table to permanent tables and create indexes , 2 points stand out:<br /><ol><li>In terms of time required, there is not much difference between creating indexes prior to or after the tables have been loaded with data.</li><li>It took 15 hours and 20 minutes to go through the entire process dealing with 3 days of PBX data: That’s an average of 5 hours and 7 minutes per day. This is superior to the present regime. Furthermore, the User has indicated that they will be able to add field separators on the PBX side at record generation time: This means it will be possible to shorten our process by 3 hours 20 minutes, thereby needing only 1 hour and 20 minutes. This would be 6 times faster than the existing database!<br /></li></ol><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk0UQJbaGZhN553TwR1g_cnUbj9xF6xkxXAXuxbMMzvJU5FG0LNHMa5zpngaaRcgG7it5-AC7wxTBv-dUxAxyOqUg6Jy5tWgUF0v_xZ94F86sXgesCH2PUELxr26TEM-yLg2yG-mCALdnS/s1600/resultTableSum.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 600px; height: 108px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk0UQJbaGZhN553TwR1g_cnUbj9xF6xkxXAXuxbMMzvJU5FG0LNHMa5zpngaaRcgG7it5-AC7wxTBv-dUxAxyOqUg6Jy5tWgUF0v_xZ94F86sXgesCH2PUELxr26TEM-yLg2yG-mCALdnS/s400/resultTableSum.JPG" alt="" id="BLOGGER_PHOTO_ID_5521058323367995106" border="0" /></a></p><ul><li>Stress testing with multi-threaded Java program that issues SQL statements to emulate concurrent database access</li></ul>As the following table shows, we ran the stress test program with 1 thread, 4 threads, and 8 threads, to simulate 1, 4, and 8 concurrent connections, respectively. The time needed to run the test was 3 hours and 5 minutes (11082 seconds), 11 hours and 14 minutes, and 11 hours and 21 minutes, respectively. The 1- and 4-thread trials had only 1 channel of 1-gigabits/channel connectivity. I observed there was IO contention between sorting in temp directory and table accessing, so I added one more channel (2 channels in total) when running the 8-thread test, and assigned the “tempdir” to the new partition that added by the new channel. This should be the reason for the results from the 4-thread and 8-thread tests being about the same (compare the results between 1 thread and 4 threads).<br /><p><img id="BLOGGER_PHOTO_ID_5520755465597371378" style="margin: 0px auto 10px; display: block; width: 606px; height: 186px; text-align: center;" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcN3mJBYx06M7ybqy6RoQt3W5ktr21t250R67iH12E9TPstshLiOH335zc3zqNKRwUJcSH-hDF0tAXDNhkmTkUCyGVMrl42Xst1k-mNYE_2GNGx-MgH9Xn4N2uDnDzCyeTRrhIPge1vqmD/s400/stressTestTable.JPG" border="0" /></p><p>The following graphs show that the maximum response times for each test ranged between 420 to 546 seconds. Apart from the 6-fold increase between 1 thread and 4 threads, there is not much variation.<br /><img id="BLOGGER_PHOTO_ID_5520762574388534114" style="margin: 0px auto 10px; display: block; width: 609px; height: 160px; text-align: center;" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0rk3g3_C6EzkzTyk7SzuDjpGz9z0lfd_qGcgn1obJOZldIZ4Fv8N2BKZMX82cD1AWIQ7RNnbNbL-MgQhY5wRQQciKhOpFXDRKTdRP62D5eQNGAHW2GpWJ39Qj-M26Yv_gzOiv55r0y2fO/s400/stressTestGraph.JPG" border="0" /></p>As the number of threads rises further to12 there are few exceptions shown in the response log, so it’s safe to say the request load ceiling of the database should between 8 to 12 threads. I use several PCs to run the stress test program, where the SQL requests return a few rows. I think any performance factors owing to the test tools and network bandwidth are negligible, and can be ignored.<br />The SQL statements used were taken from real-world database logs, containing database hit traffic over a 10 hour period. When I ran the test with 8 threads over 17 hours the total number of SQL requests the database had processed was 40896 (5112 * 8). In point of fact, these test cases were much more rigorous and demanding than a real situation could ever be. When the response times for the 5112 SQL statements were checked, I found that SQLs that return 0 to 1000 rows are returned within 3 seconds. But there were 63 cases where the request had to return 497848 to 64415 rows, response times fell between 25 to 408 seconds. As most of these large result set SQL requests occur consecutively, this was a notable bottle neck in the test. Out of curiosity, I tried distributing these larger request statements to temporally disparate points in the SQL test-bed command file, and congestion on these larger commands weren’t much different—pretty much returning the same performance stats under the 4- and 8-thread test regimens.<br />In response to this information, the User expressed concern that with a limited number of concurrent connections, these larger transactions would negatively impact access by the flurries of smaller transactions. So I decided to do some special testing to determine MySQLs behavior under a regiment in which both large and small transactions vie for attention. I derived two command files from the original real-world file; one containing only 63 large-transaction commands, and another containing only 100 small-transaction commands. I ran both command files simultaneously. The results are shown in the following table and graph. The number of threads does not appear to be much of a factor: The small transaction set finishes quickly regardless. However, the response times for the large result requests increased linearly with the thread count, as the following table and graph shows. When the threads number increased from 12 to 28, the maximum response time increased from 640 seconds to 1138 seconds, and the run durations increased from 1 hour and 42 minutes to 2 hours and 41 minutes.<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2N6BiQZIlkwpuR3vbTQdE_SrhrTazWIkut-BY3RAr6iA2RS5nWXRVBwX7VxHEIPLxJ27FnTGPgR1xUv9GGUr5T2-zLFDtgi2xKFhG-eFOo14YZZMAcO19CSfYSzwiKu7j60Af2sVwMRWX/s1600/tunedResponse.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 618px; height: 227px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2N6BiQZIlkwpuR3vbTQdE_SrhrTazWIkut-BY3RAr6iA2RS5nWXRVBwX7VxHEIPLxJ27FnTGPgR1xUv9GGUr5T2-zLFDtgi2xKFhG-eFOo14YZZMAcO19CSfYSzwiKu7j60Af2sVwMRWX/s400/tunedResponse.JPG" alt="" id="BLOGGER_PHOTO_ID_5521539895546511298" border="0" /></a>I noticed that MySQL uses temp directory to deposit its temporary tables for sorting rows requested by transactions. It occurred to me that this whole enterprise may have been haunted by a simple disk I/O bottleneck, related to a configured limitation in the number of available storage IO channels. In cases where the number of threads exceeded 20, I configured additional IO channels and mapped the "tempdir" to the mount point of the new IO channel. It fixed the problem! I was able to elevate the number of concurrent connections to 28 with no exception in the log file.<br /><ul><li>Failover testing with the MySQL master-slave architecture</li></ul>I tested the failover by assigning multiple host names in the connection string of the MySQL JDBC driver. I ran the stress test program with 2 host names (one for the master server, one for the slave) in the host name parameter. It showed that when I shut down the master server while running the test program, currently connected threads cleanly threw database exceptions on the console. Threads attempting to connect after the shutdown were “failed overed” and queried the slave server properly. Further improvements in connection exception handling should be readily obtainable by simply adding code in the exception handler section of the client programs to failover the connection to the 2nd database.<br /><ul><li>Backing up the database with LVM snapshot and recovering the database from the backup sets; incremental backup/recovery also included</li></ul>Because MySQL’s built-in backup solution is very limited, and there is very significant overhead to backing up large volumes of data, augmenting the backup with a snapshot would be a good idea. There are OS level snapshot solutions such as ZFS for Solaris, and LVM for Redhat, and on the storage level snapshot, you have thin provisioning, iSCSI, and NFS which are supported by Sun Open Storage. OS snapshot solutions are easier to integrate into Backup tools such as Zmanda.<br />I used LVM for the snapshot and ZRM to manage the backup, but there is a pitfall for novice Users: If you wish to create a dedicated disk for backup set storage, apart from the logical volume for the MySQL’s data directory, it’s necessary to create another logical volume for the backup set storage. Otherwise erroneous recursive inserting on the same logical volume kicks in, and space is quickly exhausted.<br />ZRM performed well both in full backup and incremental backup, but when I tried to recover the database from the time before the full backup started to the time that an incremental backup had been performed, the ZRM console indicated a duplicate data insertion error. I think this might have been caused by data from before the full backup in the binlog having been applied. I have not discussed it with Zmanda yet, but I think it could be solved by 1) first generating a log switch before the full backup, then 2) removing the binlog files that contain data from before the full backup when the full backup is finished.<br /><ul><li>Testing the feasibility for point-of-failure recovery</li></ul>With ZRM's nice user interface, it is easy to do a point-of-failure recovery with full backup and binlog. I think that in a production environment, storing binlog files in a volume separate from the data directory would be safer.<br /><p> </p><span style="font-weight: bold;">Conclusion</span><br />MySQL is unique for its plugable storage engine. This gives Users freedom to tune the database to the characteristics of the applications. For applications with few online DMLs and a lots of queries (e.g., CDR), we can use MyISAM for the tables storage engine to take advantage of the low overhead and the easy maintenance and operation. On the other hand, for tables requiring online transaction performance, while carefully maintaining data integrity, we can use Innodb as the storage engine; the higher overhead is warranted by the application.<br />As Innodb evolves, we can expect to see further performance benefits via a faster data loading speed. Benchmarks indicate a 5-fold speed improvement, which could cut total operating time from 12.5 to 2.5 hours. I believe that with MySQL 5.5, the performance should improve yet further, and I am looking forward to trying it out in another set of benchmark tests.杜修文 (Ivan Tu)http://www.blogger.com/profile/14492439087938618422noreply@blogger.com0