<?xml version="1.0" encoding="utf-8" ?>















<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="zh_CN">
<title><![CDATA[邵逸夫]]></title>
<link rel="alternate" type="text/html" href="http://dolly00.blog.bokee.net"/>
<modified>2008-04-28T00-19-25 CST</modified>
<tagline type="text/html" mode="escaped"><![CDATA[邵逸夫（1907年10月4日～）原名邵仁楞，籍贯浙江宁波镇海，出生于上海。香港电视广播有限公司主席，邵氏兄弟电影公司的创办人之一。他在兄弟姐妹中排行第六，故后来人称“六叔”。]]></tagline>
<generator url="http://www.bokee.net/" version="2.0">bokee.net</generator>
<copyright>Copyright (c) 2005,  dolly00</copyright>


<entry>
<title>贴膜技巧</title>
<link rel="alternate" type="text/html" href="http://www.bokee.net/blogmodule/weblogcomment_viewEntry/1912468.html"/>
<issued>2008-06-19T08-16-52 CST</issued> 
<created>2008-06-19T08-16-52 CST</created>
<modified>2008-07-23T00-02-56Z</modified>
<id>tag:dolly00.blogchina.com,2005://1912468</id>
<author>
<name>dolly00</name>
<url>http://www.bokee.net/blogmodule/weblogcomment_index/dolly00.html</url>
</author>
<dc:subject>汽车之家</dc:subject>
<content type="text/html" mode="escaped" xml:lang="zh_CN" xml:base="http://www.bokee.net"> 
<![CDATA[<div class="p_entry2" id="textboxContent">
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’"><font size="3">驾车一族都在为自己的爱车装贴<strong>太阳膜</strong>，尤其是新购置的车，以阻挡强光，在车内享受舒适的私人空间。然而现在的<strong>汽车贴膜</strong>品种繁多却良莠不齐，依次充好、夸大功效的事常有发生，又由于一般车主对膜的了解不够，贴膜前的盲目以及导致利益受损也常有发生，我们作为专业膜的生产商，觉得很有必要对如何选择车膜作介绍：</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’"><font size="3">人们在选择太阳膜，为了获得更好的隔热效果和良好的私密性，往往会挑深色的<strong>太阳膜</strong>，</font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">殊不知，一般的黑纸</span><span lang="EN-US"><font face="Times New Roman">[</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">膜</span><span lang="EN-US"><font face="Times New Roman">]</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">、茶纸根本就不隔热。膜的隔热与否和膜中是否含有隔热层有关，颜色深，只能吸收极小部分的热量，不能反射热量。专业的膜颜色虽然很浅，但可把烈日下太阳辐射热量每平方米</span><span lang="EN-US"><font face="Times New Roman">900</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">瓦中，阻挡</span><span lang="EN-US"><font face="Times New Roman">700</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">瓦的热量，低挡的无专业阻隔层的深色膜却只能阻隔</span><span lang="EN-US"><font face="Times New Roman">300</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">瓦的热量，所以<strong>汽车膜</strong>隔热与否及隔热能力的大小应与生产该<strong>汽车膜</strong>的制造商是否拥有先进的隔热层制造技术密切相关。目前东南亚产的膜基本为胶染色膜，与美国产的金属化膜相比，如同黑白电视机对比彩色电视机，隔热性能差异很大。还有商家宣称他的膜能阻隔</span><span lang="EN-US"><font face="Times New Roman">90%</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">的红外线，殊不知太阳辐射中仅有近红外线</span><span lang="EN-US"><font face="Times New Roman">, </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">且所携热量只是太阳热量的一半左右，没有明确的注明究竟阻隔了那部分红外线，此种说法只是一种诈称隔热的手段，专业的隔热指标应该总太阳能阻隔率。</span><font face="Times New Roman"> </font><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">防紫外线也一样，专业膜是在膜层中渗入了专业的</span><span lang="EN-US"><font face="Times New Roman">UV</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">吸收剂，能将太阳辐射中</span><span lang="EN-US"><font face="Times New Roman">99</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">％的紫外线阻隔掉，使阳光所含的紫外线在到达车内人的身体之前已经被吸收，市场上的普通的汽车膜则不具备这项功能，车主对紫外线照射的防护不可忽视，烈日下开车，毒辣的阳光从前挡风玻璃直泻下来，使车主手臂晒得黑红黑红，皮肤长期受紫外线侵害，加速严重皮肤老化严重的可引发皮肤癌和眼部疾病。这里还要特别提醒车主，选择前挡膜的注意事项，通过前挡风玻璃进入车内的太阳辐射热量是最大的，如能选择到优质的太阳膜，可以阻隔</span><span lang="EN-US"><font face="Times New Roman">50%</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">的热量进入车内，但前挡膜的要求更苛刻和技术含量更高，所<strong>贴膜</strong>应以视线清晰、不增加前挡玻璃的反光和不影响驾车安全为首要前提，国家公安部规定前挡玻璃（<strong>贴膜</strong>后）须达到</span><span lang="EN-US"><font face="Times New Roman">70%</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">的透光率，目前市场上的前挡膜大多</span><span lang="EN-US"><font face="Times New Roman">VLT</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">透光率为</span><span lang="EN-US"><font face="Times New Roman">60%</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">，对太阳辐射热的阻隔仅</span><span lang="EN-US"><font face="Times New Roman">30%</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">左右，反光高达</span><span lang="EN-US"><font face="Times New Roman">20</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">％，因此这类前挡膜无论从那方面考虑不适合安装在前挡玻璃，选贴前挡膜定要格外谨慎。</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’"><strong>汽车膜</strong>可为车主解决的诸多问题：（</span><span lang="EN-US"><font face="Times New Roman">1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">）</span><font face="Times New Roman"> </font><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">美观、协调、豪华或简洁的外观</span><span lang="EN-US"><font face="Times New Roman"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><span style="mso-tab-count: 1">&nbsp; </span></font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">（</span><span lang="EN-US"><font face="Times New Roman">2</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">）车内更私密；（</span><span lang="EN-US"><font face="Times New Roman">3</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">）遮阳隔热免受太阳暴晒之苦；（</span><span lang="EN-US"><font face="Times New Roman">4</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">）减少眩目光驾车观景更舒服；（</span><span lang="EN-US"><font face="Times New Roman">5</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">）</span><font face="Times New Roman"> </font><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">减少车内人员的由车玻璃碎裂造成的意外损伤和阻止因砸窗而车内物品被抢劫；（</span><span lang="EN-US"><font face="Times New Roman">6</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">）阻隔紫外线以保护人员免除太阳灼伤</span><span lang="EN-US"><font face="Times New Roman"> (</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">和加速皮肤老化、诱发皮肤癌</span><span lang="EN-US"><font face="Times New Roman">)</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">，避免车内饰品退色和老化使车内饰件新旧如初增加车的乘余价值。</span></font><span lang="EN-US"><br style="mso-special-character: line-break" /><br style="mso-special-character: line-break" /></span><span lang="EN-US" style="DISPLAY: none; FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: ’Arial Unicode MS’; mso-bidi-font-family: ’Times New Roman’; mso-hide: all"><o:p></o:p></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><span lang="EN-US"><font size="3"><font face="Times New Roman">&nbsp;<o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><font size="3"><span lang="EN-US"><span style="mso-spacerun: yes"><font face="Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">市场上的<strong>汽车贴膜</strong>一般就来自两个产地，一为东南亚产低档劣质膜，一为美国原厂的优质专业品质的膜，国产膜暂无生产。车主选用车膜务必注意辨别，这里提供几点供参考：</span></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><span lang="EN-US"><font face="Times New Roman"><font size="3">1、</font><span style="FONT: 7pt ’Times New Roman’">&nbsp; </span></font></span><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">整车</span><span lang="EN-US"><font face="Times New Roman">800</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">元以下的膜不必考虑；</span><span lang="EN-US"><font face="Times New Roman">4000</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">元以上的太离谱；</span><span lang="EN-US"><font face="Times New Roman">2</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">、应选择专业<strong>贴膜</strong>的大的专业店施工装贴；</span><span lang="EN-US"><font face="Times New Roman">3</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">、最好选择有隔热测试演示的店；</span><span lang="EN-US"><font face="Times New Roman">4</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">、应选用原产美国的膜，并根据装贴膜的型号、颜色通过互联网与美国生产商提供的数据查对；</span><span lang="EN-US"><font face="Times New Roman">5</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">、千万注意贴膜时不宜拆下车上原厂安装的如何附件，低劣安装会划伤玻璃表面、割断后窗玻璃内表面的去雾线、截去边窗玻璃的密封胶条；</span><span lang="EN-US"><font face="Times New Roman">6</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: ’Times New Roman’; mso-hansi-font-family: ’Times New Roman’">、选择美国窗<strong>贴膜</strong>生产商的汽车贴膜连锁施工店，方可免除不必要的因<strong>贴膜</strong>而带来的麻烦，索要质量保证卡并与生产商联系以确认。</span></font></p>
</div>]]>
</content>
</entry>

<entry>
<title>怎样为爱车选购太阳膜</title>
<link rel="alternate" type="text/html" href="http://www.bokee.net/blogmodule/weblogcomment_viewEntry/1912458.html"/>
<issued>2008-06-19T08-11-37 CST</issued> 
<created>2008-06-19T08-11-37 CST</created>
<modified>2008-07-23T00-02-56Z</modified>
<id>tag:dolly00.blogchina.com,2005://1912458</id>
<author>
<name>dolly00</name>
<url>http://www.bokee.net/blogmodule/weblogcomment_index/dolly00.html</url>
</author>
<dc:subject>汽车之家</dc:subject>
<content type="text/html" mode="escaped" xml:lang="zh_CN" xml:base="http://www.bokee.net"> 
<![CDATA[汽车贴膜也叫太阳膜，上世纪80年代在我国悄然兴起，现在，它已经成为汽车美容业的一大支柱业务。随着太阳膜的日益普及，相关法规也随之出台。法规对车主的安全更加关注，对太阳膜的品质也提出了更高要求。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 目前，市场上的太阳贴膜质量参差不齐，消费者面对众多产品也是不知所措，有时花了不少钞票，不但没有达到预期的隔热效果，还给以后的使用带来了隐患。比如，一些商家会把透光率只有60%的膜冒充前挡专用膜；有的前挡膜内反光率超过10%以上，使前风挡下的物品映照在玻璃上，严重扰乱驾驶员视线；有的前挡膜透光率达到要求，但隔热效果却微乎其微，形同虚设；还有的不顾安全，张贴建筑专用的镜面反光膜，对周围的车辆构成威胁。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 那么怎样选购太阳膜呢？日前，记者采访了<strong>美国科特玻璃功能膜有限公司（CPFilms）中国区经理刘顺立</strong>。刘顺立介绍说，在选购太阳膜时，消费者常常会获得这样一些信息：这是国外的防爆膜，那是国产的普通膜，这是真膜，那是假膜&hellip;&hellip;这些似是而非的话，其实是经不起推敲的。首先，由于技术等原因，国内目前还没有真正能够生产太阳膜的企业，所以也就没有国产膜这一说。再者，只有品质、性能高下之分，即行业内所说的专业膜与非专业膜之分；即使是品质差的太阳膜也是膜，所以没有真膜或假膜之别，只有品牌真假之分。选购专业太阳膜要注意以下几个方面：<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 一是颜色的持久性。专业太阳膜利用深层染色技术，将染料注入到聚酯膜基片中，令膜的色彩饱满柔和，持久耐用；而利用真空镀铝或磁控溅射技术生产的全金属化膜，颜色更是永恒不变。相比之下，亚洲地区生产的一些劣质膜，染料仅仅存在于安装胶中，褪色掉色现象非常明显。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 二是防划伤性。专业太阳膜的最外层都镀有一层坚硬的防划伤层，对于消费者而言，这种带有防划伤性的太阳膜便于车窗玻璃的上下运动和日常的清洁维护，不会留下划痕。但非专业膜，由于施工方式不同很容易被划伤。<br />&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;三是防UV。专业太阳膜能够阻隔99%的紫外线并持续发挥作用，防止皮肤病变，延缓车内物件褪色老化。非专业膜的UV阻隔率还不到50%。车在驾车行驶过程中，驾驶人员感受到的灼烤和紫外线辐射的绝大部分都来自汽车前挡风玻璃，而司机前方视野的高度清晰又是维护道路交通安全的基本条件。因此，高质量的前挡膜必须达到至少70%的透光率，同时又要具有高的隔热率，以及低的可见光反射率。能够达到这一要求的膜在市场上并不多见，只有少数几家知名公司具备这种生产能力。消费者挑选前挡膜时，一定要注意它是否具有公安部出具的检测报告，即检测数据是否达到国家法规的要求。一般贴一张前挡膜，价格在1000多元，如果超过1600元，则不免太过离谱。这是因为普通车窗玻璃防UV只有19%，就像皮肤涂上防晒霜后，防UV可达97.5%，但是持续时间只有几小时，无法从根本上解决问题；而高质量的专业太阳膜阻隔紫外线可达到99%，且长久不衰。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 太阳膜之所以能够阻挡UV，原因在于生产过程中在膜中添加了大量的紫外线吸收剂，一种专门阻隔UV波长通过的材料。LLumar龙膜的制造商美国CPFilms公司加速老化实验显示，其专业窗膜在氙灯加速试验中经过2000个小时的暴露 (等效于正常太阳暴晒3~5年) 后，还能阻隔98%的紫外线辐射。但是由于成本原因, 许多膜制造商在膜中不加入足量的紫外线吸收剂；而有的膜制造商由于生产能力的限制，只能把少量的紫外线吸收剂添加在安装胶中而不是薄膜内部，其隔UV只能达到50%左右。<br />&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;四是检测报告。专业前挡膜应该经过公安部交通安全产品质量监督检测中心的严格测试，证明可见光透过率在国家允许范围内，证明UV透过率的正确数值。<br />&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;另外，目前市场上常见的&ldquo;防爆太阳膜&rdquo;，通常只为区别&ldquo;普通&rdquo;太阳膜，表示是&ldquo;高档&rdquo;太阳膜的意思，并非指安全性能，其厚度仅为1.5mil。而太阳膜是否安全、防爆，关键在于其厚度，如果厚度达到15mil，贴在普通玻璃上即可具有防弹功效。龙膜PP35SRPS4隔热铁甲膜厚度达到4mil，具有相当强的安全、防爆、防盗性能，同时具有PP35（浅自然色）一样的隔热性能和私密性，并能阻挡99%有害紫外线，表面防划伤镀膜持久耐用，是真正意义的隔热防爆汽车太阳膜。<br />&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;随着中国大众对紫外线害处的认识在加强， 太阳膜的隔紫外线数值必将成为消费者越来越重视的指标， 以及判定优质膜与劣质膜的标准之一。]]>
</content>
</entry>

