ÿØÿà JFIF    ÿÛ „ !.%+&8&+/1555$;@;4?.451 4,$,44444444444414444444444444444444444444444444444444ÿÀ  á á" ÿÄ     ÿÄ ?    !1AQaq"2‘¡±ÁðBRbrÑá#‚’¢²3S CñÿÄ   ÿÄ !    !1QAa‘2ÿÚ   ? 5˜Z¯V¦cø)›t/? z¨±>Õ5€¶‹Á¤·¼z¼Ü¬+ñ®v¤¨_ˆR­BFn©—˜ý®ç̝P8gýt·ÉSTŦˆìät?þé¼íìN/Þa)ì–í6ô… Ï¿øÃj´¿KÇü]ÿ ªô¹-eKànëÕHTx}ýSÜ›ÿ ”7Ø×&µ<¦  ¥ÑO¶[Ù¯ä¨ÞÃÿ PZ-¬;#õ|•oaÿ ©CìÞz3˜öː/¤­ñTûIØ}š^ mÓ%ªxˆ¥ÉŸu=Z+ISe¿45™¼u;ú&WØ÷€æßQ™®{|íx*TC“#ZŠìZ§²‹ 6pv…³¿¡äª*áZÐ%ÒOáˆo"x«OHk w±æ+¬V(kMúŸ5Vö«$ ÁrÏbàb57/luR ¸ÑÛj Òµì`Мq­û žICÀÊ•©4€Âcà¨Ï€O´<èÐ:›ù(Ë^L8þ‘ÍÌ#¸Ð_Ì©ÙK(Öz 4¬û+¸;ü’V’84‘¬ÃŽ:[â‡ÔÌáõp¢~§ªlæ£ö{®G>J¼"°‡7¯ÆÉèßû ‹É‹§ÁòÃýâßî ^ƾÙõ‹×óH#«LP½ïX=xÑÍ$|W?•~• îëÔ©ª‹ {ÝT…Kÿ ”hûâá)J*ö˜–ÔU;iÇ€/ ÆþjóZ\ýwØ=Ìm ºèËL9 ýèÆð/¨’¥öo=nË.%Îì ŽÕ¯È|{Oj²ƒE6e/ßdÄõ²Ìâ1O®ò×TsəԸhOMýíMˆ¿¼H˜l²,7Â¥#MF/Úf°Ö½± ¸–dr‹NýÊ íjqx{œÉ ä-È ¦ øÄër¨q°ð †nцýÑÄÆ’mä…n<0È™;ÁÝá¯ÁZƒ7FÀmì­ É&9ˆîéi¶ùN§Y• ÃZãAâ?•‡©‰ , ó¾IŸŠc1 4â&y­&pŠ­6;M À 0¹qç»p.á …ŸÅáK@%6·y6ƒ‰3?”úºŽ‰éX5ªPT §µ!=Mž«Ú½‹ÅgÂSâÉaþÓoö–¯ÁÔìR>5éÿ üs¶ÆUcÌ kÇR ]ÿ ù¬¼«VŽ;Â|‡~¢¦”ÏŰæ {L™Õ°Óv¹ò¸írޡעCÃ!íVÕ {¶»sŒNPg/ "uÕbkm²“$ďå¿é¹§°½æz¯6 †s¿!s–wÚÝ“™Œ °.ûj>·+™Òa…©Œ&rÝÎtÛë긪Ît’LAVp%c Úý[ÄzJ¾ÇàXXç@˜ó<êL]·T˜¾¥1Ó©V‡g´æ½¦Ý@¹óø!_@´ÞâSÁ —S3™•& ]@JHÚý©ZŽ €×æÔr»Áf!‡yÞ4Mv*èÓã_{‘åóUuљØ«Oïé*®EvÑ Œ÷‡U \"㪒ÍK+À 4“M¡ï:0¥5í!'<@î´”>Ç»&Z–ïCCV˜Ì5Šo&îhè.žû |ÓK©h$s6KìŒëã)¹hI¦GïOåóI;ììü#É$Š0…Ææ¥TØ.5­¾gn´ “ÂÖ\:hœ89G)J@„}œ:’Ò{/Š"¦_Æ×7Æ3VÇŠÊa]ÚŒÙ€Ä–=®uÁßâACZƒ§§£ Qnâ:«,×{tyø¬iÛcœÜÄ€H½ÄÍCk´÷šß .W'b¤Íåh]÷€=,Žv×cÚEÚHXJX¶îo¨FÒtèöŸ>ªª6[J®Fµ£sGÁeqõfe\íjÒÐïÄÐGˆe1Ø‹.Ø”‘Ëuø Y­ˆÜ ŽG|zùªüMpDnQWÄ”%JŠ™)â*p@Örš«ÕT2Ð%ˆG#ª„ ·¤!°ŸOTÂT¸aÚ%4&h™LµšØüÐ.F¿²ÐÞ_Ç‚¾ÅÃaÜ÷09Æ q€öy˜v‡85õN÷]¬äѼóS{°_MެúÔ#°Ç¸0åÞè2ëôPcvÆw9®ií1Ä8F™˜à‰´+‰Ik1òÝ7“Ñ×ÒsÝ\x‚h`ÞÑ`ó"|µEcý£n˜h`}GÞ !±ù²Ápü²ß6 0ïi󜵩SÈÇ7˜-ÕURO˜¦´f$ªž-Í6(œ}<„ éc øs]ŽŽ„*—¾ ìdŽ„)méª\¿êÎIg¾ØÞ~I#C/¼¼´EÁÈŽi8“©õådô·>euä ƒ'Ê×लR1ÉJE1ÐAát`t;ÇР%Ý<‡¥„ÍÆ`×Oyó)õiI€ñQaŸ4Ûù\áàaÃÔ¹HÃu¹*k€¦<„e S‡&õÏ B!ŽhüÞ`yj}mªf×\¿ Ç~æ­9‡û\՞Ǖg²1Žû5V7 !àöšm° c`ܬøÇìµÒ'P"?…´Ö,"§^•õލsÔ)6˜sæéÍR¼ ò|Sl”‹7 nPW Gòú÷½§O¯‡„l¡kSÞŒr½PÊ@æ¢pŽ-mÿ #Ÿ˜Àº¶Áä¦;ïÔæ$1££`“Õ>„—·ž)ßð³ñ#Ï Ô$¶œ‰ÊE‹À;÷º ¯«P:Ñ”8–IÊtpÞ3ª“>ê“þës4ò2OÏÕ­±zô†Õ§‰.÷ä¸;¿˜“'œ›žª}«Œ{ª±Ì 9ÔóÞÕ‡0 $íWV3Üì¬ —@kÝ4@¿r¼±½¬™›?øØæ´'Áé®CË3-g$˜ö‡×auÚi´Žp/êÛ æF›Ú2v‹ã¿¿,nB1̨ƃqÞa5͝@&Æû“él÷ \C²½UÍc ¯k×¢U ÖéQå™—-r wô ÞÏ<Ò=&=ÿ Ôê Òêˈt,i—;LîÜ á¸*ÚÃ1$êL•LÍ <É)ýÐà’ ;F™{ƒ™˜€&'}‚ãÄK`¡ÞT@I;®žZóè‚s’7®°›+§O­Åq©é»²9<Ô J ¼9O’HL»Ùïì¸rk¼Ž_ý‘TŸu[²ßÚŒ·ü÷B%¯E ŸÔX5êO´ Ç•€’I0 ÉJX` ñ¹õ%;µŸD‘«´€àwÒ™U ûئžÖö\×®×´8 ½‡ºÐÆÓ§?Àkmœ=;d5*@-ì0F Rªýš[Ü6âö̃ڸr*KA9· u*µæ£?U¸Âêí†8@¦X4 e-ò„0s{ HâUpU?¼mñRa°®a%Ð'tÉ×’\¾ÊÉ]t›h>·(Ë@R¼¡Ãt h}’O÷au<+nT…Ö…MӐ??Óe95 q>í/;&JSû °¯ÊéÞ øƒ*Ã2½Ài&:nôUl=¾¿5eˆ3”ñc|Ú2V”>„»&eE;«ÚäC p¢Û úy 9š[ŒÌx¼擼A&DåÒ¯ˆ¤ÀÌ;"˜ ÏQä¸åhÊ}Ûq«Û0WžÒ|»€ø®öCm5•\ÇÀ§Pe3£]0ÃàLDÉ‰1øªxjgwT‚÷¿LΨK‹›ùs—xˆÜ±µ kæ¸f‰‰ÜGk/LÛØ6d9ò¶ùA{ƒA3š/¬D¬khÓk‰`˜"㯒r¿±Óã jx‡°e}<Ñø\3y:'À•/h½Í€Ç4~g ?Û(¼]v‘ªlKÎâ~?O‚W%{Ì:“'©úNq¾›úo(X’¥¯ˆ nFê{Ç€ü?º'ë ø‹ì Þ09ŒÌç9Æ —ËC`j@ÓÄ(+a‹un¸#ÂꟋ{K`‘ÑÍÍ'à´»/Û,KW;Þ4²þð ï Nm|~fGÏ(…³Ã)«1ö­Õ ¥‡¨©ƒÃ™ü-s=à=U66Ï«Ýc蓦W¹íž®›nÔ%êÇìŒ<#Ü×84ån®Ð ÒåOC` ñânÑs‡¢ç 1õ%Îhì½Ã½® e:ݼUZo™`  ÅZŸŒÊ«ê1ÏÄo$q¹Þ€©ˆhÐÉä¯ñ[!…Ú˜àJ:x2$Íß&PåT£6ç— ‡Í*4Ýšçjÿ ‰É nófÐ ó(L5C•åÆ\rMÒ@ò }y-W}™üýVù—ú¢=Ù”c®‘< M ž ´Phr ¦©TD ‘ù.$´÷O‡‘V2Æò.=IUŒ=ž‡â¬i™aþÓåÙ?òUø'ØÖ•.~* šTŒ!•-×áºTâ®ä#õü'´ eýlYÅÓeÕKÂrT"CÚ@u!Óxƒ{š3€}1¿(r}%«nËamjÑ%ÑNEò v ˜à  σöK³,*º.àzù¨™Ó ÚçâU¦*¿ 9{%Ö¹ njûdaXöb) kÛÆ±ûÓ\°M7ˆÂ=û›ç¿Ã‚­V»Cg–8ÙêE- j)k$º`Ã-ùEýeBÆÇ]c¡°ñty&Òd0nõ'¡W+ƒ*|–øµFa\GQªEAÔp5\Ǽ·¼Ç8·õ -â§Ú[ ‡ uZeÖ 3}×d'+¹:ð+K†Û®s!Ï$úe€<Û”x)1»a­¡LC]¸µík…ÚàA»AYº{†ªS[¦5HÒ7ù --,ísòDØ€èk ÞÀîÜ ò@â( ËNˆë›4ô½•/¦o‡€Û7 ê•ÆêòðÜy'Án½µ á˜ݦ ndeo…[ì¶Ê,¥R³Ä=À±—–ß;£™´ñSâ*g§”ïaið‘Jå~™ÓÞ ß³Õ¢»8x埒²52>AÊb&-÷\7´éÄù€T˜,w;3{ï˜k…à¹ÄqÀ«œ{€\ ˆ¾[´¨јr &Úé„Ívˆ±8†¿]|¬ņ4I×pÞS1ÈÖz‰#Ìv‡G!YNògñ:màTz¢Ý1ô©^O=~ë|5Bã™ç•¼µõ•bÆ@úÕS¬ÈŒ#¬zünrŸ û” Z²•èðV"ÁHÚý©wÝ €7¼Ìu1hÑa3Éä û f$o¿É ™Ú›ÝçnpÒ3äÌ3†Í§,Äï]$‰/pê †«À¼¸e9­Æê_C]žƒ·ý·frÁN«, E=›Çq -‰öŒ:aÏ¿±í&£Í:-} 84‘ÿ eƒQÑeëSsuiA ³g㟥ú£?ÿ ʼn*”“÷aühe:ÊWa@ÒÞk±eØ] F Ô—r.åä˜ @ö¥ªZoÐýYL·¥S²G/‡ñ <~*ZÆ´è>JlòàÛÆ½ÿ 窘ìGN¢:I®KšJp/`íIÁÀõ#Ä-€ö­šµŒoF4|ÆQØÆ@Ì|£Ô…¢À{9˜è½Üó›€ôYÒÎYsið;ís¤€à²ˆ‚4qÉVŒI$ ‰"° æµ8cXGjœˏ¡Aâý•ËÜ¢ûï e·çLx']á"oÅÎê3¯Ç—¹”ó0nå‚âg{Œñ> S´˜îè°g238‚ãköÝfÚd´6Ò€;ò÷±¢™¼›º ¢Æ'¥Ðx'e¬ç ]bÈÆV¢ó‹kýBO ðÊâ$Ÿ!×T 3Mýמ žìٍàÌü‘8÷€àæØ8æ©6‰©L´«…oãpð„~Çk‰!ñ;‹”ÛžÍ àž±z Ÿôû øŸÝužÏ;ÿ #|u6™Þ¬ÚˆÐõA4¶â|ôl|Ê2ŽÇ¤ÝÅÇY.<#Aí.k§hóF‚”Y; M½Ö4hŸ4&›­¿tès´%FìL¥£Ãk‰ÇT¤haÁ¤ÚxfÉ`ÑìË›>i 3t‚:,–+^÷´–{Û–Nxi"x‘Ûg î¨>¥Õ܁ùZH,2Û“:8xÊ¢Çí9.É-Ìâã-=çjwµS˜dütžçwýGòú®®ûº_ˆýx$–¡ãøO EÚÛÏ÷R„×w+3£Á£öUMyR²¹âŒ°š›¸Ñãò9§Ó_Dl+Ùßc›úšGÅÌc†Ž!Ko=¶.‘Îÿ c²(2®V mª.ÿ ¹B›¹å ù„öŸSV>™ü¯$y:G¢Z×àøúdî¹û­·ýÇ´:•c LÍõi_‹ö+ÎæGÊè>OŠ•äž´§Þ{X}¨1ÚTc›»Qþ•êô°t¿OP?eæ~É{5]•ÙR£r5†nZ\ã@ &îJõ ¾àC°þV>fé¥/ü5ñÊIº_é5 ;e­h<@ Ä&æÃëE%;X,ÒãÆÞ`Oò¦kŸm#˜!ÀyÄ¢| óLšò¥Ä` ¶R=|ÈCâh5ò3DˆïF†ðÒ#ÅìÛœ?¸yhBãœí ZxßÎÄhºRK„`Þödvײ™ÀÈÑÒgŒuY w³%†ƒÓzõ ÖÏp‚dH®¦A´ù§»ÓÇMæ~)ˆð‡û:ù&Ä •vGD´À n ݇¼Ö8Fö óáà£~Ë¥x`oK|Ä?fxiØü%pìR>éò+Û±éÎ>núlFŤ'tq8LZÏvÃ?„¡ß±È⽆¯³íü@x|PöUäèØã¡ð‚ŒAìÏ"vÍwóŸÍ{ ý0.z È•Ö{,N¡£¡ŸKÕÙž>Ýœþ ÍÀ°<×EA!Å‚D™IúOÍ¡>ôG}Â` ÍßkÜL™Ž Þð™ {IøF²¹òQ3&!ÃÂÞz.d&Ï-sH¸,Ôõ˜ŽP€ 77ˆÝ¼ÊëÜw =cÕ Ú,ØÐ5ÎYÐ)ì´öœgŒ[¤ßv㙑8心>h]§µháYš£²ºÑ.{Ï7Sð•?´~×SÃKýJÛ˜ ™Íäiúu<µX¶1õ^kâçIÑ£sZ4h>j*ÔšD:4­¿_ ÷¸ Õxæÿ ¸?Mù _•­ÊÐ ä ÷ý ÑwL œ­ïnTkÛUÍN©ë:¦fV ¶ÜÔÜMªÅâA½–¿R×TXš-%iTÊT•‡Ù‚JôϐZxWÑè‰f‰òG º ×Õû2aZ7OU3[“×AT–ÞŒ…-‘¤”Ì ì&(ˆ¿­•ƒkï’:ðY¦W‘ Å)“†‘˜³Åtcø˜ñTÂwÚÇ4|üLÇªí–v- qˆèU qPE.†â‘˜µ Æ,ÐÅs]8¾„oúÑ i>ÜxxÈó)ƒ ´æÁâØ$À‰vžŸf$Ž |ãw;ÀÁIJ»b` {¦Ó¤Ú$©YÀ‘n@Óïž«9J¼êG m¤ ܯ¹ÌW4€ÐÒÅÛ‡#褕Ÿn-?í|с¥÷Ú¹¬'´ÞÜ9ÓK `hê£SÄSà?7—Wí_´…óB›»:=Ãïq`<8ñÓŒÑlú2d¬ê³£hÖ[l|$vÝro~'R®‰§°ñmY ͧäP |PUª¹·:3Œ[Û{Xÿ ºâ@‚W–Äé u‚ ¯´*=íή.pûÒdt @G‰¬ s¸ ëÉücr ÞæÑ¨Ê@>¤¢Ö±. Þ'¯°ÌME[YéïĵÂCå½ Ué©Áû'Ê9%eÔðNU”ë‘ÌsD3/®+UI˜9h.WC”빓$#:pz:YÓ ¿xž* ³$Í +$kñAŠ‹†¢ Uê>¸)_š¬÷©ßAÂÔb9ÇU ¯¾á•9¯ÏÏ÷O÷¼¼Fähal1‰3Ì[Ïr•´UCksNÐ] R‘¸¥H+§Šé†c©vÖÞ0iÓ76s†î!§=ß ¼~Ô'°Ãmäoäš³ªøi1úÉ)³yV8 CLÄØÁ‘WYïi€H6ÖÑiámø^ÈY´°Ñ7¥Û*—Ñ©L«Qƒï—Ùrÿ ›£Ð*š¸ˆL©ˆ$ˆ ÷¾D§9È®«qbqC)–ˆïv´çñsÑVT­Ø, <àïºÀO«Jý·õ àfPìð .wFšir´þ’2_Y *Æ€x\« ì€9š@ Ž|F⇥ˆkZ@hÖÄ0t¿-<“‹qµ¾*ZL¤Ú)&BJpÓF5=$„at*Zš$’ÑtdûÝRI1 2މ$€$I$#‰SÞ’Hë¬ï;Á$¡t$’`<(ñÇt)$‡Ð.Êf¢X’Kt=Éé$‚ˆªè¢oÝëòI%Rgcª÷ŠyI%¡‰ÿ !ñ)´õ $¤ Ô’IIGÿÙ#!/bin/sh # Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB # This file is public domain and comes with NO WARRANTY of any kind # # Script to start the MySQL daemon and restart it if it dies unexpectedly # # This should be executed in the MySQL base directory if you are using a # binary installation that is not installed in its compile-time default # location # # mysql.server works by first doing a cd to the base directory and from there # executing mysqld_safe # Initialize script globals KILL_MYSQLD=1; MYSQLD= niceness=0 mysqld_ld_preload= mysqld_ld_library_path= # Initial logging status: error log is not open, and not using syslog logging=init want_syslog=0 syslog_tag= user='mysql' pid_file= pid_file_append= err_log= err_log_append= timestamp_format=UTC syslog_tag_mysqld=mysqld syslog_tag_mysqld_safe=mysqld_safe syslog_facility=daemon trap '' 1 2 3 15 # we shouldn't let anyone kill us trap '' 13 # not even SIGPIPE # MySQL-specific environment variable. First off, it's not really a umask, # it's the desired mode. Second, it follows umask(2), not umask(3) in that # octal needs to be explicit. Our shell might be a proper sh without printf, # multiple-base arithmetic, and binary arithmetic, so this will get ugly. # We reject decimal values to keep things at least half-sane. umask 007 # fallback UMASK="${UMASK-0640}" fmode=`echo "$UMASK" | sed -e 's/[^0246]//g'` octalp=`echo "$fmode"|cut -c1` fmlen=`echo "$fmode"|wc -c|sed -e 's/ //g'` if [ "x$octalp" != "x0" -o "x$UMASK" != "x$fmode" -o "x$fmlen" != "x5" ] then fmode=0640 echo "UMASK must be a 3-digit mode with an additional leading 0 to indicate octal." >&2 echo "The first digit will be corrected to 6, the others may be 0, 2, 4, or 6." >&2 fi fmode=`echo "$fmode"|cut -c3-4` fmode="6$fmode" if [ "x$UMASK" != "x0$fmode" ] then echo "UMASK corrected from $UMASK to 0$fmode ..." fi defaults= case "$1" in --no-defaults|--defaults-file=*|--defaults-extra-file=*) defaults="$1"; shift ;; esac usage () { cat <> "$err_log" fi ;; syslog) logger -t "$syslog_tag_mysqld_safe" -p "$priority" "$*" ;; both) if [ -w / -o "$USER" = "root" ]; then true else echo "$msg" >> "$err_log" fi logger -t "$syslog_tag_mysqld_safe" -p "$priority" "$*" ;; *) echo "Internal program error (non-fatal):" \ " unknown logging method '$logging'" >&2 ;; esac } log_error () { log_generic ${syslog_facility}.error "$@" >&2 } log_notice () { log_generic ${syslog_facility}.notice "$@" } eval_log_error () { cmd="$1" case $logging in file) if [ -w / -o "$USER" = "root" ]; then cmd="$cmd > /dev/null 2>&1" else cmd="$cmd >> "`shell_quote_string "$err_log"`" 2>&1" fi ;; syslog) cmd="$cmd --log-syslog=1 --log-syslog-facility=$syslog_facility '--log-syslog-tag=$syslog_tag' > /dev/null 2>&1" ;; both) if [ -w / -o "$USER" = "root" ]; then cmd="$cmd --log-syslog=1 --log-syslog-facility=$syslog_facility '--log-syslog-tag=$syslog_tag' > /dev/null 2>&1" else cmd="$cmd --log-syslog=1 --log-syslog-facility=$syslog_facility '--log-syslog-tag=$syslog_tag' >> "`shell_quote_string "$err_log"`" 2>&1" fi ;; *) echo "Internal program error (non-fatal):" \ " unknown logging method '$logging'" >&2 ;; esac #echo "Running mysqld: [$cmd]" cmd="env MYSQLD_PARENT_PID=$$ $cmd" eval "$cmd" } shell_quote_string() { # This sed command makes sure that any special chars are quoted, # so the arg gets passed exactly to the server. echo "$1" | sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g' } parse_arguments() { # We only need to pass arguments through to the server if we don't # handle them here. So, we collect unrecognized options (passed on # the command line) into the args variable. pick_args= if test "$1" = PICK-ARGS-FROM-ARGV then pick_args=1 shift fi for arg do # the parameter after "=", or the whole $arg if no match val=`echo "$arg" | sed -e 's;^--[^=]*=;;'` # what's before "=", or the whole $arg if no match optname=`echo "$arg" | sed -e 's/^\(--[^=]*\)=.*$/\1/'` # replace "_" by "-" ; mysqld_safe must accept "_" like mysqld does. optname_subst=`echo "$optname" | sed 's/_/-/g'` arg=`echo $arg | sed "s/^$optname/$optname_subst/"` case "$arg" in # these get passed explicitly to mysqld --basedir=*) MY_BASEDIR_VERSION="$val" ;; --datadir=*) case $val in /) DATADIR=$val ;; *) DATADIR="`echo $val | sed 's;/*$;;'`" ;; esac ;; --pid-file=*) pid_file="$val" ;; --plugin-dir=*) PLUGIN_DIR="$val" ;; --user=*) user="$val"; SET_USER=1 ;; # these might have been set in a [mysqld_safe] section of my.cnf # they are added to mysqld command line to override settings from my.cnf --log-error=*) err_log="$val" ;; --port=*) mysql_tcp_port="$val" ;; --socket=*) mysql_unix_port="$val" ;; # mysqld_safe-specific options - must be set in my.cnf ([mysqld_safe])! --core-file-size=*) core_file_size="$val" ;; --ledir=*) if [ -z "$pick_args" ]; then log_error "--ledir option can only be used as command line option, found in config file" exit 1 fi ledir="$val" ;; --malloc-lib=*) set_malloc_lib "$val" ;; --mysqld=*) if [ -z "$pick_args" ]; then log_error "--mysqld option can only be used as command line option, found in config file" exit 1 fi MYSQLD="$val" ;; --mysqld-version=*) if [ -z "$pick_args" ]; then log_error "--mysqld-version option can only be used as command line option, found in config file" exit 1 fi if test -n "$val" then MYSQLD="mysqld-$val" PLUGIN_VARIANT="/$val" else MYSQLD="mysqld" fi ;; --nice=*) niceness="$val" ;; --open-files-limit=*) open_files="$val" ;; --open_files_limit=*) open_files="$val" ;; --skip-kill-mysqld*) KILL_MYSQLD=0 ;; --mysqld-safe-log-timestamps=*) timestamp_format="$val" ;; --syslog) want_syslog=1 ;; --skip-syslog) want_syslog=0 ;; --syslog-tag=*) syslog_tag="$val" ;; --timezone=*) TZ="$val"; export TZ; ;; --help) usage ;; *) if test -n "$pick_args" then append_arg_to_args "$arg" fi ;; esac done } # Add a single shared library to the list of libraries which will be added to # LD_PRELOAD for mysqld # # Since LD_PRELOAD is a space-separated value (for historical reasons), if a # shared lib's path contains spaces, that path will be prepended to # LD_LIBRARY_PATH and stripped from the lib value. add_mysqld_ld_preload() { lib_to_add="$1" log_notice "Adding '$lib_to_add' to LD_PRELOAD for mysqld" case "$lib_to_add" in *' '*) # Must strip path from lib, and add it to LD_LIBRARY_PATH lib_file=`basename "$lib_to_add"` case "$lib_file" in *' '*) # The lib file itself has a space in its name, and can't # be used in LD_PRELOAD log_error "library name '$lib_to_add' contains spaces and can not be used with LD_PRELOAD" exit 1 ;; esac lib_path=`dirname "$lib_to_add"` lib_to_add="$lib_file" [ -n "$mysqld_ld_library_path" ] && mysqld_ld_library_path="$mysqld_ld_library_path:" mysqld_ld_library_path="$mysqld_ld_library_path$lib_path" ;; esac # LD_PRELOAD is a space-separated [ -n "$mysqld_ld_preload" ] && mysqld_ld_preload="$mysqld_ld_preload " mysqld_ld_preload="${mysqld_ld_preload}$lib_to_add" } # Returns LD_PRELOAD (and LD_LIBRARY_PATH, if needed) text, quoted to be # suitable for use in the eval that calls mysqld. # # All values in mysqld_ld_preload are prepended to LD_PRELOAD. mysqld_ld_preload_text() { text= if [ -n "$mysqld_ld_preload" ]; then new_text="$mysqld_ld_preload" [ -n "$LD_PRELOAD" ] && new_text="$new_text $LD_PRELOAD" text="${text}LD_PRELOAD="`shell_quote_string "$new_text"`' ' fi if [ -n "$mysqld_ld_library_path" ]; then new_text="$mysqld_ld_library_path" [ -n "$LD_LIBRARY_PATH" ] && new_text="$new_text:$LD_LIBRARY_PATH" text="${text}LD_LIBRARY_PATH="`shell_quote_string "$new_text"`' ' fi echo "$text" } # set_malloc_lib LIB # - If LIB is empty, do nothing and return # - If LIB is an absolute path, assume it is a malloc shared library # # Put LIB in mysqld_ld_preload, which will be added to LD_PRELOAD when # running mysqld. See ld.so for details. set_malloc_lib() { # This list is kept intentionally simple. malloc_dirs="/usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu" malloc_lib="$1" # Allow --malloc-lib='' to override other settings [ -z "$malloc_lib" ] && return case "$malloc_lib" in /*) if [ ! -r "$malloc_lib" ]; then log_error "--malloc-lib can not be read and will not be used" exit 1 fi # Restrict to a the list in $malloc_dirs above case "`dirname "$malloc_lib"`" in /usr/lib) ;; /usr/lib64) ;; /usr/lib/i386-linux-gnu) ;; /usr/lib/x86_64-linux-gnu) ;; *) log_error "--malloc-lib must be located in one of the directories: $malloc_dirs" exit 1 ;; esac ;; *) log_error "--malloc-lib must be an absolute path ignoring value '$malloc_lib'" exit 1 ;; esac add_mysqld_ld_preload "$malloc_lib" } find_basedir_from_cmdline () { for arg in "$@"; do case $arg in --basedir=*) MY_BASEDIR_VERSION="`echo "$arg" | sed -e 's;^--[^=]*=;;'`" # Convert to full path cd "$MY_BASEDIR_VERSION" if [ $? -ne 0 ] ; then log_error "--basedir set to '$MY_BASEDIR_VERSION', however could not access directory" exit 1 fi MY_BASEDIR_VERSION="`pwd`" ;; esac done } # # First, try to find BASEDIR and ledir (where mysqld is) # oldpwd="`pwd`" # Args not parsed yet, check if --basedir was given on command line find_basedir_from_cmdline "$@" # --basedir is already overridden on command line if test -n "$MY_BASEDIR_VERSION" -a -d "$MY_BASEDIR_VERSION" ; then # Search for mysqld and set ledir for dir in sbin libexec sbin bin ; do if test -x "$MY_BASEDIR_VERSION/$dir/mysqld" ; then ledir="$MY_BASEDIR_VERSION/$dir" break fi done else # Basedir should be parent dir of bindir, unless some non-standard # layout is used cd "`dirname $0`" if [ -h "$0" ] ; then realpath="`ls -l "$0" | awk '{print $NF}'`" cd "`dirname "$realpath"`" fi cd .. MY_PWD="`pwd`" # Search for mysqld and set ledir and BASEDIR for dir in sbin libexec sbin bin ; do if test -x "$MY_PWD/$dir/mysqld" ; then MY_BASEDIR_VERSION="$MY_PWD" ledir="$MY_BASEDIR_VERSION/$dir" break fi done # If we still didn't find anything, use the compiled-in defaults if test -z "$MY_BASEDIR_VERSION" ; then MY_BASEDIR_VERSION='/usr' ledir='/usr/sbin' fi fi # # Second, try to find the data directory # # Try where the binary installs put it if test -d $MY_BASEDIR_VERSION/data/mysql then DATADIR=$MY_BASEDIR_VERSION/data # Or just give up and use our compiled-in default else DATADIR=/var/lib/mysql fi if test -z "$MYSQL_HOME" then MYSQL_HOME=$MY_BASEDIR_VERSION fi export MYSQL_HOME # Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe] # and then merge with the command line arguments if test -x "$MY_BASEDIR_VERSION/bin/my_print_defaults" ; then print_defaults="$MY_BASEDIR_VERSION/bin/my_print_defaults" elif test -x "/usr/bin/my_print_defaults" ; then print_defaults="/usr/bin/my_print_defaults" else print_defaults="my_print_defaults" fi append_arg_to_args () { args="$args "`shell_quote_string "$1"` } args= cd "$oldpwd" SET_USER=2 parse_arguments `$print_defaults $defaults --loose-verbose mysqld server` if test $SET_USER -eq 2 then SET_USER=0 fi parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld` parse_arguments PICK-ARGS-FROM-ARGV "$@" # # Sort out date command from $timestamp_format early so we'll start off # with correct log messages. # case "$timestamp_format" in UTC|utc) DATE="date -u +%Y-%m-%dT%H:%M:%S.%06NZ";; SYSTEM|system) DATE="date +%Y-%m-%dT%H:%M:%S.%06N%:z";; HYPHEN|hyphen) DATE="date +'%Y-%m-%d %H:%M:%S'";; LEGACY|legacy) DATE="date +'%y%m%d %H:%M:%S'";; *) DATE="date -u +%Y-%m-%dT%H:%M:%S.%06NZ"; log_error "unknown data format $timestamp_format, using UTC";; esac # # Try to find the plugin directory # # Use user-supplied argument if [ -n "${PLUGIN_DIR}" ]; then plugin_dir="${PLUGIN_DIR}" else # Try to find plugin dir relative to basedir for dir in lib64/mysql/plugin lib64/plugin lib/mysql/plugin lib/plugin do if [ -d "${MY_BASEDIR_VERSION}/${dir}" ]; then plugin_dir="${MY_BASEDIR_VERSION}/${dir}" break fi done # Give up and use compiled-in default if [ -z "${plugin_dir}" ]; then plugin_dir='/usr/lib/mysql/plugin' fi fi plugin_dir="${plugin_dir}${PLUGIN_VARIANT}" # Determine what logging facility to use # Ensure that 'logger' exists, if it's requested if [ $want_syslog -eq 1 ] then my_which logger > /dev/null 2>&1 if [ $? -ne 0 ] then log_error "--syslog requested, but no 'logger' program found. Please ensure that 'logger' is in your PATH, or do not specify the --syslog option to mysqld_safe." exit 1 fi fi if [ $want_syslog -eq 1 ] then if [ -n "$syslog_tag" ] then # Sanitize the syslog tag syslog_tag=`echo "$syslog_tag" | sed -e 's/[^a-zA-Z0-9_-]/_/g'` syslog_tag_mysqld_safe="${syslog_tag_mysqld_safe}-$syslog_tag" syslog_tag_mysqld="${syslog_tag_mysqld}-$syslog_tag" fi log_notice "Logging to syslog." logging=syslog fi if [ -n "$err_log" -o $want_syslog -eq 0 ] then if [ -n "$err_log" ] then # mysqld adds ".err" if there is no extension on the --log-error # argument; must match that here, or mysqld_safe will write to a # different log file than mysqld # mysqld does not add ".err" to "--log-error=foo."; it considers a # trailing "." as an extension if expr "$err_log" : '.*\.[^/]*$' > /dev/null then : else err_log="$err_log".err fi err_log_append="$err_log" case "$err_log" in /* ) ;; ./*|../*) # Preparing absolute path from the relative path value specified for the # --log-error argument. # # Absolute path will be prepared for the value of following form # ./bar/foo OR # ../old_bar/foo # for --log-error argument. # # Note: If directory of log file name does not exists or # if write or execute permissions are missing on directory then # --log-error is set $DATADIR/`hostname`.err log_dir_name="$(dirname "$err_log")"; if [ ! -d "$log_dir_name" ] then log_notice "Directory "$log_dir_name" does not exists."; err_log=$DATADIR/`hostname`.err elif [ ! -x "$log_dir_name" -o ! -w "$log_dir_name" ] then log_notice "Do not have Execute or Write permissions on directory "$log_dir_name"."; err_log=$DATADIR/`hostname`.err else err_log=$(cd $log_dir_name && pwd -P)/$(basename "$err_log") fi ;; * ) err_log="$DATADIR/$err_log" ;; esac else err_log=$DATADIR/`hostname`.err err_log_append=`hostname`.err fi append_arg_to_args "--log-error=$err_log_append" if [ $want_syslog -eq 1 ] then logging=both else logging=file fi fi logdir=`dirname "$err_log"` # Change the err log to the right user, if possible and it is in use if [ $logging = "file" -o $logging = "both" ]; then if [ ! -e "$err_log" -a ! -h "$err_log" ]; then if test -w / -o "$USER" = "root"; then case $logdir in /var/log) ( umask 0137 set -o noclobber > "$err_log" && chown $user "$err_log" ) ;; *) ;; esac else ( umask 0137 set -o noclobber > "$err_log" ) fi fi if [ -f "$err_log" -o -p "$err_log" ]; then # Log to err_log file log_notice "Logging to '$err_log'." elif [ "x$user" = "xroot" ]; then # running as root, mysqld can create log file; continue echo "Logging to '$err_log'." >&2 else case $logdir in # We can't create $err_log, however mysqld can; continue /tmp|/var/tmp|/var/log/mysql|$DATADIR) echo "Logging to '$err_log'." >&2 ;; # We can't create $err_log and don't know if mysqld can; error out *) log_error "error: log-error set to '$err_log', however file don't exists. Create writable for user '$user'." exit 1 ;; esac fi fi USER_OPTION="" if test -w / -o "$USER" = "root" then if test "$user" != "root" -o $SET_USER = 1 then USER_OPTION="--user=$user" fi if test -n "$open_files" then ulimit -n $open_files fi fi if test -n "$open_files" then append_arg_to_args "--open-files-limit=$open_files" fi safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-/var/run/mysqld/mysqld.sock}} # Check that directory for $safe_mysql_unix_port exists mysql_unix_port_dir=`dirname $safe_mysql_unix_port` if [ ! -d $mysql_unix_port_dir ] then log_error "Directory '$mysql_unix_port_dir' for UNIX socket file don't exists." exit 1 fi # If the user doesn't specify a binary, we assume name "mysqld" if test -z "$MYSQLD" then MYSQLD=mysqld fi if test ! -x "$ledir/$MYSQLD" then log_error "The file $ledir/$MYSQLD does not exist or is not executable. Please cd to the mysql installation directory and restart this script from there as follows: ./bin/mysqld_safe& See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information" exit 1 fi if test -z "$pid_file" then pid_file="$DATADIR/`hostname`.pid" pid_file_append="`hostname`.pid" else pid_file_append="$pid_file" case "$pid_file" in /* ) ;; * ) pid_file="$DATADIR/$pid_file" ;; esac fi append_arg_to_args "--pid-file=$pid_file_append" if test -n "$mysql_unix_port" then append_arg_to_args "--socket=$mysql_unix_port" fi if test -n "$mysql_tcp_port" then append_arg_to_args "--port=$mysql_tcp_port" fi if test $niceness -eq 0 then NOHUP_NICENESS="nohup" else NOHUP_NICENESS="nohup nice -$niceness" fi # Using nice with no args to get the niceness level is GNU-specific. # This check could be extended for other operating systems (e.g., # BSD could use "nohup sh -c 'ps -o nice -p $$' | tail -1"). # But, it also seems that GNU nohup is the only one which messes # with the priority, so this is okay. if nohup nice > /dev/null 2>&1 then normal_niceness=`nice` nohup_niceness=`nohup nice 2>/dev/null` numeric_nice_values=1 for val in $normal_niceness $nohup_niceness do case "$val" in -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | \ [0-9] | [0-9][0-9] | [0-9][0-9][0-9] ) ;; * ) numeric_nice_values=0 ;; esac done if test $numeric_nice_values -eq 1 then nice_value_diff=`expr $nohup_niceness - $normal_niceness` if test $? -eq 0 && test $nice_value_diff -gt 0 && \ nice --$nice_value_diff echo testing > /dev/null 2>&1 then # nohup increases the priority (bad), and we are permitted # to lower the priority with respect to the value the user # might have been given niceness=`expr $niceness - $nice_value_diff` NOHUP_NICENESS="nice -$niceness nohup" fi fi else if nohup echo testing > /dev/null 2>&1 then : else # nohup doesn't work on this system NOHUP_NICENESS="" fi fi # Try to set the core file size (even if we aren't root) because many systems # don't specify a hard limit on core file size. if test -n "$core_file_size" then ulimit -c $core_file_size fi # # If there exists an old pid file, check if the daemon is already running # Note: The switches to 'ps' may depend on your operating system if test -f "$pid_file" then PID=`cat "$pid_file"` if kill -0 $PID > /dev/null 2> /dev/null then if ps wwwp $PID | grep -v mysqld_safe | grep -- $MYSQLD > /dev/null then # The pid contains a mysqld process log_error "A mysqld process already exists" exit 1 fi fi if [ ! -h "$pid_file" ]; then rm -f "$pid_file" if test -f "$pid_file"; then log_error "Fatal error: Can't remove the pid file: $pid_file. Please remove the file manually and start $0 again; mysqld daemon not started" exit 1 fi fi if [ ! -h "$safe_mysql_unix_port" ]; then rm -f "$safe_mysql_unix_port" if test -f "$safe_mysql_unix_port"; then log_error "Fatal error: Can't remove the socket file: $safe_mysql_unix_port. Please remove the file manually and start $0 again; mysqld daemon not started" exit 1 fi fi if [ ! -h "$pid_file.shutdown" ]; then rm -f "$pid_file.shutdown" if test -f "$pid_file.shutdown"; then log_error "Fatal error: Can't remove the shutdown file: $pid_file.shutdown. Please remove the file manually and start $0 again; mysqld daemon not started" exit 1 fi fi fi # # Uncomment the following lines if you want all tables to be automatically # checked and repaired during startup. You should add sensible key_buffer # and sort_buffer values to my.cnf to improve check performance or require # less disk space. # Alternatively, you can start mysqld with the "myisam-recover" option. See # the manual for details. # # echo "Checking tables in $DATADIR" # $MY_BASEDIR_VERSION/bin/myisamchk --silent --force --fast --medium-check $DATADIR/*/*.MYI # $MY_BASEDIR_VERSION/bin/isamchk --silent --force $DATADIR/*/*.ISM # Does this work on all systems? #if type ulimit | grep "shell builtin" > /dev/null #then # ulimit -n 256 > /dev/null 2>&1 # Fix for BSD and FreeBSD systems #fi cmd="`mysqld_ld_preload_text`$NOHUP_NICENESS" for i in "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \ "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION" do cmd="$cmd "`shell_quote_string "$i"` done cmd="$cmd $args" # Avoid 'nohup: ignoring input' warning test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null" log_notice "Starting $MYSQLD daemon with databases from $DATADIR" # variable to track the current number of "fast" (a.k.a. subsecond) restarts fast_restart=0 # maximum number of restarts before throttling kicks in max_fast_restarts=5 # flag whether a usable sleep command exists have_sleep=1 while true do start_time=`date +%M%S` eval_log_error "$cmd" if [ $? -eq 16 ] ; then dont_restart_mysqld=false echo "Restarting mysqld..." else dont_restart_mysqld=true fi # hypothetical: log was renamed but not # flushed yet. we'd recreate it with # wrong owner next time we log, so set # it up correctly while we can! if [ $want_syslog -eq 0 -a ! -f "$err_log" -a ! -h "$err_log" ]; then if test -w / -o "$USER" = "root"; then logdir=`dirname "$err_log"` case $logdir in /var/log) ( umask 0137 set -o noclobber > "$err_log" && chown $user "$err_log" ) ;; *) ;; esac else ( umask 0137 set -o noclobber > "$err_log" ) fi fi end_time=`date +%M%S` if $dont_restart_mysqld; then if test ! -f "$pid_file" # This is removed if normal shutdown then break else # self's mysqld crashed or other's mysqld running PID=`cat "$pid_file"` if kill -0 $PID > /dev/null 2> /dev/null then # true when above pid belongs to a running mysqld process log_error "A mysqld process with pid=$PID is already running. Aborting!!" exit 1 fi fi fi if test -f "$pid_file.shutdown" # created to signal that it must stop then log_notice "$pid_file.shutdown present. The server will not restart." break fi # sanity check if time reading is sane and there's sleep if test $end_time -gt 0 -a $have_sleep -gt 0 then # throttle down the fast restarts if test $end_time -eq $start_time then fast_restart=`expr $fast_restart + 1` if test $fast_restart -ge $max_fast_restarts then log_notice "The server is respawning too fast. Sleeping for 1 second." sleep 1 sleep_state=$? if test $sleep_state -gt 0 then log_notice "The server is respawning too fast and in addition no working 'sleep' command was found. Turning off throttling." have_sleep=0 fi fast_restart=0 fi else fast_restart=0 fi fi if true && test $KILL_MYSQLD -eq 1 then # Test if one process was hanging. # This is only a fix for Linux (running as base 3 mysqld processes) # but should work for the rest of the servers. # The only thing is ps x => redhat 5 gives warnings when using ps -x. # kill -9 is used or the process won't react on the kill. numofproces=`ps xaww | grep -v "grep" | grep "$ledir/$MYSQLD\>" | grep -c "pid-file=$pid_file"` log_notice "Number of processes running now: $numofproces" I=1 while test "$I" -le "$numofproces" do PROC=`ps xaww | grep "$ledir/$MYSQLD\>" | grep -v "grep" | grep "pid-file=$pid_file" | sed -n '$p'` for T in $PROC do break done # echo "TEST $I - $T **" if kill -9 $T then log_error "$MYSQLD process hanging, pid $T - killed" else break fi I=`expr $I + 1` done fi if [ ! -h "$pid_file" ]; then rm -f "$pid_file" fi if [ ! -h "$safe_mysql_unix_port" ]; then rm -f "$safe_mysql_unix_port" fi if [ ! -h "$pid_file.shutdown" ]; then rm -f "$pid_file.shutdown" fi log_notice "mysqld restarted" done if [ ! -h "$pid_file.shutdown" ]; then rm -f "$pid_file.shutdown" fi log_notice "mysqld from pid file $pid_file ended" if [ ! -h "$safe_pid" ]; then rm -f "$safe_pid" # Some Extra Safety. File is deleted fi # once the mysqld process ends.