<entry>
<title>世界十大名牌打火机</title>
<link rel="alternate" type="text/html" href="http://www.bokee.net/blogmodule/weblogcomment_viewEntry/1912453.html"/>
<issued>2008-06-19T08-08-51 CST</issued> 
<created>2008-06-19T08-08-51 CST</created>
<modified>2008-07-04T00-09-31Z</modified>
<id>tag:dolly00.blogchina.com,2005://1912453</id>
<author>
<name>dolly00</name>
<url>http://www.bokee.net/blogmodule/weblogcomment_index/dolly00.html</url>
</author>
<dc:subject>名产品知识介绍</dc:subject>
<content type="text/html" mode="escaped" xml:lang="zh_CN" xml:base="http://www.bokee.net"> 
<![CDATA[<div class="p_entry2" id="textboxContent">
<p><strong><font size="4">◆Givenchy　纪梵希</font></strong><br /><img class="ZoominCursor" style="CURSOR: pointer" alt="" src="http://old.qlwb.com.cn/SystemSorse/InfoImage/2006-08-04/FK0415.jpg" width="220" border="0" /><br /><br /><br />　　凭借对传统的尊崇和对古典主义的垂顾，纪梵希向世人传达出的讯息&mdash;&mdash;优雅而高尚宜人。随着纪梵希（ＧＩＶＥＮＣＨＹ）品位的不断延伸，打火机的推出也成为优雅的另一种概念。４个&ldquo;Ｇ&rdquo;字母的变形组合，使之成为优雅品位的代名词</p>
<p><strong><font size="4">◆Cartire　卡地亚</font></strong></p>
<p><img class="ZoominCursor" style="CURSOR: pointer; ZOOM: 100%" alt="" src="http://old.qlwb.com.cn/SystemSorse/InfoImage/2006-08-04/FK0414.jpg" width="220" border="0" /><br /><br />　Ｌｏｕｉｓ－ＦｒａｎｃｏｉｓＣａｒｔｉｅｒ在１８６７年推出他设计的第一个打火机。卡地亚，这个被英国国王爱德华七世誉为&ldquo;皇帝的珠宝商，珠宝商的皇帝&rdquo;的著名品牌。从印度王子定制的巨大项链，到曾与温莎公爵夫人行影相随的虎形眼镜，卡地亚讲述着一个又一个传奇故事。<br /></p>
<p><strong><font size="4">◆Colibri</font></strong></p>
<p><img class="ZoominCursor" style="CURSOR: pointer" alt="" src="http://old.qlwb.com.cn/SystemSorse/InfoImage/2006-08-04/FK0413.jpg" width="220" border="0" /></p>
<p>　Colibri是一家全国性被认可的首饰产业，一直引领罗德岛制造多种产品<a class="ReplaceKeyword" href="http://search1.taobao.com/browse/search_auction.htm?commend=all&amp;q=%C2%B0%C3%BC&amp;from=forum52&amp;keywordbody=1&amp;cat=30" target="_blank"><font color="#222266">包</font></a>括：男女首饰、行政礼物，还有世界著名Ｃｏｌｉｂｒｉ品牌打火机。<br /></p>
<p><strong><font size="4">◆BIC</font></strong></p>
<p><img style="CURSOR: pointer" alt="" src="http://old.qlwb.com.cn/SystemSorse/InfoImage/2006-08-04/fk0419.jpg" border="0" /></p>
<p>自从五十多年前比克在法国创立，为每位消费者提供高品质、高性能的比克（ＢＩＣ）产品。比克（ＢＩＣ）的书写工具、打火机已经成为世界成千上万消费者人生历程的一部分。</p>
<p><strong><font size="4">◆IMCO</font></strong></p>
<p><img class="ZoominCursor" style="CURSOR: pointer; ZOOM: 90%" alt="" src="http://old.qlwb.com.cn/SystemSorse/InfoImage/2006-08-04/FK0411.jpg" width="220" border="0" /></p>
<p>　　欧洲最古老的打火机，至今已经生产了５亿多只打火机，１９２０年，首先成为自动打火机生产者。</p>
<p><strong><font size="4">◆</font></strong><a class="ReplaceKeyword" href="http://search1.taobao.com/browse/search_auction.htm?commend=all&amp;q=Dunhill&amp;from=forum52&amp;keywordbody=1&amp;cat=30" target="_blank"><font color="#222266" size="4"><strong>Dunhill</strong></font></a><strong><font size="4">　登喜路</font></strong></p>
<p><img class="ZoominCursor" style="CURSOR: pointer" alt="" src="http://old.qlwb.com.cn/SystemSorse/InfoImage/2006-08-04/FK0417.jpg" width="220" border="0" /></p>
<p>　　１９２３年，阿尔弗雷德&middot;邓希尔与两位制造商合作，为一个失去一只手臂的军官设计了可以放进衣袋、同时可以单手使用的打火机。这一发明为打火机市场带来了新的革命。<br /></p>
<p><strong><font size="4">◆Parker 帕克</font></strong></p>
<p><img class="ZoominCursor" style="CURSOR: pointer" alt="" src="http://old.qlwb.com.cn/SystemSorse/InfoImage/2006-08-04/FK0431.jpg" width="220" border="0" /><br />　　Ｐａｒｋｅｒ品牌除了名扬世界的书写用品，更包括打火机等男士精品配件产品。<br /></p>
<p><strong><font size="4">◆ Zippo</font></strong></p>
<p><img class="ZoominCursor" style="CURSOR: pointer" alt="" src="http://old.qlwb.com.cn/SystemSorse/InfoImage/2006-08-04/FK0418.jpg" width="220" border="0" /><br />　　这个Ｇｅｏｒｐｇ　Ｇ．Ｂｌａｉｓｄｅｌｌ在１９３２年创立的品牌源自一名友人所拥有的奥地利打火机，当时被批评为外形丑陋，但机能却不错。这激发Ｇｅｏｒｇｅ设计和生产内外兼修的打火机，促使Ｚｉｐｐｏ的诞生。<br /></p>
<p><strong><font size="4">◆Flamidor</font></strong> </p>
<p><img class="ZoominCursor" style="CURSOR: pointer" alt="" src="http://old.qlwb.com.cn/SystemSorse/InfoImage/2006-08-04/FK0412.jpg" width="220" border="0" /></p>
<p>　１９００年初，Ｆｌａｍｉｄｏｒ是最大的法国巴黎品牌，１９１２年公司出品了打火机，但它真正地显现自身是在１９３５年之后，ＸａｖｉｅｒＱｕｅｒｃｉａ接手管理。</p>
<p><strong><font size="4">◆S.T.Dupont　都彭</font></strong></p>
<p><img class="ZoominCursor" style="CURSOR: pointer" alt="" src="http://old.qlwb.com.cn/SystemSorse/InfoImage/2006-08-04/FK0416.jpg" width="220" border="0" /></p>
<p>１９４８年Ｄｕｐｏｎｔ专注于设计及生产一款专为时尚吸烟人士而设的新产品&mdash;&mdash;以易燃液体作燃料之打火机。此打火机尺寸大小恰好符合手掌及手指的动作，当开启时更会发出一下清晰之&ldquo;铿&rdquo;声，逐渐成为一种生活艺术之代号，而亦促使都彭成为制造打火机的一代宗师。<br /></p>
</div>]]>
</content>
</entry>

<entry>
<title>Using Object Explorer </title>
<link rel="alternate" type="text/html" href="http://www.bokee.net/blogmodule/weblogcomment_viewEntry/1805421.html"/>
<issued>2008-05-20T13-18-41 CST</issued> 
<created>2008-05-20T13-18-41 CST</created>
<modified>2008-07-25T00-26-49Z</modified>
<id>tag:dolly00.blogchina.com,2005://1805421</id>
<author>
<name>dolly00</name>
<url>http://www.bokee.net/blogmodule/weblogcomment_index/dolly00.html</url>
</author>
<dc:subject>Default Cloumn</dc:subject>
<content type="text/html" mode="escaped" xml:lang="zh_CN" xml:base="http://www.bokee.net"> 
<![CDATA[<p>Object Explorer, a component of SQL Server Management Studio, connects to Database Engine instances, Analysis Services, Integration Services, Reporting Services, and SQL Server Compact 3.5 SP1. It provides a view of all the objects in the server and presents a user interface to manage them. The capabilities of Object Explorer vary slightly depending on the type of server, but generally include the development features for databases, and management features for all server types.</p>
<div class="MTPS_CollapsibleRegion" id="ctl00_rs1_mainContentContainer_cpe121069">
<div class="CollapseRegionLink" id="ctl00_rs1_mainContentContainer_cpe121069_h"><img id="ctl00_rs1_mainContentContainer_cpe121069_i" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" src="http://i.msdn.microsoft.com/Platform/Controls/CollapsibleArea/resources/minus.gif" onload="var image=new Image();image.src=this.src;if(image.width&gt;0 &amp;&amp; image.height&gt;0){if(image.width&gt;=700){this.width=700;this.height=image.height*700/image.width;}}" alt="" />&nbsp;Viewing Object Explorer </div>
<div class="MTPS_CollapsibleSection" id="ctl00_rs1_mainContentContainer_cpe121069_c" style="DISPLAY: block; OVERFLOW: visible; WIDTH: auto; HEIGHT: auto">
<div class="MTPS_CollapsibleSection" id="" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; DISPLAY: block; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none"><a name="sectionToggle0"></a>
<p>Object Explorer is visible in the Management Studio by default. If you cannot see Object Explorer, on the <strong>View</strong> menu, click <strong>Object&nbsp;Explorer</strong>.</p>
</div>
</div>
</div>
<div class="MTPS_CollapsibleRegion" id="ctl00_rs1_mainContentContainer_cpe121070">
<div class="CollapseRegionLink" id="ctl00_rs1_mainContentContainer_cpe121070_h"><img id="ctl00_rs1_mainContentContainer_cpe121070_i" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" src="http://i.msdn.microsoft.com/Platform/Controls/CollapsibleArea/resources/plus.gif" onload="var image=new Image();image.src=this.src;if(image.width&gt;0 &amp;&amp; image.height&gt;0){if(image.width&gt;=700){this.width=700;this.height=image.height*700/image.width;}}" alt="" />&nbsp;Connecting Object Explorer to a Server </div>
<div class="MTPS_CollapsibleSection" id="ctl00_rs1_mainContentContainer_cpe121070_c" style="DISPLAY: none; OVERFLOW: visible; WIDTH: auto; HEIGHT: 0px" olddisplay="block">
<div class="MTPS_CollapsibleSection" id="" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; DISPLAY: block; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none"><a name="sectionToggle1"></a>
<p>To use Object Explorer you must first connect to a server. Click <strong>Connect</strong> on the Object Explorer toolbar and choose the type of server from the drop-down list. The <strong>Connect to Server</strong> dialog box opens. To connect, you must provide at least the name of the server and the correct authentication information.</p>
</div>
</div>
</div>
<div class="MTPS_CollapsibleRegion" id="ctl00_rs1_mainContentContainer_cpe121071">
<div class="CollapseRegionLink" id="ctl00_rs1_mainContentContainer_cpe121071_h"><img id="ctl00_rs1_mainContentContainer_cpe121071_i" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" src="http://i.msdn.microsoft.com/Platform/Controls/CollapsibleArea/resources/minus.gif" onload="var image=new Image();image.src=this.src;if(image.width&gt;0 &amp;&amp; image.height&gt;0){if(image.width&gt;=700){this.width=700;this.height=image.height*700/image.width;}}" alt="" />&nbsp;Optional Object Explorer Connection Settings </div>
<div class="MTPS_CollapsibleSection" id="ctl00_rs1_mainContentContainer_cpe121071_c" style="DISPLAY: block; OVERFLOW: visible; WIDTH: auto; HEIGHT: auto">
<div class="MTPS_CollapsibleSection" id="" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; DISPLAY: block; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none"><a name="sectionToggle2"></a>
<p>When connecting to a server, you can specify additional connection information in the <strong>Connect to Server</strong> dialog box. The <strong>Connect to Server</strong> dialog box will retain the last used settings, and new connections, such as new code editor windows, will use those settings.</p>
<p>To specify optional connection settings, follow these steps: </p>
<ol>
    <li>Click <strong>Connect</strong> on the Object Explorer toolbar, and click the type of server to connect to. The <strong>Connect to Server</strong> dialog box appears.<br /></li>
    <li>In the <strong>Server Name</strong> box, type the name of your SQL Server instance.<br /></li>
    <li>Click <strong>Options</strong>. The <strong>Connect to Server</strong> dialog box displays additional options.<br /></li>
    <li>Click the <strong>Connection Properties</strong> tab to configure the additional settings. The settings that are available vary depending upon the server type. The following settings are available for the Database Engine.<br />
    <h3 class="subHeading"><!----></h3>
    <table style="BACKGROUND-COLOR: #cccccc" width="100%" border="1">
        <tbody>
            <tr>
                <th>Setting </th>
                <th>Description </th>
            </tr>
            <tr>
                <td>
                <p><strong>Connect to database</strong> </p>
                </td>
                <td>
                <p>Choose from the available databases on the server. This list will only show databases that you have permission to view.</p>
                </td>
            </tr>
            <tr>
                <td>
                <p><strong>Network protocol</strong> </p>
                </td>
                <td>
                <p>Select from Shared Memory, TCP/IP, or Named Pipes.</p>
                </td>
            </tr>
            <tr>
                <td>
                <p><strong>Network packet size</strong> </p>
                </td>
                <td>
                <p>Configure in bytes. The default setting is 4096 bytes.</p>
                </td>
            </tr>
            <tr>
                <td>
                <p><strong>Connection timeout</strong> </p>
                </td>
                <td>
                <p>Configure in seconds. The default setting is 15 seconds.</p>
                </td>
            </tr>
            <tr>
                <td>
                <p><strong>Execution timeout</strong> </p>
                </td>
                <td>
                <p>Configure in seconds. The default setting (0) indicates that execution will never time out.</p>
                </td>
            </tr>
            <tr>
                <td>
                <p><strong>Encrypt connection</strong> </p>
                </td>
                <td>
                <p>Forces encryption.</p>
                </td>
            </tr>
        </tbody>
    </table>
    </li>
    <li>To add the specified server to your list of registered servers, click the <strong>Registered Server</strong> tab, click on the location where you want the new server to appear, and then complete the connection.<br /></li>
</ol>
</div>
</div>
</div>
<div class="MTPS_CollapsibleRegion" id="ctl00_rs1_mainContentContainer_cpe121072">
<div class="CollapseRegionLink" id="ctl00_rs1_mainContentContainer_cpe121072_h"><img id="ctl00_rs1_mainContentContainer_cpe121072_i" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" src="http://i.msdn.microsoft.com/Platform/Controls/CollapsibleArea/resources/minus.gif" onload="var image=new Image();image.src=this.src;if(image.width&gt;0 &amp;&amp; image.height&gt;0){if(image.width&gt;=700){this.width=700;this.height=image.height*700/image.width;}}" alt="" />&nbsp;Register a Server from Object Explorer </div>
<div class="MTPS_CollapsibleSection" id="ctl00_rs1_mainContentContainer_cpe121072_c" style="DISPLAY: block; OVERFLOW: visible; WIDTH: auto; HEIGHT: auto">
<div class="MTPS_CollapsibleSection" id="" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; DISPLAY: block; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none"><a name="sectionToggle3"></a>
<p>When connected to a server, you can easily register the server for future use. In Object Explorer, right-click the server name, and then click <strong>Register</strong>. In the <strong>Register Server</strong> dialog box, specify where in the server group tree you want to place the server. In the <strong>Server name</strong> box, you can replace the server name with a more meaningful server name. For example, you could register server <strong>APSQL02</strong> with a more meaningful name such as &quot;<strong>Accounts Payable</strong>&quot;.</p>
</div>
</div>
</div>
<div class="MTPS_CollapsibleRegion" id="ctl00_rs1_mainContentContainer_cpe121073">
<div class="CollapseRegionLink" id="ctl00_rs1_mainContentContainer_cpe121073_h"><img id="ctl00_rs1_mainContentContainer_cpe121073_i" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" src="http://i.msdn.microsoft.com/Platform/Controls/CollapsibleArea/resources/minus.gif" onload="var image=new Image();image.src=this.src;if(image.width&gt;0 &amp;&amp; image.height&gt;0){if(image.width&gt;=700){this.width=700;this.height=image.height*700/image.width;}}" alt="" />&nbsp;Viewing Objects in Object Explorer </div>
<div class="MTPS_CollapsibleSection" id="ctl00_rs1_mainContentContainer_cpe121073_c" style="DISPLAY: block; OVERFLOW: visible; WIDTH: auto; HEIGHT: auto">
<div class="MTPS_CollapsibleSection" id="" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; DISPLAY: block; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none"><a name="sectionToggle4"></a>
<p>Object Explorer uses a tree structure to group information into folders. To expand folders, click the plus sign (+) or double-click the folder. Expand folders to show more detailed information. Right-click folders or objects to perform common tasks. Double-click objects to perform the most common task.</p>
<p>The first time you expand a folder, Object Explorer will query the server for information to populate the tree. You can perform other functions while the tree is populating. While Object Explorer is populating the tree, you can click <strong>Stop</strong> to halt the process. Further actions, such as filtering the list, will only act upon the portion of the folder that was populated, unless you refresh the folder to start population again.</p>
<p>To conserve resources when there are many objects, the folders in the Object Explorer tree do not automatically refresh their list of contents. To refresh the list of objects within a folder, right-click the folder, and then click <strong>Refresh</strong>.</p>
<p>Object Explorer can only display up to 65,536 objects. After you have exceeded 65,536 visible objects, you cannot scroll through additional objects in the Object Explorer tree view. To view additional objects in Object Explorer, close nodes that you are not using or apply filtering to reduce the number of objects.</p>
</div>
</div>
</div>
<div class="MTPS_CollapsibleRegion" id="ctl00_rs1_mainContentContainer_cpe121074">
<div class="CollapseRegionLink" id="ctl00_rs1_mainContentContainer_cpe121074_h"><img id="ctl00_rs1_mainContentContainer_cpe121074_i" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" src="http://i.msdn.microsoft.com/Platform/Controls/CollapsibleArea/resources/minus.gif" onload="var image=new Image();image.src=this.src;if(image.width&gt;0 &amp;&amp; image.height&gt;0){if(image.width&gt;=700){this.width=700;this.height=image.height*700/image.width;}}" alt="" />&nbsp;Filtering the List of Objects in Object Explorer </div>
<div class="MTPS_CollapsibleSection" id="ctl00_rs1_mainContentContainer_cpe121074_c" style="DISPLAY: block; OVERFLOW: visible; WIDTH: auto; HEIGHT: auto">
<div class="MTPS_CollapsibleSection" id="" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; DISPLAY: block; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none"><a name="sectionToggle5"></a>
<p>When a folder contains a large number of objects, it may be difficult to find the object you are looking for. In such cases, use the filter feature of Object Explorer to reduce the list to a smaller size. For example, you may want to find a specific database user or the most recently created table in lists that contain hundreds of objects. Click on the folder that you want to filter, and then click the filter button to open the <strong>Filter Settings</strong> dialog box. You can filter the list by name, create date, and sometimes schema, and provide additional filtering operators like <strong>Starts with</strong>, <strong>Contains</strong>, and <strong>Between</strong>.</p>
</div>
</div>
</div>
<div class="MTPS_CollapsibleRegion" id="ctl00_rs1_mainContentContainer_cpe121075">
<div class="CollapseRegionLink" id="ctl00_rs1_mainContentContainer_cpe121075_h"><img id="ctl00_rs1_mainContentContainer_cpe121075_i" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" src="http://i.msdn.microsoft.com/Platform/Controls/CollapsibleArea/resources/minus.gif" onload="var image=new Image();image.src=this.src;if(image.width&gt;0 &amp;&amp; image.height&gt;0){if(image.width&gt;=700){this.width=700;this.height=image.height*700/image.width;}}" alt="" />&nbsp;Multi-select </div>
<div class="MTPS_CollapsibleSection" id="ctl00_rs1_mainContentContainer_cpe121075_c" style="DISPLAY: block; OVERFLOW: visible; WIDTH: auto; HEIGHT: auto">
<div class="MTPS_CollapsibleSection" id="" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; DISPLAY: block; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none"><a name="sectionToggle6"></a>
<p>Only one object can be selected at a time in Object Explorer. To select multiple items, press <strong>F7</strong> to open the <strong>Object Explorer Details Page</strong>. The <strong>Object Explorer Details Page</strong> supports multi-select.</p>
</div>
</div>
</div>
<div class="MTPS_CollapsibleRegion" id="ctl00_rs1_mainContentContainer_cpe121076">
<div class="CollapseRegionLink" id="ctl00_rs1_mainContentContainer_cpe121076_h"><img id="ctl00_rs1_mainContentContainer_cpe121076_i" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" src="http://i.msdn.microsoft.com/Platform/Controls/CollapsibleArea/resources/minus.gif" onload="var image=new Image();image.src=this.src;if(image.width&gt;0 &amp;&amp; image.height&gt;0){if(image.width&gt;=700){this.width=700;this.height=image.height*700/image.width;}}" alt="" />&nbsp;Opening a Connected Query Editor </div>
<div class="MTPS_CollapsibleSection" id="ctl00_rs1_mainContentContainer_cpe121076_c" style="DISPLAY: block; OVERFLOW: visible; WIDTH: auto; HEIGHT: auto">
<div class="MTPS_CollapsibleSection" id="" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; DISPLAY: block; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none"><a name="sectionToggle7"></a>
<p>When Object Explorer is connected to a server, you can open a new Code Editor window using the connection settings of Object Explorer. To open a new Code Editor window, right-click the server name in Object Explorer, and then click <strong>New Query</strong>. To open a Code Editor window using a particular database, right-click the database name, and then click <strong>New Query</strong>. When opening a new query for an Analysis Services server, you can select DMX, MDX, or XMLA queries.</p>
</div>
</div>
</div>
<div class="MTPS_CollapsibleRegion" id="ctl00_rs1_mainContentContainer_cpe121077">
<div class="CollapseRegionLink" id="ctl00_rs1_mainContentContainer_cpe121077_h"><img id="ctl00_rs1_mainContentContainer_cpe121077_i" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" src="http://i.msdn.microsoft.com/Platform/Controls/CollapsibleArea/resources/minus.gif" onload="var image=new Image();image.src=this.src;if(image.width&gt;0 &amp;&amp; image.height&gt;0){if(image.width&gt;=700){this.width=700;this.height=image.height*700/image.width;}}" alt="" />&nbsp;Starting PowerShell </div>
<div class="MTPS_CollapsibleSection" id="ctl00_rs1_mainContentContainer_cpe121077_c" style="DISPLAY: block; OVERFLOW: visible; WIDTH: auto; HEIGHT: auto">
<div class="MTPS_CollapsibleSection" id="" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; DISPLAY: block; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none"><a name="sectionToggle8"></a>
<p>You can start a PowerShell session by right-clicking most folders and objects in the Object Explorer tree and selecting Start PowerShell. This starts a PowerShell session that has the SQL Server PowerShell support enabled, and the path set to the object you right-clicked in Object Explorer. You can then enter PowerShell commands in an interactive PowerShell environment. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl21" onclick="javascript:Track('ctl00_rs1_mainContentContainer_cpe121077_c|ctl00_rs1_mainContentContainer_ctl21',this);" href="http://msdn2.microsoft.com/en-us/library/cc281954(SQL.100).aspx"><u><font color="#0066cc">SQL Server PowerShell Overview</font></u></a>.</p>
<p>PowerShell does not have F1 help, but it does include a <strong>Get-Help</strong> cmdlet that provides information about using PowerShell. For more information about using Get-Help, see <a id="ctl00_rs1_mainContentContainer_ctl22" onclick="javascript:Track('ctl00_rs1_mainContentContainer_cpe121077_c|ctl00_rs1_mainContentContainer_ctl22',this);" href="http://msdn2.microsoft.com/en-us/library/cc281939(SQL.100).aspx"><u><font color="#0066cc">SQL Server PowerShell Help</font></u></a>.</p>
</div>
</div>
</div>]]>
</content>
</entry>

<entry>
<title>1.4. Overview of the MySQL Database Management System</title>
<link rel="alternate" type="text/html" href="http://www.bokee.net/blogmodule/weblogcomment_viewEntry/1805375.html"/>
<issued>2008-05-20T13-13-45 CST</issued> 
<created>2008-05-20T13-13-45 CST</created>
<modified>2008-07-25T00-26-49Z</modified>
<id>tag:dolly00.blogchina.com,2005://1805375</id>
<author>
<name>dolly00</name>
<url>http://www.bokee.net/blogmodule/weblogcomment_index/dolly00.html</url>
</author>
<dc:subject>Default Cloumn</dc:subject>
<content type="text/html" mode="escaped" xml:lang="zh_CN" xml:base="http://www.bokee.net"> 
<![CDATA[<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="what-is-mysql"></a>1.4.1.&nbsp;What is MySQL?</h3>
</div>
</div>
</div>
&nbsp;&nbsp;&nbsp; MySQL, the most popular Open Source SQL database management system, is developed, distributed, and supported by MySQL AB. MySQL AB is a commercial company, founded by the MySQL developers. It is a second generation Open Source company that unites Open Source values and methodology with a successful business model.
<p>The MySQL Web site (<a href="http://www.mysql.com/" target="_top"><u><font color="#0000ff">http://www.mysql.com/</font></u></a>) provides the latest information about MySQL software and MySQL AB. </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>MySQL is a database management system. </p>
    <p>A database is a structured collection of data. It may be anything from a simple shopping list to a picture gallery or the vast amounts of information in a corporate network. To add, access, and process data stored in a computer database, you need a database management system such as MySQL Server. Since computers are very good at handling large amounts of data, database management systems play a central role in computing, as standalone utilities, or as parts of other applications. </p>
    </li>
    <li>
    <p>MySQL is a relational database management system. </p>
    <p><a name="id353151"></a>A relational database stores data in separate tables rather than putting all the data in one big storeroom. This adds speed and flexibility. The SQL part of &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">MySQL</font></span>&rdquo; stands for &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">Structured Query Language.</font></span>&rdquo; SQL is the most common standardized language used to access databases and is defined by the ANSI/ISO SQL Standard. The SQL standard has been evolving since 1986 and several versions exist. In this manual, &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">SQL-92</font></span>&rdquo; refers to the standard released in 1992, &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">SQL:1999</font></span>&rdquo; refers to the standard released in 1999, and &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">SQL:2003</font></span>&rdquo; refers to the current version of the standard. We use the phrase &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">the SQL standard</font></span>&rdquo; to mean the current version of the SQL Standard at any time. </p>
    </li>
    <li>
    <p>MySQL software is Open Source. </p>
    <p>Open Source means that it is possible for anyone to use and modify the software. Anybody can download the MySQL software from the Internet and use it without paying anything. If you wish, you may study the source code and change it to suit your needs. The MySQL software uses the GPL (GNU General Public License), <a href="http://www.fsf.org/licenses/" target="_top"><u><font color="#0000ff">http://www.fsf.org/licenses/</font></u></a>, to define what you may and may not do with the software in different situations. If you feel uncomfortable with the GPL or need to embed MySQL code into a commercial application, you can buy a commercially licensed version from us. See the MySQL Licensing Overview for more information (<a href="http://www.mysql.com/company/legal/licensing/" target="_top"><u><font color="#0000ff">http://www.mysql.com/company/legal/licensing/</font></u></a>). </p>
    </li>
    <li>
    <p>The MySQL Database Server is very fast, reliable, and easy to use. </p>
    <p>If that is what you are looking for, you should give it a try. MySQL Server also has a practical set of features developed in close cooperation with our users. You can find a performance comparison of MySQL Server with other database managers on our benchmark page. See <a title="6.1.4. The MySQL Benchmark Suite" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch06.html#mysql-benchmarks"><u><font color="#0000ff">Section&nbsp;6.1.4, &ldquo;The MySQL Benchmark Suite&rdquo;</font></u></a>. </p>
    <p>MySQL Server was originally developed to handle large databases much faster than existing solutions and has been successfully used in highly demanding production environments for several years. Although under constant development, MySQL Server today offers a rich and useful set of functions. Its connectivity, speed, and security make MySQL Server highly suited for accessing databases on the Internet. </p>
    </li>
    <li>
    <p>MySQL Server works in client/server or embedded systems. </p>
    <p>The MySQL Database Software is a client/server system that consists of a multi-threaded SQL server that supports different backends, several different client programs and libraries, administrative tools, and a wide range of application programming interfaces (APIs). </p>
    <p>We also provide MySQL Server as an embedded multi-threaded library that you can link into your application to get a smaller, faster, easier-to-manage standalone product. </p>
    </li>
    <li>
    <p>A large amount of contributed MySQL software is available. </p>
    <p>It is very likely that your favorite application or language supports the MySQL Database Server. </p>
    </li>
</ul>
</div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The official way to pronounce &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">MySQL</font></span>&rdquo; is &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">My Ess Que Ell</font></span>&rdquo; (not &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">my sequel</font></span>&rdquo;), but we don't mind if you pronounce it as &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">my sequel</font></span>&rdquo; or in some other localized way. </div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="history"></a>1.4.2.&nbsp;History of MySQL</h3>
</div>
</div>
</div>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; We started out with the intention of using the <code class="literal"><font face="新宋体">mSQL</font></code> database system to connect to our tables using our own fast low-level (ISAM) routines. However, after some testing, we came to the conclusion that <code class="literal"><font face="新宋体">mSQL</font></code> was not fast enough or flexible enough for our needs. This resulted in a new SQL interface to our database but with almost the same API interface as <code class="literal"><font face="新宋体">mSQL</font></code>. This API was designed to allow third-party code that was written for use with <code class="literal"><font face="新宋体">mSQL</font></code> to be ported easily for use with MySQL. </p>
<p>MySQL is named after co-founder Monty Widenius's daughter, My. </p>
<p>The name of the MySQL Dolphin (our logo) is &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">Sakila,</font></span>&rdquo; which was chosen by the founders of MySQL AB from a huge list of names suggested by users in our &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">Name the Dolphin</font></span>&rdquo; contest. The winning name was submitted by Ambrose Twebaze, an Open Source software developer from Swaziland, Africa. According to Ambrose, the feminine name Sakila has its roots in SiSwati, the local language of Swaziland. Sakila is also the name of a town in Arusha, Tanzania, near Ambrose's country of origin, Uganda. </p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="features"></a>1.4.3.&nbsp;The Main Features of MySQL</h3>
</div>
</div>
</div>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This section describes some of the important characteristics of the MySQL Database Software. See also <a title="1.5. MySQL Development Roadmap" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch01s05.html"><u><font color="#0000ff">Section&nbsp;1.5, &ldquo;MySQL Development Roadmap&rdquo;</font></u></a>, for more information about current and upcoming features. In most respects, it applies to all versions of MySQL. For information about features as they are introduced into MySQL on a series-specific basis, see the &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">In a Nutshell</font></span>&rdquo; section of the appropriate Manual: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>MySQL 4.0 and 4.1: <a href="http://dev.mysql.com/doc/refman/4.1/en/mysql-4-0-nutshell.html" target="_top"><u><font color="#0000ff">MySQL 4.0 in a Nutshell</font></u></a>, and <a href="http://dev.mysql.com/doc/refman/4.1/en/mysql-nutshell.html" target="_top"><u><font color="#0000ff">MySQL 4.1 in a Nutshell</font></u></a>. </p>
    </li>
    <li>
    <p>MySQL 5.0: <a href="http://dev.mysql.com/doc/refman/5.0/en/mysql-nutshell.html" target="_top"><u><font color="#0000ff">MySQL 5.0 in a Nutshell</font></u></a>. </p>
    </li>
    <li>
    <p>MySQL 5.1: <a href="http://dev.mysql.com/doc/refman/5.1/en/mysql-nutshell.html" target="_top"><u><font color="#0000ff">MySQL 5.1 in a Nutshell</font></u></a>. </p>
    </li>
</ul>
</div>
<p>Internals and Portability: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>Written in C and C++. </p>
    </li>
    <li>
    <p>Tested with a broad range of different compilers. </p>
    </li>
    <li>
    <p>Works on many different platforms. See <a title="2.4.2. Operating Systems Supported by MySQL Community Server" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch02s04.html#which-os"><u><font color="#0000ff">Section&nbsp;2.4.2, &ldquo;Operating Systems Supported by MySQL Community Server&rdquo;</font></u></a>. </p>
    </li>
    <li>
    <p>Uses GNU Automake, Autoconf, and Libtool for portability. </p>
    </li>
    <li>
    <p>The MySQL Server design is multi-layered with independent modules. </p>
    </li>
    <li>
    <p>Fully multi-threaded using kernel threads. It can easily use multiple CPUs if they are available. </p>
    </li>
    <li>
    <p>Provides transactional and non-transactional storage engines. </p>
    </li>
    <li>
    <p>Uses very fast B-tree disk tables (<code class="literal"><font face="新宋体">MyISAM</font></code>) with index compression. </p>
    </li>
    <li>
    <p>Relatively easy to add other storage engines. This is useful if you want to provide an SQL interface for an in-house database. </p>
    </li>
    <li>
    <p>A very fast thread-based memory allocation system. </p>
    </li>
    <li>
    <p>Very fast joins using an optimized one-sweep multi-join. </p>
    </li>
    <li>
    <p>In-memory hash tables, which are used as temporary tables. </p>
    </li>
    <li>
    <p>SQL functions are implemented using a highly optimized class library and should be as fast as possible. Usually there is no memory allocation at all after query initialization. </p>
    </li>
    <li>
    <p>The MySQL code is tested with Purify (a commercial memory leakage detector) as well as with Valgrind, a GPL tool (<a href="http://developer.kde.org/~sewardj/" target="_top"><u><font color="#0000ff">http://developer.kde.org/~sewardj/</font></u></a>). </p>
    </li>
    <li>
    <p>The server is available as a separate program for use in a client/server networked environment. It is also available as a library that can be embedded (linked) into standalone applications. Such applications can be used in isolation or in environments where no network is available. </p>
    </li>
</ul>
</div>
<p>Data Types: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>Many data types: signed/unsigned integers 1, 2, 3, 4, and 8 bytes long, <code class="literal"><font face="新宋体">FLOAT</font></code>, <code class="literal"><font face="新宋体">DOUBLE</font></code>, <code class="literal"><font face="新宋体">CHAR</font></code>, <code class="literal"><font face="新宋体">VARCHAR</font></code>, <code class="literal"><font face="新宋体">TEXT</font></code>, <code class="literal"><font face="新宋体">BLOB</font></code>, <code class="literal"><font face="新宋体">DATE</font></code>, <code class="literal"><font face="新宋体">TIME</font></code>, <code class="literal"><font face="新宋体">DATETIME</font></code>, <code class="literal"><font face="新宋体">TIMESTAMP</font></code>, <code class="literal"><font face="新宋体">YEAR</font></code>, <code class="literal"><font face="新宋体">SET</font></code>, <code class="literal"><font face="新宋体">ENUM</font></code>, and OpenGIS spatial types. See <a title="Chapter 10. Data Types" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch10.html"><u><font color="#0000ff">Chapter&nbsp;10, <em>Data Types</em></font></u></a>. </p>
    </li>
    <li>
    <p>Fixed-length and variable-length records. </p>
    </li>
</ul>
</div>
<p>Statements and Functions: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>Full operator and function support in the <code class="literal"><font face="新宋体">SELECT</font></code> list and <code class="literal"><font face="新宋体">WHERE</font></code> clause of queries. For example: </p>
    <pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT CONCAT(first_name, ' ', last_name)</code></strong>
    -&gt; <strong class="userinput"><code>FROM citizen</code></strong>
    -&gt; <strong class="userinput"><code>WHERE income/dependents &gt; 10000 AND age &gt; 30;</code></strong>
    </pre>
    </li>
    <li>
    <p>Full support for SQL <code class="literal"><font face="新宋体">GROUP BY</font></code> and <code class="literal"><font face="新宋体">ORDER BY</font></code> clauses. Support for group functions (<code class="literal"><font face="新宋体">COUNT()</font></code>, <code class="literal"><font face="新宋体">COUNT(DISTINCT ...)</font></code>, <code class="literal"><font face="新宋体">AVG()</font></code>, <code class="literal"><font face="新宋体">STD()</font></code>, <code class="literal"><font face="新宋体">SUM()</font></code>, <code class="literal"><font face="新宋体">MAX()</font></code>, <code class="literal"><font face="新宋体">MIN()</font></code>, and <code class="literal"><font face="新宋体">GROUP_CONCAT()</font></code>). </p>
    </li>
    <li>
    <p>Support for <code class="literal"><font face="新宋体">LEFT OUTER JOIN</font></code> and <code class="literal"><font face="新宋体">RIGHT OUTER JOIN</font></code> with both standard SQL and ODBC syntax. </p>
    </li>
    <li>
    <p>Support for aliases on tables and columns as required by standard SQL. </p>
    </li>
    <li>
    <p><code class="literal"><font face="新宋体">DELETE</font></code>, <code class="literal"><font face="新宋体">INSERT</font></code>, <code class="literal"><font face="新宋体">REPLACE</font></code>, and <code class="literal"><font face="新宋体">UPDATE</font></code> return the number of rows that were changed (affected). It is possible to return the number of rows matched instead by setting a flag when connecting to the server. </p>
    </li>
    <li>
    <p>The MySQL-specific <code class="literal"><font face="新宋体">SHOW</font></code> statement can be used to retrieve information about databases, storage engines, tables, and indexes. MySQL 5.0 adds support for the <code class="literal"><font face="新宋体">INFORMATION_SCHEMA</font></code> database, implemented according to standard SQL. </p>
    </li>
    <li>
    <p>The <code class="literal"><font face="新宋体">EXPLAIN</font></code> statement can be used to determine how the optimizer resolves a query. </p>
    </li>
    <li>
    <p>Function names do not clash with table or column names. For example, <code class="literal"><font face="新宋体">ABS</font></code> is a valid column name. The only restriction is that for a function call, no spaces are allowed between the function name and the &ldquo;<span class="quote"><code class="literal"><font style="BACKGROUND-COLOR: #feeef2" face="新宋体">(</font></code></span>&rdquo; that follows it. See <a title="8.3. Reserved Words" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch08s03.html"><u><font color="#0000ff">Section&nbsp;8.3, &ldquo;Reserved Words&rdquo;</font></u></a>. </p>
    </li>
    <li>
    <p>You can refer to tables from different databases in the same statement. </p>
    </li>
</ul>
</div>
<p>Security: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>A privilege and password system that is very flexible and secure, and that allows host-based verification. </p>
    </li>
    <li>
    <p>Passwords are secure because all password traffic is encrypted when you connect to a server. </p>
    </li>
</ul>
</div>
<p>Scalability and Limits: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>Handles large databases. We use MySQL Server with databases that contain 50 million records. We also know of users who use MySQL Server with 60,000 tables and about 5,000,000,000 rows. </p>
    </li>
    <li>
    <p>Up to 64 indexes per table are allowed (32 before MySQL 4.1.2). Each index may consist of 1 to 16 columns or parts of columns. The maximum index width is 1000 bytes (767 for <code class="literal"><font face="新宋体">InnoDB</font></code>); before MySQL 4.1.2, the limit is 500 bytes. An index may use a prefix of a column for <code class="literal"><font face="新宋体">CHAR</font></code>, <code class="literal"><font face="新宋体">VARCHAR</font></code>, <code class="literal"><font face="新宋体">BLOB</font></code>, or <code class="literal"><font face="新宋体">TEXT</font></code> column types. </p>
    </li>
</ul>
</div>
<p>Connectivity: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>Clients can connect to MySQL Server using several protocols: </p>
    <div class="itemizedlist">
    <ul type="circle">
        <li>
        <p>Clients can connect using TCP/IP sockets on any platform. </p>
        </li>
        <li>
        <p>On Windows systems in the NT family (NT, 2000, XP, 2003, or Vista), clients can connect using named pipes if the server is started with the <code class="option"><font face="新宋体">--enable-named-pipe</font></code> option. In MySQL 4.1 and higher, Windows servers also support shared-memory connections if started with the <code class="option"><font face="新宋体">--shared-memory</font></code> option. Clients can connect through shared memory by using the <code class="option"><font face="新宋体">--protocol=memory</font></code> option. </p>
        </li>
        <li>
        <p>On Unix systems, clients can connect using Unix domain socket files. </p>
        </li>
    </ul>
    </div>
    </li>
    <li>
    <p>MySQL client programs can be written in many languages. A client library written in C is available for clients written in C or C++, or for any language that provides C bindings. </p>
    </li>
    <li>
    <p>APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl are available, allowing MySQL clients to be written in many languages. See <a title="Chapter 23. APIs and Libraries" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch23.html"><u><font color="#0000ff">Chapter&nbsp;23, <em>APIs and Libraries</em></font></u></a>. </p>
    </li>
    <li>
    <p>The Connector/ODBC (MyODBC) interface provides MySQL support for client programs that use ODBC (Open Database Connectivity) connections. For example, you can use MS Access to connect to your MySQL server. Clients can be run on Windows or Unix. MyODBC source is available. All ODBC 2.5 functions are supported, as are many others. See <a title="Chapter 24. Connectors" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch24.html"><u><font color="#0000ff">Chapter&nbsp;24, <em>Connectors</em></font></u></a>. </p>
    </li>
    <li>
    <p>The Connector/J interface provides MySQL support for Java client programs that use JDBC connections. Clients can be run on Windows or Unix. Connector/J source is available. See <a title="Chapter 24. Connectors" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch24.html"><u><font color="#0000ff">Chapter&nbsp;24, <em>Connectors</em></font></u></a>. </p>
    </li>
    <li>
    <p>MySQL Connector/NET enables developers to easily create .NET applications that require secure, high-performance data connectivity with MySQL. It implements the required ADO.NET interfaces and integrates into ADO.NET aware tools. Developers can build applications using their choice of .NET languages. MySQL Connector/NET is a fully managed ADO.NET driver written in 100% pure C#. See <a title="Chapter 24. Connectors" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch24.html"><u><font color="#0000ff">Chapter&nbsp;24, <em>Connectors</em></font></u></a>. </p>
    </li>
</ul>
</div>
<p>Localization: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>The server can provide error messages to clients in many languages. See <a title="5.10.2. Setting the Error Message Language" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch05s10.html#languages"><u><font color="#0000ff">Section&nbsp;5.10.2, &ldquo;Setting the Error Message Language&rdquo;</font></u></a>. </p>
    </li>
    <li>
    <p>Full support for several different character sets, including <code class="literal"><font face="新宋体">latin1</font></code> (cp1252), <code class="literal"><font face="新宋体">german</font></code>, <code class="literal"><font face="新宋体">big5</font></code>, <code class="literal"><font face="新宋体">ujis</font></code>, and more. For example, the Scandinavian characters &ldquo;<span class="quote"><code class="literal"><font style="BACKGROUND-COLOR: #feeef2" face="新宋体">&aring;</font></code></span>&rdquo;, &ldquo;<span class="quote"><code class="literal"><font style="BACKGROUND-COLOR: #feeef2" face="新宋体">&auml;</font></code></span>&rdquo; and &ldquo;<span class="quote"><code class="literal"><font style="BACKGROUND-COLOR: #feeef2" face="新宋体">&ouml;</font></code></span>&rdquo; are allowed in table and column names. Unicode support is available as of MySQL 4.1. </p>
    </li>
    <li>
    <p>All data is saved in the chosen character set. </p>
    </li>
    <li>
    <p>Sorting and comparisons are done according to the chosen character set and collation (using <code class="literal"><font face="新宋体">latin1</font></code> and Swedish collation by default). It is possible to change this when the MySQL server is started. To see an example of very advanced sorting, look at the Czech sorting code. MySQL Server supports many different character sets that can be specified at compile time and runtime. </p>
    </li>
    <li>
    <p>As of MySQL 4.1, the server time zone can be changed dynamically, and individual clients can specify their own time zone. <a title="5.10.8. MySQL Server Time Zone Support" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch05s10.html#time-zone-support"><u><font color="#0000ff">Section&nbsp;5.10.8, &ldquo;MySQL Server Time Zone Support&rdquo;</font></u></a>. </p>
    </li>
</ul>
</div>
<p class="mnmas"><strong>MySQL Enterprise.&nbsp;</strong> For assistance in getting optimal performance from your MySQL server subscribe to MySQL Enterprise. For more information see <a href="http://www.mysql.com/products/enterprise/" target="_top"><u><font color="#0000ff">http://www.mysql.com/products/enterprise/</font></u></a>. </p>
<p>Clients and Tools: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>MySQL AB provides several client and utility programs. These include both command-line programs such as <span><strong class="command">mysqldump</strong></span> and <span><strong class="command">mysqladmin</strong></span>, and graphical programs such as MySQL Administrator and MySQL Query Browser. </p>
    </li>
    <li>
    <p>MySQL Server has built-in support for SQL statements to check, optimize, and repair tables. These statements are available from the command line through the <span><strong class="command">mysqlcheck</strong></span> client. MySQL also includes <span><strong class="command">myisamchk</strong></span>, a very fast command-line utility for performing these operations on <code class="literal"><font face="新宋体">MyISAM</font></code> tables. See <a title="Chapter 7. Client and Utility Programs" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch07.html"><u><font color="#0000ff">Chapter&nbsp;7, <em>Client and Utility Programs</em></font></u></a>. </p>
    </li>
    <li>
    <p>MySQL programs can be invoked with the <code class="option"><font face="新宋体">--help</font></code> or <code class="option"><font face="新宋体">-?</font></code> option to obtain online assistance.</p>
    </li>
</ul>
</div>
</div>]]>
</content>
</entry>

<entry>
<title>3.2. Entering Queries</title>
<link rel="alternate" type="text/html" href="http://www.bokee.net/blogmodule/weblogcomment_viewEntry/1805363.html"/>
<issued>2008-05-20T13-12-23 CST</issued> 
<created>2008-05-20T13-12-23 CST</created>
<modified>2008-07-17T01-18-35Z</modified>
<id>tag:dolly00.blogchina.com,2005://1805363</id>
<author>
<name>dolly00</name>
<url>http://www.bokee.net/blogmodule/weblogcomment_index/dolly00.html</url>
</author>
<dc:subject>Default Cloumn</dc:subject>
<content type="text/html" mode="escaped" xml:lang="zh_CN" xml:base="http://www.bokee.net"> 
<![CDATA[<p>Make sure that you are connected to the server, as discussed in the previous section. Doing so does not in itself select any database to work with, but that's okay. At this point, it's more important to find out a little about how to issue queries than to jump right in creating tables, loading data into them, and retrieving data from them. This section describes the basic principles of entering commands, using several queries you can try out to familiarize yourself with how <span><strong class="command">mysql</strong></span> works. </p>
<p>Here's a simple command that asks the server to tell you its version number and the current date. Type it in as shown here following the <code class="literal"><font face="新宋体">mysql&gt;</font></code> prompt and press Enter: </p>
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT VERSION(), CURRENT_DATE;</code></strong>
+----------------+--------------+
| VERSION()      | CURRENT_DATE |
+----------------+--------------+
| 5.0.7-beta-Max | 2005-07-11   |
+----------------+--------------+
1 row in set (0.01 sec)
mysql&gt;
</pre>
<p>This query illustrates several things about <span><strong class="command">mysql</strong></span>: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>A command normally consists of an SQL statement followed by a semicolon. (There are some exceptions where a semicolon may be omitted. <code class="literal"><font face="新宋体">QUIT</font></code>, mentioned earlier, is one of them. We'll get to others later.) </p>
    </li>
    <li>
    <p>When you issue a command, <span><strong class="command">mysql</strong></span> sends it to the server for execution and displays the results, then prints another <code class="literal"><font face="新宋体">mysql&gt;</font></code> prompt to indicate that it is ready for another command. </p>
    </li>
    <li>
    <p><span><strong class="command">mysql</strong></span> displays query output in tabular form (rows and columns). The first row contains labels for the columns. The rows following are the query results. Normally, column labels are the names of the columns you fetch from database tables. If you're retrieving the value of an expression rather than a table column (as in the example just shown), <span><strong class="command">mysql</strong></span> labels the column using the expression itself. </p>
    </li>
    <li>
    <p><span><strong class="command">mysql</strong></span> shows how many rows were returned and how long the query took to execute, which gives you a rough idea of server performance. These values are imprecise because they represent wall clock time (not CPU or machine time), and because they are affected by factors such as server load and network latency. (For brevity, the &ldquo;<span class="quote"><font style="BACKGROUND-COLOR: #feeef2">rows in set</font></span>&rdquo; line is sometimes not shown in the remaining examples in this chapter.) </p>
    </li>
</ul>
</div>
<p>Keywords may be entered in any lettercase. The following queries are equivalent: </p>
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT VERSION(), CURRENT_DATE;</code></strong>
mysql&gt; <strong class="userinput"><code>select version(), current_date;</code></strong>
mysql&gt; <strong class="userinput"><code>SeLeCt vErSiOn(), current_DATE;</code></strong>
</pre>
<p>Here's another query. It demonstrates that you can use <span><strong class="command">mysql</strong></span> as a simple calculator: </p>
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT SIN(PI()/4), (4+1)*5;</code></strong>
+------------------+---------+
| SIN(PI()/4)      | (4+1)*5 |
+------------------+---------+
| 0.70710678118655 |      25 |
+------------------+---------+
1 row in set (0.02 sec)
</pre>
<p>The queries shown thus far have been relatively short, single-line statements. You can even enter multiple statements on a single line. Just end each one with a semicolon: </p>
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT VERSION(); SELECT NOW();</code></strong>
+----------------+
| VERSION()      |
+----------------+
| 5.0.7-beta-Max |
+----------------+
1 row in set (0.00 sec)
+---------------------+
| NOW()               |
+---------------------+
| 2005-07-11 17:59:36 |
+---------------------+
1 row in set (0.00 sec)
</pre>
<p>A command need not be given all on a single line, so lengthy commands that require several lines are not a problem. <span><strong class="command">mysql</strong></span> determines where your statement ends by looking for the terminating semicolon, not by looking for the end of the input line. (In other words, <span><strong class="command">mysql</strong></span> accepts free-format input: it collects input lines but does not execute them until it sees the semicolon.) </p>
<p>Here's a simple multiple-line statement: </p>
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT</code></strong>
-&gt; <strong class="userinput"><code>USER()</code></strong>
-&gt; <strong class="userinput"><code>,</code></strong>
-&gt; <strong class="userinput"><code>CURRENT_DATE;</code></strong>
+---------------+--------------+
| USER()        | CURRENT_DATE |
+---------------+--------------+
| jon@localhost | 2005-07-11   |
+---------------+--------------+
</pre>
<p>In this example, notice how the prompt changes from <code class="literal"><font face="新宋体">mysql&gt;</font></code> to <code class="literal"><font face="新宋体">-&gt;</font></code> after you enter the first line of a multiple-line query. This is how <span><strong class="command">mysql</strong></span> indicates that it has not yet seen a complete statement and is waiting for the rest. The prompt is your friend, because it provides valuable feedback. If you use that feedback, you can always be aware of what <span><strong class="command">mysql</strong></span> is waiting for. </p>
<p>If you decide you do not want to execute a command that you are in the process of entering, cancel it by typing <code class="literal"><font face="新宋体">\c</font></code>: </p>
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT</code></strong>
-&gt; <strong class="userinput"><code>USER()</code></strong>
-&gt; <strong class="userinput"><code>\c</code></strong>
mysql&gt;
</pre>
<p>Here, too, notice the prompt. It switches back to <code class="literal"><font face="新宋体">mysql&gt;</font></code> after you type <code class="literal"><font face="新宋体">\c</font></code>, providing feedback to indicate that <span><strong class="command">mysql</strong></span> is ready for a new command. </p>
<p>The following table shows each of the prompts you may see and summarizes what they mean about the state that <span><strong class="command">mysql</strong></span> is in: </p>
<a name="id416006"></a>
<div class="informaltable">
<table border="1">
    <colgroup><col></col><col></col></colgroup>
    <tbody>
        <tr>
            <td><span class="bold"><strong>Prompt</strong></span></td>
            <td><span class="bold"><strong>Meaning</strong></span></td>
        </tr>
        <tr>
            <td><code class="literal"><font face="新宋体">mysql&gt;</font></code></td>
            <td>Ready for new command.</td>
        </tr>
        <tr>
            <td><code class="literal"><font face="新宋体">-&gt;</font></code></td>
            <td>Waiting for next line of multiple-line command.</td>
        </tr>
        <tr>
            <td><code class="literal"><font face="新宋体">'&gt;</font></code></td>
            <td>Waiting for next line, waiting for completion of a string that began with a single quote (&ldquo;<span class="quote"><code class="literal"><font style="BACKGROUND-COLOR: #feeef2" face="新宋体">'</font></code></span>&rdquo;).</td>
        </tr>
        <tr>
            <td><code class="literal"><font face="新宋体">&quot;&gt;</font></code></td>
            <td>Waiting for next line, waiting for completion of a string that began with a double quote (&ldquo;<span class="quote"><code class="literal"><font style="BACKGROUND-COLOR: #feeef2" face="新宋体">&quot;</font></code></span>&rdquo;).</td>
        </tr>
        <tr>
            <td><code class="literal"><font face="新宋体">`&gt;</font></code></td>
            <td>Waiting for next line, waiting for completion of an identifier that began with a backtick (&ldquo;<span class="quote"><code class="literal"><font style="BACKGROUND-COLOR: #feeef2" face="新宋体">`</font></code></span>&rdquo;).</td>
        </tr>
        <tr>
            <td><code class="literal"><font face="新宋体">/*&gt;</font></code></td>
            <td>Waiting for next line, waiting for completion of a comment that began with <code class="literal"><font face="新宋体">/*</font></code>.</td>
        </tr>
    </tbody>
</table>
</div>
<p>In the MySQL 5.0 series, the <code class="literal"><font face="新宋体">/*&gt;</font></code> prompt was implemented in MySQL 5.0.6. </p>
<p>Multiple-line statements commonly occur by accident when you intend to issue a command on a single line, but forget the terminating semicolon. In this case, <span><strong class="command">mysql</strong></span> waits for more input: </p>
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT USER()</code></strong>
-&gt;
</pre>
<p>If this happens to you (you think you've entered a statement but the only response is a <code class="literal"><font face="新宋体">-&gt;</font></code> prompt), most likely <span><strong class="command">mysql</strong></span> is waiting for the semicolon. If you don't notice what the prompt is telling you, you might sit there for a while before realizing what you need to do. Enter a semicolon to complete the statement, and <span><strong class="command">mysql</strong></span> executes it: </p>
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT USER()</code></strong>
-&gt; <strong class="userinput"><code>;</code></strong>
+---------------+
| USER()        |
+---------------+
| jon@localhost |
+---------------+
</pre>
<p>The <code class="literal"><font face="新宋体">'&gt;</font></code> and <code class="literal"><font face="新宋体">&quot;&gt;</font></code> prompts occur during string collection (another way of saying that MySQL is waiting for completion of a string). In MySQL, you can write strings surrounded by either &ldquo;<span class="quote"><code class="literal"><font style="BACKGROUND-COLOR: #feeef2" face="新宋体">'</font></code></span>&rdquo; or &ldquo;<span class="quote"><code class="literal"><font style="BACKGROUND-COLOR: #feeef2" face="新宋体">&quot;</font></code></span>&rdquo; characters (for example, <code class="literal"><font face="新宋体">'hello'</font></code> or <code class="literal"><font face="新宋体">&quot;goodbye&quot;</font></code>), and <span><strong class="command">mysql</strong></span> lets you enter strings that span multiple lines. When you see a <code class="literal"><font face="新宋体">'&gt;</font></code> or <code class="literal"><font face="新宋体">&quot;&gt;</font></code> prompt, it means that you have entered a line containing a string that begins with a &ldquo;<span class="quote"><code class="literal"><font style="BACKGROUND-COLOR: #feeef2" face="新宋体">'</font></code></span>&rdquo; or &ldquo;<span class="quote"><code class="literal"><font style="BACKGROUND-COLOR: #feeef2" face="新宋体">&quot;</font></code></span>&rdquo; quote character, but have not yet entered the matching quote that terminates the string. This often indicates that you have inadvertently left out a quote character. For example: </p>
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT * FROM my_table WHERE name = 'Smith AND age &lt; 30;</code></strong>
'&gt;
</pre>
<p>If you enter this <code class="literal"><font face="新宋体">SELECT</font></code> statement, then press <span><strong class="keycap">Enter</strong></span> and wait for the result, nothing happens. Instead of wondering why this query takes so long, notice the clue provided by the <code class="literal"><font face="新宋体">'&gt;</font></code> prompt. It tells you that <span><strong class="command">mysql</strong></span> expects to see the rest of an unterminated string. (Do you see the error in the statement? The string <code class="literal"><font face="新宋体">'Smith</font></code> is missing the second single quote mark.) </p>
<p>At this point, what do you do? The simplest thing is to cancel the command. However, you cannot just type <code class="literal"><font face="新宋体">\c</font></code> in this case, because <span><strong class="command">mysql</strong></span> interprets it as part of the string that it is collecting. Instead, enter the closing quote character (so <span><strong class="command">mysql</strong></span> knows you've finished the string), then type <code class="literal"><font face="新宋体">\c</font></code>: </p>
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>SELECT * FROM my_table WHERE name = 'Smith AND age &lt; 30;</code></strong>
'&gt; <strong class="userinput"><code>'\c</code></strong>
mysql&gt;
</pre>
<p>The prompt changes back to <code class="literal"><font face="新宋体">mysql&gt;</font></code>, indicating that <span><strong class="command">mysql</strong></span> is ready for a new command. </p>
<p>The <code class="literal"><font face="新宋体">`&gt;</font></code> prompt is similar to the <code class="literal"><font face="新宋体">'&gt;</font></code> and <code class="literal"><font face="新宋体">&quot;&gt;</font></code> prompts, but indicates that you have begun but not completed a backtick-quoted identifier. </p>
<p>It is important to know what the <code class="literal"><font face="新宋体">'&gt;</font></code>, <code class="literal"><font face="新宋体">&quot;&gt;</font></code>, and <code class="literal"><font face="新宋体">`&gt;</font></code> prompts signify, because if you mistakenly enter an unterminated string, any further lines you type appear to be ignored by <span><strong class="command">mysql</strong></span> &mdash; including a line containing <code class="literal"><font face="新宋体">QUIT</font></code>. This can be quite confusing, especially if you do not know that you need to supply the terminating quote before you can cancel the current command. </p>]]>
</content>
</entry>

<entry>
<title>3.5. Using mysql in Batch Mode</title>
<link rel="alternate" type="text/html" href="http://www.bokee.net/blogmodule/weblogcomment_viewEntry/1805348.html"/>
<issued>2008-05-20T13-10-36 CST</issued> 
<created>2008-05-20T13-10-36 CST</created>
<modified>2008-07-25T03-09-15Z</modified>
<id>tag:dolly00.blogchina.com,2005://1805348</id>
<author>
<name>dolly00</name>
<url>http://www.bokee.net/blogmodule/weblogcomment_index/dolly00.html</url>
</author>
<dc:subject>Default Cloumn</dc:subject>
<content type="text/html" mode="escaped" xml:lang="zh_CN" xml:base="http://www.bokee.net"> 
<![CDATA[<p>In the previous sections, you used <span><strong class="command">mysql</strong></span> interactively to enter queries and view the results. You can also run <span><strong class="command">mysql</strong></span> in batch mode. To do this, put the commands you want to run in a file, then tell <span><strong class="command">mysql</strong></span> to read its input from the file: </p>
<pre class="programlisting">shell&gt; <strong class="userinput"><code>mysql &lt; <em class="replaceable"><code>batch-file</code></em></code></strong>
</pre>
<p>If you are running <span><strong class="command">mysql</strong></span> under Windows and have some special characters in the file that cause problems, you can do this: </p>
<pre class="programlisting">C:\&gt; <strong class="userinput"><code>mysql -e &quot;source <em class="replaceable"><code>batch-file</code></em>&quot;</code></strong>
</pre>
<p>If you need to specify connection parameters on the command line, the command might look like this: </p>
<pre class="programlisting">shell&gt; <strong class="userinput"><code>mysql -h <em class="replaceable"><code>host</code></em> -u <em class="replaceable"><code>user</code></em> -p &lt; <em class="replaceable"><code>batch-file</code></em></code></strong>
Enter password: <strong class="userinput"><code>********</code></strong>
</pre>
<p>When you use <span><strong class="command">mysql</strong></span> this way, you are creating a script file, then executing the script. </p>
<p>If you want the script to continue even if some of the statements in it produce errors, you should use the <code class="option"><font face="新宋体">--force</font></code> command-line option. </p>
<p>Why use a script? Here are a few reasons: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>If you run a query repeatedly (say, every day or every week), making it a script allows you to avoid retyping it each time you execute it. </p>
    </li>
    <li>
    <p>You can generate new queries from existing ones that are similar by copying and editing script files. </p>
    </li>
    <li>
    <p>Batch mode can also be useful while you're developing a query, particularly for multiple-line commands or multiple-statement sequences of commands. If you make a mistake, you don't have to retype everything. Just edit your script to correct the error, then tell <span><strong class="command">mysql</strong></span> to execute it again. </p>
    </li>
    <li>
    <p>If you have a query that produces a lot of output, you can run the output through a pager rather than watching it scroll off the top of your screen: </p>
    <pre class="programlisting">shell&gt; <strong class="userinput"><code>mysql &lt; <em class="replaceable"><code>batch-file</code></em> | more</code></strong>
</pre>
    </li>
    <li>
    <p>You can catch the output in a file for further processing: </p>
    <pre class="programlisting">shell&gt; <strong class="userinput"><code>mysql &lt; <em class="replaceable"><code>batch-file</code></em> &gt; mysql.out</code></strong>
</pre>
    </li>
    <li>
    <p>You can distribute your script to other people so that they can also run the commands. </p>
    </li>
    <li>
    <p>Some situations do not allow for interactive use, for example, when you run a query from a <span><strong class="command">cron</strong></span> job. In this case, you must use batch mode. </p>
    </li>
</ul>
</div>
<p>The default output format is different (more concise) when you run <span><strong class="command">mysql</strong></span> in batch mode than when you use it interactively. For example, the output of <code class="literal"><font face="新宋体">SELECT DISTINCT species FROM pet</font></code> looks like this when <span><strong class="command">mysql</strong></span> is run interactively: </p>
<pre class="programlisting">+---------+
| species |
+---------+
| bird    |
| cat     |
| dog     |
| hamster |
| snake   |
+---------+
</pre>
<p>In batch mode, the output looks like this instead: </p>
<pre class="programlisting">species
bird
cat
dog
hamster
snake
</pre>
<p>If you want to get the interactive output format in batch mode, use <code class="literal"><font face="新宋体">mysql -t</font></code>. To echo to the output the commands that are executed, use <code class="literal"><font face="新宋体">mysql -vvv</font></code>. </p>
<a name="id422890"></a><a name="id422900"></a><a name="id422910"></a><a name="id422921"></a>
<p>You can also use scripts from the <span><strong class="command">mysql</strong></span> prompt by using the <code class="literal"><font face="新宋体">source</font></code> command or <code class="literal"><font face="新宋体">\.</font></code> command: </p>
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>source <em class="replaceable"><code>filename</code></em>;</code></strong>
mysql&gt; <strong class="userinput"><code>\. <em class="replaceable"><code>filename</code></em></code></strong>
</pre>
<p>See <a title="7.8.4. Executing SQL Statements from a Text File" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch07s08.html#batch-commands"><u><font color="#0000ff">Section&nbsp;7.8.4, &ldquo;Executing SQL Statements from a Text File&rdquo;</font></u></a>, for more information. </p>]]>
</content>
</entry>

<entry>
<title>5.12. Running Multiple MySQL Servers on the Same Machine</title>
<link rel="alternate" type="text/html" href="http://www.bokee.net/blogmodule/weblogcomment_viewEntry/1805312.html"/>
<issued>2008-05-20T13-07-13 CST</issued> 
<created>2008-05-20T13-07-13 CST</created>
<modified>2008-07-22T05-56-16Z</modified>
<id>tag:dolly00.blogchina.com,2005://1805312</id>
<author>
<name>dolly00</name>
<url>http://www.bokee.net/blogmodule/weblogcomment_index/dolly00.html</url>
</author>
<dc:subject>Default Cloumn</dc:subject>
<content type="text/html" mode="escaped" xml:lang="zh_CN" xml:base="http://www.bokee.net"> 
<![CDATA[In some cases, you might want to run multiple <span><strong class="command">mysqld</strong></span> servers on the same machine. You might want to test a new MySQL release while leaving your existing production setup undisturbed. Or you might want to give different users access to different <span><strong class="command">mysqld</strong></span> servers that they manage themselves. (For example, you might be an Internet Service Provider that wants to provide independent MySQL installations for different customers.)
<p>To run multiple servers on a single machine, each server must have unique values for several operating parameters. These can be set on the command line or in option files. See <a title="4.3. Specifying Program Options" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch04s03.html"><u><font color="#0066cc">Section&nbsp;4.3, &ldquo;Specifying Program Options&rdquo;</font></u></a>. </p>
<p>At least the following options must be different for each server: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p><code class="option"><font face="NSimsun">--port=<em class="replaceable"><code>port_num</code></em></font></code> </p>
    <p><code class="option"><font face="NSimsun">--port</font></code> controls the port number for TCP/IP connections. (Alternatively, if the host has multiple network addresses, you can use <code class="option"><font face="NSimsun">--bind-adress</font></code> to cause different servers to listen to different interfaces.) </p>
    </li>
    <li>
    <p><code class="option"><font face="NSimsun">--socket=<em class="replaceable"><code>path</code></em></font></code> </p>
    <p><code class="option"><font face="NSimsun">--socket</font></code> controls the Unix socket file path on Unix and the name of the named pipe on Windows. On Windows, it is necessary to specify distinct pipe names only for those servers that support named-pipe connections. </p>
    </li>
    <li>
    <p><code class="option"><font face="NSimsun">--shared-memory-base-name=<em class="replaceable"><code>name</code></em></font></code> </p>
    <p>This option currently is used only on Windows. It designates the shared-memory name used by a Windows server to allow clients to connect via shared memory. It is necessary to specify distinct shared-memory names only for those servers that support shared-memory connections. </p>
    </li>
    <li>
    <p><code class="option"><font face="NSimsun">--pid-file=<em class="replaceable"><code>file_name</code></em></font></code> </p>
    <p>This option is used only on Unix. It indicates the pathname of the file in which the server writes its process ID. </p>
    </li>
</ul>
</div>
<p>If you use the following log file options, they must be different for each server: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p><code class="option"><font face="NSimsun">--log=<em class="replaceable"><code>file_name</code></em></font></code> </p>
    </li>
    <li>
    <p><code class="option"><font face="NSimsun">--log-bin=<em class="replaceable"><code>file_name</code></em></font></code> </p>
    </li>
    <li>
    <p><code class="option"><font face="NSimsun">--log-update=<em class="replaceable"><code>file_name</code></em></font></code> </p>
    </li>
    <li>
    <p><code class="option"><font face="NSimsun">--log-error=<em class="replaceable"><code>file_name</code></em></font></code> </p>
    </li>
    <li>
    <p><code class="option"><font face="NSimsun">--bdb-logdir=<em class="replaceable"><code>file_name</code></em></font></code> </p>
    </li>
</ul>
</div>
<p><a title="5.11.5. Server Log Maintenance" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch05s11.html#log-file-maintenance"><u><font color="#0066cc">Section&nbsp;5.11.5, &ldquo;Server Log Maintenance&rdquo;</font></u></a>, discusses the log file options further. </p>
<p>For better performance, you can specify the following options differently for each server, to spread the load between several physical disks: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p><code class="option"><font face="NSimsun">--tmpdir=<em class="replaceable"><code>path</code></em></font></code> </p>
    </li>
    <li>
    <p><code class="option"><font face="NSimsun">--bdb-tmpdir=<em class="replaceable"><code>path</code></em></font></code> </p>
    </li>
</ul>
</div>
<p>Having different temporary directories is also recommended to make it easier to determine which MySQL server created any given temporary file. </p>
<p>With very limited exceptions, each server should use a different data directory, which is specified using the <code class="option"><font face="NSimsun">--datadir=<em class="replaceable"><code>path</code></em></font></code> option. </p>
<div class="warning" style="MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<h3 class="title">Warning</h3>
<p>Normally, you should never have two servers that update data in the same databases. This may lead to unpleasant surprises if your operating system does not support fault-free system locking. If (despite this warning) you run multiple servers using the same data directory and they have logging enabled, you must use the appropriate options to specify log filenames that are unique to each server. Otherwise, the servers try to log to the same files. Please note that this kind of setup only works with <code class="literal"><font face="NSimsun">MyISAM</font></code> and <code class="literal"><font face="NSimsun">MERGE</font></code> tables, and not with any of the other storage engines. </p>
</div>
<p>The warning against sharing a data directory among servers also applies in an NFS environment. Allowing multiple MySQL servers to access a common data directory over NFS is a <span class="emphasis"><em>very bad idea</em></span>. </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>The primary problem is that NFS is the speed bottleneck. It is not meant for such use. </p>
    </li>
    <li>
    <p>Another risk with NFS is that you must devise a way to ensure that two or more servers do not interfere with each other. Usually NFS file locking is handled by the <code class="literal"><font face="NSimsun">lockd</font></code> daemon, but at the moment there is no platform that performs locking 100% reliably in every situation. </p>
    </li>
</ul>
</div>
<p>Make it easy for yourself: Forget about sharing a data directory among servers over NFS. A better solution is to have one computer that contains several CPUs and use an operating system that handles threads efficiently. </p>
<p>If you have multiple MySQL installations in different locations, you can specify the base installation directory for each server with the <code class="option"><font face="NSimsun">--basedir=<em class="replaceable"><code>path</code></em></font></code> option to cause each server to use a different data directory, log files, and PID file. (The defaults for all these values are determined relative to the base directory). In that case, the only other options you need to specify are the <code class="option"><font face="NSimsun">--socket</font></code> and <code class="option"><font face="NSimsun">--port</font></code> options. For example, suppose that you install different versions of MySQL using <code class="filename"><font face="NSimsun">tar</font></code> file binary distributions. These install in different locations, so you can start the server for each installation using the command <span><strong class="command">bin/mysqld_safe</strong></span> under its corresponding base directory. <span><strong class="command">mysqld_safe</strong></span> determines the proper <code class="option"><font face="NSimsun">--basedir</font></code> option to pass to <span><strong class="command">mysqld</strong></span>, and you need specify only the <code class="option"><font face="NSimsun">--socket</font></code> and <code class="option"><font face="NSimsun">--port</font></code> options to <span><strong class="command">mysqld_safe</strong></span>. </p>
<p>As discussed in the following sections, it is possible to start additional servers by setting environment variables or by specifying appropriate command-line options. However, if you need to run multiple servers on a more permanent basis, it is more convenient to use option files to specify for each server those option values that must be unique to it. The <code class="option"><font face="NSimsun">--defaults-file</font></code> option is useful for this purpose. </p>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="multiple-windows-servers"></a>5.12.1.&nbsp;Running Multiple Servers on Windows</h3>
</div>
</div>
</div>
<p>You can run multiple servers on Windows by starting them manually from the command line, each with appropriate operating parameters. You also have the option of installing several servers as Windows services and running them that way. General instructions for running MySQL servers from the command line or as services are given in <a title="2.4.8. Installing MySQL on Windows" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch02s04.html#windows-installation"><u><font color="#0066cc">Section&nbsp;2.4.8, &ldquo;Installing MySQL on Windows&rdquo;</font></u></a>. This section describes how to make sure that you start each server with different values for those startup options that must be unique per server, such as the data directory. These options are described in <a title="5.12. Running Multiple MySQL Servers on the Same Machine" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch05s12.html"><u><font color="#800080">Section&nbsp;5.12, &ldquo;Running Multiple MySQL Servers on the Same Machine&rdquo;</font></u></a>. </p>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="multiple-windows-command-line-servers"></a>5.12.1.1.&nbsp;Starting Multiple Windows Servers at the Command Line</h4>
</div>
</div>
</div>
<p>To start multiple servers manually from the command line, you can specify the appropriate options on the command line or in an option file. It is more convenient to place the options in an option file, but it is necessary to make sure that each server gets its own set of options. To do this, create an option file for each server and tell the server the filename with a <code class="option"><font face="NSimsun">--defaults-file</font></code> option when you run it. </p>
<p>Suppose that you want to run <span><strong class="command">mysqld</strong></span> on port 3307 with a data directory of <code class="filename"><font face="NSimsun">C:\mydata1</font></code>, and <span><strong class="command">mysqld-debug</strong></span> on port 3308 with a data directory of <code class="filename"><font face="NSimsun">C:\mydata2</font></code>. (To do this, make sure that before you start the servers, each data directory exists and has its own copy of the <code class="literal"><font face="NSimsun">mysql</font></code> database that contains the grant tables.) Then create two option files. For example, create one file named <code class="filename"><font face="NSimsun">C:\my-opts1.cnf</font></code> that looks like this: </p>
<pre class="programlisting">[mysqld]
datadir = C:/mydata1
port = 3307
</pre>
<p>Create a second file named <code class="filename"><font face="NSimsun">C:\my-opts2.cnf</font></code> that looks like this: </p>
<pre class="programlisting">[mysqld]
datadir = C:/mydata2
port = 3308
</pre>
<p>Then start each server with its own option file: </p>
<pre class="programlisting">C:\&gt; <strong class="userinput"><code>C:\mysql\bin\mysqld --defaults-file=C:\my-opts1.cnf</code></strong>
C:\&gt; <strong class="userinput"><code>C:\mysql\bin\mysqld-debug --defaults-file=C:\my-opts2.cnf</code></strong>
</pre>
<p>Each server starts in the foreground (no new prompt appears until the server exits later), so you will need to issue those two commands in separate console windows. </p>
<p>To shut down the servers, you must connect to each using the appropriate port number: </p>
<pre class="programlisting">C:\&gt; <strong class="userinput"><code>C:\mysql\bin\mysqladmin --port=3307 shutdown</code></strong>
C:\&gt; <strong class="userinput"><code>C:\mysql\bin\mysqladmin --port=3308 shutdown</code></strong>
</pre>
<p>Servers configured as just described allow clients to connect over TCP/IP. If your version of Windows supports named pipes and you also want to allow named-pipe connections, use the <span><strong class="command">mysqld-nt</strong></span> or <span><strong class="command">mysqld-debug</strong></span> server and specify options that enable the named pipe and specify its name. Each server that supports named-pipe connections must use a unique pipe name. For example, the <code class="filename"><font face="NSimsun">C:\my-opts1.cnf</font></code> file might be written like this: </p>
<pre class="programlisting">[mysqld]
datadir = C:/mydata1
port = 3307
enable-named-pipe
socket = mypipe1
</pre>
<p>Then start the server this way: </p>
<pre class="programlisting">C:\&gt; <strong class="userinput"><code>C:\mysql\bin\mysqld-nt --defaults-file=C:\my-opts1.cnf</code></strong>
</pre>
<p>Modify <code class="filename"><font face="NSimsun">C:\my-opts2.cnf</font></code> similarly for use by the second server. </p>
<p>A similar procedure applies for servers that you want to support shared-memory connections. Enable such connections with the <code class="option"><font face="NSimsun">--shared-memory</font></code> option and specify a unique shared-memory name for each server with the <code class="option"><font face="NSimsun">--shared-memory-base-name</font></code> option. </p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="multiple-windows-services"></a>5.12.1.2.&nbsp;Starting Multiple Windows Servers as Services</h4>
</div>
</div>
</div>
<p>A MySQL server can run as a Windows service. The procedures for installing, controlling, and removing a single MySQL service are described in <a title="2.4.8.11. Starting MySQL as a Windows Service" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch02s04.html#windows-start-service"><u><font color="#0066cc">Section&nbsp;2.4.8.11, &ldquo;Starting MySQL as a Windows Service&rdquo;</font></u></a>. </p>
<p>You can also install multiple MySQL servers as services. In this case, you must make sure that each server uses a different service name in addition to all the other parameters that must be unique for each server. </p>
<p>For the following instructions, assume that you want to run the <span><strong class="command">mysqld-nt</strong></span> server from two different versions of MySQL that are installed at <code class="filename"><font face="NSimsun">C:\mysql-4.1.8</font></code> and <code class="filename"><font face="NSimsun">C:\mysql-5.0.50</font></code>, respectively. (This might be the case if you're running 4.1.8 as your production server, but also want to conduct tests using 5.0.50.) </p>
<p>The following principles apply when installing a MySQL service with the <code class="option"><font face="NSimsun">--install</font></code> or <code class="option"><font face="NSimsun">--install-manual</font></code> option: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>If you specify no service name, the server uses the default service name of <code class="literal"><font face="NSimsun">MySQL</font></code> and the server reads options from the <code class="literal"><font face="NSimsun">[mysqld]</font></code> group in the standard option files. </p>
    </li>
    <li>
    <p>If you specify a service name after the <code class="option"><font face="NSimsun">--install</font></code> option, the server ignores the <code class="literal"><font face="NSimsun">[mysqld]</font></code> option group and instead reads options from the group that has the same name as the service. The server reads options from the standard option files. </p>
    </li>
    <li>
    <p>If you specify a <code class="option"><font face="NSimsun">--defaults-file</font></code> option after the service name, the server ignores the standard option files and reads options only from the <code class="literal"><font face="NSimsun">[mysqld]</font></code> group of the named file. </p>
    </li>
</ul>
</div>
<div class="note" style="MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<h3 class="title">Note</h3>
<p>Before MySQL 4.0.17, only a server installed using the default service name (<code class="literal"><font face="NSimsun">MySQL</font></code>) or one installed explicitly with a service name of <span><strong class="command">mysqld</strong></span> will read the <code class="literal"><font face="NSimsun">[mysqld]</font></code> group in the standard option files. As of 4.0.17, all servers read the <code class="literal"><font face="NSimsun">[mysqld]</font></code> group if they read the standard option files, even if they are installed using another service name. This allows you to use the <code class="literal"><font face="NSimsun">[mysqld]</font></code> group for options that should be used by all MySQL services, and an option group named after each service for use by the server installed with that service name. </p>
</div>
<p>Based on the preceding information, you have several ways to set up multiple services. The following instructions describe some examples. Before trying any of them, be sure that you shut down and remove any existing MySQL services first. </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p><span class="bold"><strong>Approach 1:</strong></span> Specify the options for all services in one of the standard option files. To do this, use a different service name for each server. Suppose that you want to run the 4.1.8 <span><strong class="command">mysqld-nt</strong></span> using the service name of <code class="literal"><font face="NSimsun">mysqld1</font></code> and the 5.0.50 <span><strong class="command">mysqld-nt</strong></span> using the service name <code class="literal"><font face="NSimsun">mysqld2</font></code>. In this case, you can use the <code class="literal"><font face="NSimsun">[mysqld1]</font></code> group for 4.1.8 and the <code class="literal"><font face="NSimsun">[mysqld2]</font></code> group for 5.0.50. For example, you can set up <code class="filename"><font face="NSimsun">C:\my.cnf</font></code> like this: </p>
    <pre class="programlisting"># options for mysqld1 service
[mysqld1]
basedir = C:/mysql-4.1.8
port = 3307
enable-named-pipe
socket = mypipe1

# options for mysqld2 service
[mysqld2]
basedir = C:/mysql-5.0.50
port = 3308
enable-named-pipe
socket = mypipe2
</pre>
    <p>Install the services as follows, using the full server pathnames to ensure that Windows registers the correct executable program for each service: </p>
    <pre class="programlisting">C:\&gt; <strong class="userinput"><code>C:\mysql-4.1.8\bin\mysqld-nt --install mysqld1</code></strong>
C:\&gt; <strong class="userinput"><code>C:\mysql-5.0.50\bin\mysqld-nt --install mysqld2</code></strong>
</pre>
    <p>To start the services, use the services manager, or use <span><strong class="command">NET START</strong></span> with the appropriate service names: </p>
    <pre class="programlisting">C:\&gt; <strong class="userinput"><code>NET START mysqld1</code></strong>
C:\&gt; <strong class="userinput"><code>NET START mysqld2</code></strong>
</pre>
    <p>To stop the services, use the services manager, or use <span><strong class="command">NET STOP</strong></span> with the appropriate service names: </p>
    <pre class="programlisting">C:\&gt; <strong class="userinput"><code>NET STOP mysqld1</code></strong>
C:\&gt; <strong class="userinput"><code>NET STOP mysqld2</code></strong>
</pre>
    </li>
    <li>
    <p><span class="bold"><strong>Approach 2:</strong></span> Specify options for each server in separate files and use <code class="option"><font face="NSimsun">--defaults-file</font></code> when you install the services to tell each server what file to use. In this case, each file should list options using a <code class="literal"><font face="NSimsun">[mysqld]</font></code> group. </p>
    <p>With this approach, to specify options for the 4.1.8 <span><strong class="command">mysqld-nt</strong></span>, create a file <code class="filename"><font face="NSimsun">C:\my-opts1.cnf</font></code> that looks like this: </p>
    <pre class="programlisting">[mysqld]
basedir = C:/mysql-4.1.8
port = 3307
enable-named-pipe
socket = mypipe1
</pre>
    <p>For the 5.0.50 <span><strong class="command">mysqld-nt</strong></span>, create a file <code class="filename"><font face="NSimsun">C:\my-opts2.cnf</font></code> that looks like this: </p>
    <pre class="programlisting">[mysqld]
basedir = C:/mysql-5.0.50
port = 3308
enable-named-pipe
socket = mypipe2
</pre>
    <p>Install the services as follows (enter each command on a single line): </p>
    <pre class="programlisting">C:\&gt; <strong class="userinput"><code>C:\mysql-4.1.8\bin\mysqld-nt --install mysqld1</code></strong>
           <strong class="userinput"><code>--defaults-file=C:\my-opts1.cnf</code></strong>
C:\&gt; <strong class="userinput"><code>C:\mysql-5.0.50\bin\mysqld-nt --install mysqld2</code></strong>
           <strong class="userinput"><code>--defaults-file=C:\my-opts2.cnf</code></strong>
</pre>
    <p>To use a <code class="option"><font face="NSimsun">--defaults-file</font></code> option when you install a MySQL server as a service, you must precede the option with the service name. </p>
    <p>After installing the services, start and stop them the same way as in the preceding example. </p>
    </li>
</ul>
</div>
<p>To remove multiple services, use <span><strong class="command">mysqld --remove</strong></span> for each one, specifying a service name following the <code class="option"><font face="NSimsun">--remove</font></code> option. If the service name is the default (<code class="literal"><font face="NSimsun">MySQL</font></code>), you can omit it. </p>
</div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="multiple-unix-servers"></a>5.12.2.&nbsp;Running Multiple Servers on Unix</h3>
</div>
</div>
</div>
<p>The easiest way is to run multiple servers on Unix is to compile them with different TCP/IP ports and Unix socket files so that each one is listening on different network interfaces. Compiling in different base directories for each installation also results automatically in a separate, compiled-in data directory, log file, and PID file location for each server. </p>
<p>Assume that an existing 4.1.8 server is configured for the default TCP/IP port number (3306) and Unix socket file (<code class="filename"><font face="NSimsun">/tmp/mysql.sock</font></code>). To configure a new 5.0.50 server to have different operating parameters, use a <span><strong class="command">configure</strong></span> command something like this: </p>
<pre class="programlisting">shell&gt; <strong class="userinput"><code>./configure --with-tcp-port=<em class="replaceable"><code>port_number</code></em> \</code></strong>
             <strong class="userinput"><code>--with-unix-socket-path=<em class="replaceable"><code>file_name</code></em> \</code></strong>
             <strong class="userinput"><code>--prefix=/usr/local/mysql-5.0.50</code></strong>
</pre>
<p>Here, <em class="replaceable"><code><font face="NSimsun">port_number</font></code></em> and <em class="replaceable"><code><font face="NSimsun">file_name</font></code></em> must be different from the default TCP/IP port number and Unix socket file pathname, and the <code class="option"><font face="NSimsun">--prefix</font></code> value should specify an installation directory different from the one under which the existing MySQL installation is located. </p>
<p>If you have a MySQL server listening on a given port number, you can use the following command to find out what operating parameters it is using for several important configurable variables, including the base directory and Unix socket filename: </p>
<pre class="programlisting">shell&gt; <strong class="userinput"><code>mysqladmin --host=<em class="replaceable"><code>host_name</code></em> --port=<em class="replaceable"><code>port_number</code></em> variables</code></strong>
</pre>
<p>With the information displayed by that command, you can tell what option values <span class="emphasis"><em>not</em></span> to use when configuring an additional server. </p>
<p>Note that if you specify <code class="literal"><font face="NSimsun">localhost</font></code> as a hostname, <span><strong class="command">mysqladmin</strong></span> defaults to using a Unix socket file connection rather than TCP/IP. From MySQL 4.1 onward, you can explicitly specify the connection protocol to use by using the <code class="option"><font face="NSimsun">--protocol={TCP|SOCKET|PIPE|MEMORY}</font></code> option. </p>
<p>You don't have to compile a new MySQL server just to start with a different Unix socket file and TCP/IP port number. It is also possible to use the same server binary and start each invocation of it with different parameter values at runtime. One way to do so is by using command-line options: </p>
<pre class="programlisting">shell&gt; <strong class="userinput"><code>mysqld_safe --socket=<em class="replaceable"><code>file_name</code></em> --port=<em class="replaceable"><code>port_number</code></em></code></strong>
</pre>
<p>To start a second server, provide different <code class="option"><font face="NSimsun">--socket</font></code> and <code class="option"><font face="NSimsun">--port</font></code> option values, and pass a <code class="option"><font face="NSimsun">--datadir=<em class="replaceable"><code>path</code></em></font></code> option to <span><strong class="command">mysqld_safe</strong></span> so that the server uses a different data directory. </p>
<p>Another way to achieve a similar effect is to use environment variables to set the Unix socket filename and TCP/IP port number: </p>
<a name="id541306"></a><a name="id541317"></a><a name="id541327"></a><a name="id541341"></a>
<pre class="programlisting">shell&gt; <strong class="userinput"><code>MYSQL_UNIX_PORT=/tmp/mysqld-new.sock</code></strong>
shell&gt; <strong class="userinput"><code>MYSQL_TCP_PORT=3307</code></strong>
shell&gt; <strong class="userinput"><code>export MYSQL_UNIX_PORT MYSQL_TCP_PORT</code></strong>
shell&gt; <strong class="userinput"><code>mysql_install_db --user=mysql</code></strong>
shell&gt; <strong class="userinput"><code>mysqld_safe --datadir=/path/to/datadir &amp;</code></strong>
</pre>
<p>This is a quick way of starting a second server to use for testing. The nice thing about this method is that the environment variable settings apply to any client programs that you invoke from the same shell. Thus, connections for those clients are automatically directed to the second server. </p>
<p><a title="2.4.20. Environment Variables" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch02s04.html#environment-variables"><u><font color="#0066cc">Section&nbsp;2.4.20, &ldquo;Environment Variables&rdquo;</font></u></a>, includes a list of other environment variables you can use to affect <span><strong class="command">mysqld</strong></span>. </p>
<p>For automatic server execution, the startup script that is executed at boot time should execute the following command once for each server with an appropriate option file path for each command: </p>
<pre class="programlisting">shell&gt; <strong class="userinput"><code>mysqld_safe --defaults-file=<em class="replaceable"><code>file_name</code></em></code></strong>
</pre>
<p>Each option file should contain option values specific to a given server. </p>
<p>On Unix, the <span><strong class="command">mysqld_multi</strong></span> script is another way to start multiple servers. See <a title="5.3.3. mysqld_multi — Manage Multiple MySQL Servers" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch05s03.html#mysqld-multi"><u><font color="#0066cc">Section&nbsp;5.3.3, &ldquo;<span><strong class="command">mysqld_multi</strong></span> &mdash; Manage Multiple MySQL Servers&rdquo;</font></u></a>. </p>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="multiple-server-clients"></a>5.12.3.&nbsp;Using Client Programs in a Multiple-Server Environment</h3>
</div>
</div>
</div>
<p>To connect with a client program to a MySQL server that is listening to different network interfaces from those compiled into your client, you can use one of the following methods: </p>
<div class="itemizedlist">
<ul type="disc">
    <li>
    <p>Start the client with <code class="option"><font face="NSimsun">--host=<em class="replaceable"><code>host_name</code></em> --port=<em class="replaceable"><code>port_number</code></em></font></code> to connect via TCP/IP to a remote server, with <code class="option"><font face="NSimsun">--host=127.0.0.1 --port=<em class="replaceable"><code>port_number</code></em></font></code> to connect via TCP/IP to a local server, or with <code class="option"><font face="NSimsun">--host=localhost --socket=<em class="replaceable"><code>file_name</code></em></font></code> to connect to a local server via a Unix socket file or a Windows named pipe. </p>
    </li>
    <li>
    <p>As of MySQL 4.1, start the client with <code class="option"><font face="NSimsun">--protocol=tcp</font></code> to connect via TCP/IP, <code class="option"><font face="NSimsun">--protocol=socket</font></code> to connect via a Unix socket file, <code class="option"><font face="NSimsun">--protocol=pipe</font></code> to connect via a named pipe, or <code class="option"><font face="NSimsun">--protocol=memory</font></code> to connect via shared memory. For TCP/IP connections, you may also need to specify <code class="option"><font face="NSimsun">--host</font></code> and <code class="option"><font face="NSimsun">--port</font></code> options. For the other types of connections, you may need to specify a <code class="option"><font face="NSimsun">--socket</font></code> option to specify a Unix socket file or Windows named-pipe name, or a <code class="option"><font face="NSimsun">--shared-memory-base-name</font></code> option to specify the shared-memory name. Shared-memory connections are supported only on Windows. </p>
    </li>
    <li>
    <p><a name="id541587"></a><a name="id541598"></a><a name="id541608"></a><a name="id541622"></a>On Unix, set the <code class="literal"><font face="NSimsun">MYSQL_UNIX_PORT</font></code> and <code class="literal"><font face="NSimsun">MYSQL_TCP_PORT</font></code> environment variables to point to the Unix socket file and TCP/IP port number before you start your clients. If you normally use a specific socket file or port number, you can place commands to set these environment variables in your <code class="filename"><font face="NSimsun">.login</font></code> file so that they apply each time you log in. See <a title="2.4.20. Environment Variables" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch02s04.html#environment-variables"><u><font color="#0066cc">Section&nbsp;2.4.20, &ldquo;Environment Variables&rdquo;</font></u></a>. </p>
    </li>
    <li>
    <p><a name="id541676"></a><a name="id541686"></a>Specify the default Unix socket file and TCP/IP port number in the <code class="literal"><font face="NSimsun">[client]</font></code> group of an option file. For example, you can use <code class="filename"><font face="NSimsun">C:\my.cnf</font></code> on Windows, or the <code class="filename"><font face="NSimsun">.my.cnf</font></code> file in your home directory on Unix. See <a title="4.3.2. Using Option Files" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch04s03.html#option-files"><u><font color="#0066cc">Section&nbsp;4.3.2, &ldquo;Using Option Files&rdquo;</font></u></a>. </p>
    </li>
    <li>
    <p>In a C program, you can specify the socket file or port number arguments in the <a title="23.2.3.52. mysql_real_connect()" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch23s02.html#mysql-real-connect"><code class="function"><u><font face="NSimsun" color="#0066cc">mysql_real_connect()</font></u></code></a> call. You can also have the program read option files by calling <a title="23.2.3.49. mysql_options()" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch23s02.html#mysql-options"><code class="function"><u><font face="NSimsun" color="#0066cc">mysql_options()</font></u></code></a>. See <a title="23.2.3. C API Function Descriptions" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch23s02.html#c-api-functions"><u><font color="#0066cc">Section&nbsp;23.2.3, &ldquo;C API Function Descriptions&rdquo;</font></u></a>. </p>
    </li>
    <li>
    <p>If you are using the Perl <code class="literal"><font face="NSimsun">DBD::mysql</font></code> module, you can read options from MySQL option files. For example: </p>
    <pre class="programlisting">$dsn = &quot;DBI:mysql:test;mysql_read_default_group=client;&quot;
        . &quot;mysql_read_default_file=/usr/local/mysql/data/my.cnf&quot;;
$dbh = DBI-&gt;connect($dsn, $user, $password);
</pre>
    <p>See <a title="23.4. MySQL Perl API" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch23s04.html"><u><font color="#0066cc">Section&nbsp;23.4, &ldquo;MySQL Perl API&rdquo;</font></u></a>. </p>
    <p>Other programming interfaces may provide similar capabilities for reading option files. </p>
    </li>
</ul>
</div>
<p class="mnmas"><strong>MySQL Enterprise.&nbsp;</strong> Subscribers to MySQL Enterprise will find additional information on running multiple MySQL servers on one machine in the MySQL Enterprise Knowledge Base article found at <a href="https://kb.mysql.com/view.php?id=4926" target="_top"><u><font color="#0066cc">https://kb.mysql.com/view.php?id=4926</font></u></a>. </p>
</div>]]>
</content>
</entry>

<entry>
<title>5.10. MySQL Localization and International Usage</title>
<link rel="alternate" type="text/html" href="http://www.bokee.net/blogmodule/weblogcomment_viewEntry/1805302.html"/>
<issued>2008-05-20T13-05-01 CST</issued> 
<created>2008-05-20T13-05-01 CST</created>
<modified>2008-07-22T05-56-16Z</modified>
<id>tag:dolly00.blogchina.com,2005://1805302</id>
<author>
<name>dolly00</name>
<url>http://www.bokee.net/blogmodule/weblogcomment_index/dolly00.html</url>
</author>
<dc:subject>Default Cloumn</dc:subject>
<content type="text/html" mode="escaped" xml:lang="zh_CN" xml:base="http://www.bokee.net"> 
<![CDATA[<p>This section describes how to configure the server to use different character sets. It also discusses how to set the server's time zone and enable per-connection time zone support. </p>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="character-sets"></a>5.10.1.&nbsp;The Character Set Used for Data and Sorting</h3>
</div>
</div>
</div>
By default, MySQL uses the <code class="literal"><font face="NSimsun">latin1</font></code> (cp1252 West European) character set and the <code class="literal"><font face="NSimsun">latin1_swedish_ci</font></code> collation that sorts according to Swedish/Finnish rules. These defaults are suitable for the United States and most of Western Europe.
<p>All MySQL binary distributions are compiled with <code class="option"><font face="NSimsun">--with-extra-charsets=complex</font></code>. This adds code to all standard programs that enables them to handle <code class="literal"><font face="NSimsun">latin1</font></code> and all multi-byte character sets within the binary. Other character sets are loaded from a character-set definition file when needed. </p>
<p>The character set determines what characters are allowed in identifiers. The collation determines how strings are sorted by the <code class="literal"><font face="NSimsun">ORDER BY</font></code> and <code class="literal"><font face="NSimsun">GROUP BY</font></code> clauses of the <code class="literal"><font face="NSimsun">SELECT</font></code> statement. </p>
<p>You can change the default server character set and collation with the <code class="option"><font face="NSimsun">--character-set-server</font></code> and <code class="option"><font face="NSimsun">--collation-server</font></code> options when you start the server. The collation must be a legal collation for the default character set. (Use the <code class="literal"><font face="NSimsun">SHOW COLLATION</font></code> statement to determine which collations are available for each character set.) See <a title="5.2.2. Command Options" href="mk:@MSITStore:E:\soft\MyWEB\MySQL5.0\Doc\refman-5.0-en.chm::/ch05s02.html#server-options"><u><font color="#0066cc">Section&nbsp;5.2.2, &ldquo;Command Options&rdquo;</font></u></a>. </p>
<p>The character sets available depend on the <code class="option"><font face="