鐩綍
鏈珷鎻忚堪鎬庢牱鑾峰緱骞跺畨瑁MySQL锛
1. 瑕佷簡瑙f敮鎸佸摢浜涘钩鍙銆傝娉ㄦ剰骞堕潪鎵鏈夋敮鎸佺殑骞冲彴鍚岀瓑閫傚悎杩愯MySQL銆傚湪閮ㄥ垎骞冲彴涓婁細姣斿叾瀹冨钩鍙版洿鏈夋晥銆佺ǔ瀹氥傝鎯呰鍙傝2.1.1鑺傦紝鈥淢ySQL鏀寔鐨勬搷浣滅郴缁熲 銆
2. 纭畾浣犲簲璇ヤ娇鐢ㄧ殑鍒嗗彂鐨勭増鏈銆傚彲鑾峰緱MySQL鐨勫涓増鏈紝澶ч儴鍒嗘湁澶氱鍒嗗彂鐗堛備綘鍙互閫夋嫨鍖呭惈浜岃繘鍒讹紙棰勭紪璇戯級浠g爜鎴栨簮鐮佸舰寮忕殑棰勬墦鍖呭垎鍙戙傚鏋滀笉鑳界‘瀹氾紝鍒欎娇鐢ㄤ簩杩涘埗鍒嗗彂鐗堛傚浜庢兂鐪嬫垜浠殑鏈鏂板紑鍙戝苟甯姪鎴戜滑娴嬭瘯鏂颁唬鐮佺殑鐢ㄦ埛锛屾垜浠彁渚涗簡鍏叡璁块棶鎺ュ彛锛屽彲浠ヨ闂垜浠渶鏂扮殑婧愮爜鏍戙備负浜嗙‘瀹氫綘搴旇浣跨敤鐨勫垎鍙戠殑鐗堟湰鍜岀被鍨嬶紝璇峰弬瑙2.1.2鑺傦紝鈥滈夋嫨瑕佸畨瑁呯殑MySQL鍒嗗彂鐗堚銆
3.
涓嬭浇鎯冲畨瑁呯殑鍒嗗彂鐗銆瀵逛簬鑳戒粠鍏惰幏寰MySQL鐨勭珯鐐瑰垪琛紝璇峰弬瑙2.1.3鑺傦紝鈥滄庢牱鑾峰緱MySQL鈥銆傜敤鏉ラ獙璇佸垎鍙戠増瀹屾暣鎬х殑鎸囦护鍙傝2.1.4鑺傦紝鈥滈氳繃MD5鏍¢獙鍜屾垨GnuPG楠岃瘉杞欢鍖呯殑瀹屾暣鎬鈥銆
4. 瀹夎鍒嗗彂鐗銆閽堝浜岃繘鍒朵唬鐮佸拰婧愮爜鍒嗗彂鐗堢殑瀹夎璇存槑鍦2.2鑺傦紝鈥滀娇鐢ㄤ簩杩涘埗鍒嗗彂鐗堢殑鏍囧噯MySQL瀹夎鈥涓杩般傞拡瀵逛簩杩涘埗浠g爜鍜屾簮鐮佸垎鍙戠増鐨勫畨瑁呰鏄庡湪2.8鑺傦紝鈥滀娇鐢ㄦ簮鐮佸垎鍙戠増瀹夎MySQL鈥涓杩般
娉閲婏細濡傛灉浣犳兂瑕佸皢褰撳墠鐗堟湰鐨MySQL鍗囩骇鍒版渶鏂扮増鏈紝鑰屼笉鏄娆″畨瑁MySQL锛屽叧浜庡崌绾ц繃绋嬪拰鍗囩骇鍓嶅簲鑰冭檻鐨勯棶棰樿鍙傝2.10鑺傦紝鈥滃崌绾ySQL鈥銆
濡傛灉閬囧埌瀹夎闂锛2.12鑺傦紝鈥滃叿浣撴搷浣滅郴缁熺浉鍏崇殑娉ㄦ剰浜嬮」鈥涓彁渚涗簡瑙e喅骞冲彴鐩稿叧闂鐨勪俊鎭
5. 杩涜瀹夎鍚庣殑璁剧疆銆瀹夎MySQL鍚庯紝璇烽槄璇2.9鑺傦紝鈥滃畨瑁呭悗鐨勮缃拰娴嬭瘯鈥銆傛湰鑺備粙缁嶄簡閲嶈鐨勪俊鎭紝鍙互纭繚MySQL鏈嶅姟鍣ㄦ纭伐浣溿傛湰鑺傝繕鎻忚堪浜嗗浣曚娇灏氭湭鏈夊瘑鐮佺殑鍒濆MySQL鐢ㄦ埛璐︽埛鐨勫畨鍏ㄣ備笉绠′綘鏄敤浜岃繘鍒朵唬鐮佽繕鏄簮鐮佸垎鍙戠増鏉ュ畨瑁MySQL锛岃繖浜涜繃绋嬪潎閫傜敤銆
濡傛灉瑕佽繍琛MySQL鍩哄噯鑴氭湰锛屽繀椤讳娇鐢ㄦ敮鎸MySQL鐨Perl銆傝鍙傝2.13鑺傦紝鈥淧erl瀹夎娉ㄦ剰浜嬮」鈥銆鍦ㄥ畨瑁MySQL鍓嶏紝浣犲簲璇ワ細
1. 纭畾鏄惁MySQL灏嗚繍琛屽湪浣犵殑骞冲彴涓娿
2. 閫夋嫨瀹夎鐨勫垎鍙戠増銆
3. 涓嬭浇鍒嗗彂鐗堝苟楠岃瘉鍏跺畬鏁存с
鏈妭鍖呭惈鎵ц涓婅堪姝ラ蹇呴渶鐨勪俊鎭備箣鍚庯紝浣犲彲浠ユ寜鐓ф湰绔犱腑鍚庨潰鍑犺妭鐨勮鏄庢潵瀹夎閫夋嫨鐨勫垎鍙戠増銆
鏈妭鍒楀嚭浜嗗彲浠ヨ繍琛MySQL鐨勬搷浣滅郴缁熴
鎴戜滑浣跨敤GNU Autoconf锛屽洜姝ゅ皢MySQL绉绘鍒版墍鏈変娇鐢Posix绾跨▼鍜C++缂栬瘧鍣ㄧ殑鐜颁唬绯荤粺鏄彲鑳界殑銆(瑕佹眰鏈嶅姟鍣ㄦ敮鎸佺嚎绋嬨傚鏋滃彧鏄紪璇戝鎴风浠g爜锛屽垯鍙渶瑕C++缂栬瘧鍣)銆傛垜浠富瑕佸湪Linux(SuSE鍜Red Hat)銆FreeBSD鍜Sun Solaris(鐗堟湰8鍜9)涓婁娇鐢ㄥ苟寮鍙戞湰杞欢銆
宸茬粡鎶ュ憡MySQL鍙互鍦ㄤ笅鍒楁搷浣滅郴缁/绾跨▼鍖呯殑缁勫悎涓婃垚鍔熷湴杩涜缂栬瘧銆傛敞鎰忥紝瀵逛簬寰堝鎿嶄綔绯荤粺锛屽師鐢熺殑绾跨▼浠呮敮鎸佹渶鏂扮殑鐗堟湰銆
路 鏈夊師鐢熺嚎绋嬬殑AIX 4.x鍜5.x銆傝鍙傝2.12.5.3鑺傦紝鈥淚BM-AIX娉ㄦ剰浜嬮」鈥銆
路 Amiga銆
路 鍖呮嫭MIT-pthreads鍖呯殑BSDI 2.x銆傝鍙傝2.12.4.4鑺傦紝鈥淏SD/OS 2.x鐗堟敞鎰忎簨椤光銆
路 鏈夊師鐢熺嚎绋嬬殑BSDI3.0,3.1鍜4.x銆傝鍙傝2.12.4.4鑺傦紝鈥淏SD/OS 2.x鐗堟敞鎰忎簨椤光銆
路 鏈夊師鐢熺嚎绋嬬殑Digital Unix 4.x銆傝鍙傝2.12.5.5鑺傦紝鈥淎lpha-DEC-UNIX(Tru64)鐗堟敞鎰忎簨椤光.銆
路 鍖呮嫭MIT-pthreads鍖呯殑FreeBSD 2.x銆傝鍙傝2.12.4.1鑺傦紝鈥淔reeBSD娉ㄦ剰浜嬮」鈥銆
路 鏈夊師鐢熺嚎绋嬬殑FreeBSD 3.x鍜4.x銆傝鍙傝2.12.4.1鑺傦紝鈥淔reeBSD娉ㄦ剰浜嬮」鈥銆
路 鏈LinuxThreads鐨FreeBSD 4.x銆傝鍙傝2.12.4.1鑺傦紝鈥淔reeBSD娉ㄦ剰浜嬮」鈥銆
路 鏈DCE绾跨▼鎴MIT-pthreads鍖呯殑HP-UX 10.20銆傝鍙傝2.12.5.1鑺傦紝鈥淗P-UX 10.20鐗堟敞鎰忎簨椤光銆
路 鏈夊師鐢熺嚎绋嬬殑HP-UX 11.x銆傝鍙傝2.12.5.2鑺傦紝鈥淗P-UX 11.x鐗堟敞鎰忎簨椤光銆
路 鏈LinuxThreads 0.7.1+鎴glibc 2.0.7+锛岄傚悎鍚勭CPU鐨Linux 2.0+銆傝鍙傝2.12.1鑺傦紝鈥淟inux娉ㄦ剰浜嬮」鈥銆
路 Mac OS X銆傝鍙傝2.12.2鑺傦紝鈥淢ac OS X娉ㄦ剰浜嬮」鈥銆
路 NetBSD 1.3/1.4 Intel鍜NetBSD 1.3 Alpha(闇瑕GNU make)銆傝鍙傝2.12.4.2鑺傦紝鈥淣etBSD娉ㄦ剰浜嬮」鈥銆
路 Novell NetWare 6.0銆傝鍙傝2.6鑺傦紝鈥滃湪NetWare涓畨瑁匨ySQL鈥銆
路 鏈夊師鐢熺嚎绋嬬殑OpenBSD > 2.5銆傚寘鎷MIT-pthreads鍖呯殑OpenBSD < 2.5銆傝鍙傝2.12.4.3鑺傦紝鈥淥penBSD 2.5鐗堟敞鎰忎簨椤光銆
路 OS/2 Warp 3, FixPack 29鍜OS/2 Warp 4, FixPack 4. 鍙傝2.12.6鑺傦紝鈥淥S/2娉ㄦ剰浜嬮」鈥銆
路 鏈夋渶鏂FSU Pthreads绉绘鍖呯殑SCO OpenServer 5.0.X銆傝鍙傝2.12.5.8鑺傦紝鈥淪CO UNIX鍜孫penServer 5.0.x鐗堟敞鎰忎簨椤光銆
路 SCO UnixWare 7.1.x銆傝鍙傝2.12.5.9鑺傦紝鈥淪CO UnixWare 7.1.x鍜孫penUNIX 8.0.0鐗堟敞鎰忎簨椤光銆
路 SCO Openserver 6.0.x銆傝鍙傝2.12.5.10鑺傦紝鈥淪CO OpenServer 6.0.x鐗堟敞鎰忎簨椤光銆
路 鏈夊師鐢熺嚎绋嬬殑SGI Irix 6.x銆傝鍙傝2.12.5.7鑺傦紝鈥淪GI Irix娉ㄦ剰浜嬮」鈥銆
路 SPARC鍜x86涓婃湁鍘熺敓绾跨▼鐨Solaris 2.5鍜屼互涓婄増鏈傝鍙傝2.12.3鑺傦紝鈥淪olaris娉ㄦ剰浜嬮」鈥銆
路 鍖呮嫭MIT-pthreads鍖呯殑SunOS 4.x銆傝鍙傝2.12.3鑺傦紝鈥淪olaris娉ㄦ剰浜嬮」鈥銆
路 Tru64 Unix銆傝鍙傝2.12.5.5鑺傦紝鈥淎lpha-DEC-UNIX(Tru64)鐗堟敞鎰忎簨椤光銆
路 Windows 9x銆Me銆NT銆2000銆XP鍜2003銆傝鍙傝2.3鑺傦紝鈥滃湪Windows涓婂畨瑁匨ySQL鈥銆
骞堕潪鎵鏈夋敮鎸佺殑骞冲彴鍚岀瓑閫傚悎杩愯MySQL銆傛牴鎹互涓嬪洜绱犵‘瀹氭煇涓钩鍙伴傚悎楂樿礋鑽峰叧閿换鍔MySQL鏈嶅姟鍣ㄧ殑绋嬪害锛
路 绾跨▼搴撶殑绋冲畾鎬с傚彲鑳芥煇涓钩鍙扮殑鍙嶅簲涓嶉敊锛屼絾MySQL鐨勭ǔ瀹氭у彇鍐充簬瀹冩墍璋冪敤鐨勭嚎绋嬪簱锛屼笉绠″叾瀹冮儴鍒嗘槸鍚﹀畬鍠勩
路 鍐呮牳鍜岀嚎绋嬪簱鍒╃敤鍧囪 澶氬鐞嗗櫒(SMP)绯荤粺鐨勮兘鍔涖傛崲鍙ヨ瘽璇达紝褰撹繘绋嬪垱寤轰竴涓嚎绋嬫椂锛屽簲鍏佽绾跨▼杩愯鍘熻繘绋嬫墍杩愯CPU涔嬪鐨勫叾瀹冨鐞嗗櫒銆
路 鍐呮牳鍜岀嚎绋嬪簱杩愯鍦ㄧ煭鑼冨洿棰戠箒鑾峰彇鍜岄噴鏀句簰鏂ヤ綋鑰屼笉闇瑕佽繃澶氬湴浜ゆ崲鍐呭鐨勫涓嚎绋嬬殑鑳藉姏銆傚鏋滄墽琛pthread_mutex_lock()鏃朵骇鐢熺殑CPU鏃堕棿澶煭锛屽垯浼氫弗閲嶅奖鍝MySQL銆傚鏋滀笉鍏虫敞璇ラ棶棰橈紝澧炲姞杩囧鐨CPU瀹為檯浼氶檷浣MySQL鐨勯熷害銆
路 甯歌鏂囦欢绯荤粺鐨勭ǔ瀹氭у拰鎬ц兘銆
路 濡傛灉鏁版嵁搴撹〃寰堝ぇ锛屾枃浠剁郴缁熷鐞嗗ぇ鏂囦欢鐨勮兘鍔涘拰澶勭悊鏁堢巼銆
路 鎴戜滑鍦ㄨ骞冲彴涓婁娇鐢MySQL AB鐨勭粡楠屾按骞炽傚鏋滄垜浠啛鎮変竴涓钩鍙帮紝鎴戜滑鍙互瀵瑰叿浣撳钩鍙拌繘琛屼紭鍖栧苟鍥哄畾缂栬瘧鏃堕棿銆傛垜浠繕鍙互鎻愪緵寤鸿濡備綍鏇村ソ鍦颁负MySQL閰嶇疆绯荤粺銆
路 鎴戜滑鍦ㄧ被浼奸厤缃笅鎵瀹屾垚鐨勫唴閮ㄦ祴璇曠殑鏁伴噺銆
路 鍦ㄥ悓涓骞冲彴绫讳技閰嶇疆涓嬫垚鍔熻繍琛MySQL鐨勭敤鎴锋暟銆傚鏋滆鏁板瓧寰堥珮锛屽垯璇存槑閬囧埌鍏蜂綋骞冲彴闂鐨勫嚑鐜囪灏忓緱澶氥
鏍规嵁鍓嶉潰鐨勬爣鍑嗭紝鍏佽MySQL鐨勬渶濂界殑骞冲彴鏄x86,瀹夎SuSE Linux锛屼娇鐢2.4鎴2.6鍐呮牳锛屽拰ReiserFS(鎴栫被浼Linux鍒嗗彂鐗)鍜屽畨瑁呬簡 Solaris(2.7-9)鐨SPARC銆FreeBSD鎺掔涓変綅锛屼絾鎴戜滑鐪熸甯屾湜涓鏃︾嚎绋嬪簱寰楀埌鏀硅繘锛屽畠涔熷彲浠ユ彁楂樻帓鍚嶃備粠鏌愪竴瑙傜偣鎴戜滑杩樺笇鏈涙彁楂樺叾瀹MySQL鐩墠姝e湪涓婇潰缂栬瘧銆佸厑璁哥殑骞冲彴鐨勬帓鍚嶏紝浣嗙ǔ瀹氭у拰鎬ц兘涓婂彲浠ヨ姹備笉鍚岀瓑绾с傝繖闇瑕佹垜浠笌MySQL鎵渚濊禆鐨勬搷浣滅郴缁熷拰搴撶粍浠跺紑鍙戜汉鍛樺叡鍚屽姫鍔涖傚鏋滀綘瀵规敼杩涙煇涓粍浠舵劅鍏磋叮锛屽彲鑳藉奖鍝嶅叾寮鍙戯紝闇瑕佹洿澶氱殑鍏充簬MySQL濡備綍鑳借繍琛屽緱鏇村ソ鐨勮鏄庯紝璇峰悜鎴戜滑鐨MySQL internals鍙戦侀偖浠躲傝鍙傝1.7.1.1鑺傦紝鈥淭he MySQL閭欢鍒楄〃鈥銆
璇锋敞鎰忓墠闈㈢殑瀵规瘮骞朵笉鏄涓涓搷浣滅郴缁熸讳綋涓婃瘮鍙︿竴涓搷浣滅郴缁熻濂姐傛垜浠彧鏄璁洪夋嫨涓涓OS鏉ヤ笓闂ㄨ繍琛MySQL銆傝浣忎簡杩欎竴鐐癸紝濡傛灉鑰冭檻鏇村鐨勫洜绱狅紝瀵规瘮缁撴灉鍙兘浼氫笉鍚屻傚湪鏌愪簺鎯呭喌涓嬶紝涓涓OS姣斿彟涓涓OS濂界殑鍘熷洜鍙槸鎴戜滑宸茬粡涓哄叿浣撳钩鍙板仛鍑轰簡鏇村鐨勫姫鍔涙潵杩涜娴嬭瘯鍜屼紭鍖栥傛垜浠彧鏄檲杩版垜浠殑瑙傜偣甯姪浣犻夋嫨杩愯MySQL鐨勫钩鍙般
棣栧厛瑕佷綔鍑哄喅绛栵紝浣犳槸鍚︽兂瑕佷娇鐢ㄦ渶鏂扮殑寮鍙戠増鏈垨鏈缁堢殑绋冲畾鐗堟湰銆傚湪MySQL寮鍙戣繃绋嬩腑锛屽悓鏃跺瓨鍦ㄥ涓彂甯冪郴鍒楋紝姣忎釜鍙戝竷澶勫湪鎴愮啛搴︾殑涓嶅悓闃舵锛
路 MySQL 5.2鏄渶鏂板紑鍙戠殑鍙戝竷绯诲垪锛屾槸灏嗘墽琛屾柊鍔熻兘鐨勭郴鍒椼備笉涔呯殑灏嗘潵鍙互浣跨敤Alpha鍙戣锛屼互渚挎劅鍏磋叮鐨勭敤鎴疯繘琛屽箍娉涚殑娴嬭瘯銆
路 MySQL 5.1鏄綋鍓嶇ǔ瀹(浜у搧璐ㄩ噺)鍙戝竷绯诲垪銆傚彧閽堝婕忔礊淇閲嶆柊鍙戝竷锛涙病鏈夊鍔犱細褰卞搷绋冲畾鎬х殑鏂板姛鑳姐
路 MySQL 5.0鏄墠涓绋冲畾(浜у搧璐ㄩ噺)鍙戝竷绯诲垪銆傚彧閽堝涓ラ噸婕忔礊淇鍜屽畨鍏ㄤ慨澶嶉噸鏂板彂甯冿紱娌℃湁澧炲姞浼氬奖鍝嶈绯诲垪鐨勯噸瑕佸姛鑳姐
路 MySQL 4.0鍜3.23鏄棫鐨勭ǔ瀹(浜у搧璐ㄩ噺)鍙戝竷绯诲垪銆傝鐗堟湰涓嶅啀浣跨敤锛屾柊鐨勫彂甯冨彧鐢ㄦ潵淇鐗瑰埆涓ラ噸鐨勬紡娲烇紙浠ュ墠鐨勫畨鍏ㄩ棶棰橈級銆
鎴戜滑涓嶈涓烘湁瀹屽叏鐨勫喕缁撶増锛屽洜涓轰换浣曠増鏈潎闇瑕佸婕忔礊杩涜淇鍜屽叾瀹冧慨澶嶃傚浜庘滄煇绉嶇▼搴︾殑鍐荤粨鈥濓紝鎴戜滑鏄寚鎴戜滑鍙互鍦ㄤ骇鍝佸彂甯冧腑澧炲姞涓浜涗笉浼氬奖鍝嶅綋鍓嶅伐浣滅殑灏忎笢瑗裤傝嚜鐒讹紝鍓嶄竴绯诲垪鐨勭浉鍏虫紡娲炰慨澶嶄細绉绘鍒板悗闈㈢殑绯诲垪銆
閫氬父, 濡傛灉浣犳槸绗竴娆″紑濮嬩娇鐢MySQL鎴栨兂瑕佸皢瀹冪Щ妞嶅埌涓浜涜繕娌℃湁浜岃繘鍒跺垎鍙戠増鐨勭郴缁熶笂锛屾垜浠帹鑽愪娇鐢ㄦ渶缁堢殑绋冲畾鐗堟湰銆傜洰鍓嶆槸MySQL 5.1銆傛垜浠凡缁忎娇鐢MySQL鍩哄噯瀵规墍鏈MySQL鍙戝竷杩涜浜嗘鏌ワ紝鍖呮嫭鏉ヨ嚜寮鍙戠郴鍒楃殑鍙戝竷锛屽湪鍙戝竷鍓嶈繕浣跨敤鍩哄噯濂椾欢鏉ユ祴璇曞畠銆
濡傛灉浣犳鍦ㄨ繍琛屼竴涓佺殑绯荤粺骞朵笖鎯宠鍗囩骇锛屼絾鏄張涓嶆兂鍐掗櫓杩涜闈炴棤缂濆崌绾э紝搴旇鍗囩骇鍒版渶鏂扮増鏈腑浣犳浣跨敤鐨勭浉鍚岀殑鍙戝竷绯诲垪锛堝彧鏈夌増鏈彿鐨勬渶鍚庨儴鍒嗘瘮浣犱娇鐢ㄧ殑鏂帮級銆傛垜浠凡缁忚瘯鐫浠呬慨澶嶈嚧鍛界己闄凤紝瀵归偅涓増鏈繘琛屼簡寰堝皬鐨勭浉瀵瑰畨鍏ㄧ殑鏀瑰姩銆
濡傛灉浣犳兂瑕佷娇鐢ㄤ骇鍝佸彂甯冪郴鍒椾腑鎵娌℃湁鐨勬柊鍔熻兘锛屼綘鍙互浣跨敤寮鍙戠郴鍒楃殑鐗堟湰銆傝娉ㄦ剰寮鍙戝彂甯冧笉濡備骇鍝佸彂甯冪ǔ瀹氥
濡傛灉浣犳兂瑕佷娇鐢ㄥ寘鍚墍鏈夋渶鏂拌ˉ涓佸拰婕忔礊淇鐨勬渶鏂版簮鐮侊紝鍙互浣跨敤鎴戜滑鐨BitKeeper搴撱傝繖浜涘簱杩樻病鏈夊彂甯冿紝浣嗗彲浠ラ瑙堜唬鐮侊紝灏嗘潵鐨勫彂甯冨熀浜庤繖浜涗唬鐮併
MySQL鐨勫懡鍚嶆満鍒朵娇鐢ㄧ敱3涓暟瀛楀拰涓涓悗缂缁勬垚鐨勭増鏈彿銆備緥濡傦紝鍍mysql-5.0.9-beta鐨勭増鏈彿杩欐牱瑙i噴锛
路 绗1涓暟瀛(5)鏄富鐗堟湰鍙凤紝鎻忚堪浜嗘枃浠舵牸寮忋傛墍鏈夌増鏈5鐨勫彂琛岄兘鏈夌浉鍚岀殑鏂囦欢鏍煎紡銆
路 绗2涓暟瀛(0)鏄彂琛岀骇鍒備富鐗堟湰鍙峰拰鍙戣绾у埆缁勫悎鍒颁竴璧蜂究鏋勬垚浜嗗彂琛屽簭鍒楀彿銆
路 绗3涓暟瀛(9)鏄湪姝ゅ彂琛岀郴鍒楃殑鐗堟湰鍙凤紝闅忔瘡涓柊鍒嗗彂鐗堥掑銆傞氬父浣犻渶瑕佸凡缁忛夋嫨鐨勫彂琛(release)鐨勬渶鏂扮増鏈(鐗堟湰)銆
姣忔鏇存柊鍚庯紝鐗堟湰瀛楃涓茬殑鏈鍚庝竴涓暟瀛楅掑銆傚鏋滅浉瀵逛簬鍓嶄竴涓増鏈鍔犱簡鏂板姛鑳芥垨鏈夊井灏忕殑涓嶅吋瀹规э紝瀛楃涓茬殑绗簩涓暟瀛楅掑銆傚鏋滄枃浠舵牸寮忔敼鍙橈紝绗竴涓暟瀛楅掑銆
鍚庣紑鏄剧ず鍙戣鐨勭ǔ瀹氭х骇鍒傞氳繃涓绯诲垪鍚庣紑鏄剧ず濡備綍鏀硅繘绋冲畾鎬с傚彲鑳界殑鍚庣紑鏈夛細
路 alpha琛ㄦ槑鍙戣鍖呭惈澶ч噺鏈褰诲簳娴嬭瘯鐨勬柊浠g爜銆傚凡鐭ョ殑缂洪櫡搴旇鍦ㄦ柊闂诲皬鑺傝璁板綍銆傝鍙傝闄勫綍D锛MySQL鍙樻洿鍙銆傚湪澶у鏁alpha鐗堟湰涓篃鏈夋柊鐨勫懡浠ゅ拰鎵╁睍銆alpha鐗堟湰涔熷彲鑳芥湁涓昏浠g爜鏇存敼绛夊紑鍙戙備絾鎴戜滑鍦ㄥ彂甯冨墠涓瀹氬鍏惰繘琛屾祴璇曘
路 beta鎰忓懗鐫璇ョ増鏈姛鑳芥槸瀹屾暣鐨勶紝骞朵笖鎵鏈夌殑鏂颁唬鐮佽娴嬭瘯浜嗭紝娌℃湁澧炲姞閲嶈鐨勬柊鐗瑰緛锛屽簲璇ユ病鏈夊凡鐭ョ殑缂洪櫡銆傚綋alpha鐗堟湰鑷冲皯涓涓湀娌℃湁鍑虹幇鎶ュ鐨勮嚧鍛芥紡娲烇紝骞朵笖娌℃湁璁″垝澧炲姞瀵艰嚧宸茬粡瀹炴柦鐨勫姛鑳戒笉绋冲畾鐨勬柊鍔熻兘鏃讹紝鐗堟湰鍒欎粠alpha鐗堝彉涓beta鐗堛
鍦ㄤ互鍚庣殑beta鐗堛佸彂甯冪増鎴栦骇鍝佸彂甯冧腑锛屾墍鏈API銆佸閮ㄥ彲瑙嗙粨鏋勫拰SQL鍛戒护鍒楀潎涓嶅啀鏇存敼銆
路 rc鏄鍙戝竷浠h〃锛鏄竴涓彂琛屼簡涓娈垫椂闂寸殑beta鐗堟湰锛岀湅璧锋潵搴旇杩愯姝e父銆傚彧澧炲姞浜嗗緢灏忕殑淇銆(鍙戝竷浠h〃鍗充互鍓嶆墍绉扮殑gamma 鐗)
路 濡傛灉娌℃湁鍚庣紑锛岃繖鎰忓懗鐫璇ョ増鏈凡缁忓湪寰堝鍦版柟杩愯涓娈垫椂闂翠簡锛岃屼笖娌℃湁闈炲钩鍙扮壒瀹氱殑缂洪櫡鎶ュ憡銆傚彧澧炲姞浜嗗叧閿紡娲炰慨澶嶄慨澶嶃傝繖灏辨槸鎴戜滑绉颁负涓涓骇鍝侊紙绋冲畾锛夋垨鈥滈氱敤鈥濈増鏈殑涓滆タ銆
MySQL鐨勫懡鍚嶆満鍒朵簬鍏跺畠浜у搧绋嶆湁涓嶅悓銆備竴鑸儏鍐碉紝鎴戜滑鍙互寰堟斁蹇冨湴浣跨敤宸茬粡鎶曟斁甯傚満涓ゅ懆鑰屾病鏈夎鐩稿悓鍙戝竷绯诲垪鐨勬柊鐗堟湰鎵浠f浛鐨勭増鏈
MySQL鎵鏈夌増鏈兘缁忚繃鎴戜滑鐨勬爣鍑嗘祴璇曞拰鍩哄噯娴嬭瘯杩愯锛屼互淇濊瘉瀹冧滑鍙浉褰撳畨鍏ㄥ湴浣跨敤銆傚洜涓烘爣鍑嗘祴璇曚笉鏂墿鍏呬互妫娴嬩互鍓嶅彂鐜扮殑缂洪櫡锛屾祴璇曞浠朵竴鐩村湪鏀硅繘涔嬩腑銆
鎵鏈夌増鏈兘鑷冲皯宸茬粡鐢ㄤ笅鍒楀浠惰繘琛屼簡娴嬭瘯锛
路 涓涓唴閮ㄦ祴璇曞浠
mysql-test鐩綍鍖呭惈涓鏁村娴嬭瘯妗堜緥銆傛垜浠拡瀵规瘡涓簩杩涘埗鏈嶅姟鍣ㄨ繘琛岃繖浜涙祴璇曘傚叧浜庤娴嬭瘯濂椾欢鐨勮缁嗕俊鎭弬瑙27.1.2鑺傦紝鈥淢ySQL娴嬭瘯濂椾欢鈥銆
路 MySQL鍩哄噯濂椾欢
瀹冭繍琛屼竴瀹氳寖鍥寸殑鏅氭煡璇€傚畠涔熸槸涓涓祴璇曪紝妫娴嬫渶鏂扮殑浼樺寲澶勭悊鏄惁鐪熺殑浣夸唬鐮佹洿蹇傝鍙傝7.1.4鑺傦紝鈥淢ySQL鍩哄噯濂椾欢鈥銆
路 crash-me娴嬭瘯
杩欏皾璇曞喅瀹氭暟鎹簱鏀寔浠涔堝姛鑳藉拰瀹冪殑鑳藉姏涓庨檺鍒舵槸浠涔堛傝鍙傝7.1.4鑺傦紝鈥淢ySQL鍩哄噯濂椾欢鈥銆
鍙︿竴涓祴璇曟槸鍦ㄥ唴閮ㄧ敓浜х幆澧冧腑浣跨敤鏈鏂MySQL鐗堟湰锛岃嚦灏戝湪涓鍙版満鍣ㄤ笂銆傛垜浠湁瓒呰繃100GB鐨勬暟鎹彲渚涗娇鐢ㄣ
閫夋嫨浜MySQL鐨勫畨瑁呯増鏈悗锛岃鍋氱殑绗簩椤瑰喅绛栨槸浣犳槸浣跨敤婧愮爜鍒嗗彂鐗堣繕鏄簩杩涘埗鍒嗗彂鐗堛傚ぇ澶氭暟鎯呭喌锛屽鏋滀綘鐨勫钩鍙颁笂宸茬粡鏈変簡涓涓簩杩涘埗鍒嗗彂鐗堬紝浣犲彲鑳戒娇鐢ㄤ簩杩涘埗鍒嗗彂鐗堛傚ぇ澶氭暟骞冲彴鍙互浣跨敤鍘熸牸寮忎簩杩涘埗鍒嗗彂鐗堬紝渚嬪Linux浣跨敤RPM鏂囦欢锛Mac OS X浣跨敤DMG瀹夎杞欢鍖呫備篃鍙互浣跨敤Zip鏂囦欢鎴栧帇缂tar鏂囦欢銆
閫夋嫨浜岃繘鍒跺垎鍙戠増鐨勭悊鐢憋細
路 浜岃繘鍒跺垎鍙戠増姣旀簮鐮佸垎鍙戠増鏇村鏄撳畨瑁呫
路 涓轰簡婊¤冻涓嶅悓鐢ㄦ埛鐨勯渶姹傦紝鎴戜滑鎻愪緵浜嗕袱绉嶄笉鍚岀殑浜岃繘鍒剁増鏈細涓涓槸缂栬瘧杩囩殑甯﹂潪浜嬪姟鍌ㄥ瓨寮曟搸(灏忕殑蹇熷簱)锛屽彟涓涓厤缃簡鏈閲嶈鐨勬墿灞曢夐」锛屼緥濡備簨鍔″畨鍏ㄨ〃銆備袱涓増鏈潎浠庣浉鍚岀殑婧愮爜鍒嗗彂鐗堢紪璇戣屾潵銆傛墍鏈夋湰鍦MySQL瀹㈡埛绔潎鍙互杩炴帴浠讳竴鐗堟湰鐨MySQL鏈嶅姟鍣ㄣ
鎵╁睍MySQL搴撳垎鍙戠増鏍囨湁-max鍚庣紑锛岄厤缃簡涓mysqld-max鐩稿悓鐨勯夐」銆傝鍙傝5.1.2鑺傦紝鈥渕ysqld-max鎵╁睍MySQL鏈嶅姟鍣ㄢ銆
濡傛灉鎯宠浣跨敤MySQL-Max RPM锛屽繀椤婚鍏堝畨瑁呮爣鍑MySQL-server RPM銆
鍦ㄦ煇浜涚幆澧冧笅锛屾渶濂藉畨瑁呮簮鐮佸垎鍙戠増MySQL锛
路 浣犳兂瑕佸湪鏌愪釜鏄庢樉鐨勪綅缃畨瑁MySQL銆傛爣鍑嗕簩杩涘埗鍒嗗彂鐗堝彲浠ュ畨瑁呭埌浠讳綍鍦版柟锛屼絾浣犳兂鏇村姞鐏垫椿鍦板皢MySQL缁勪欢鏀惧埌鏌愪釜鍦版柟銆
路 浣犳兂瑕佸皢mysqld閰嶇疆涓浜涙爣鍑嗕簩杩涘埗鍒嗗彂鐗堜腑鏈寘鎷殑涓浜涚壒娈婄壒寰併備笅闈㈡槸涓浜涗綘鎯宠浣跨敤鐨勬渶甯哥敤鐨勯夐」锛
o --with-innodb(鍦ㄦ墍鏈MySQL 5.1搴撶増鏈腑榛樿浣跨敤)
o --with-berkeley-db(鍙傚悎閮ㄥ垎骞冲彴)
o --with-libwrap
o --with-鍚d-z-libs(閫傚悎閮ㄥ垎浜岃繘鍒)
o --with-debug[=full]
路 浣犳兂瑕佸皢mysqld閰嶇疆涓浜涙爣鍑嗕簩杩涘埗鍒嗗彂鐗堜腑宸茬粡鍖呮嫭鐨勪竴浜涚壒娈婄壒寰併備緥濡傦紝涓鑸紪璇戣繃鐨勫垎鍙戠増鏀寔鎵鏈夊瓧绗﹂泦銆傚鏋滀綘鎯宠涓涓洿灏忕殑MySQL鏈嶅姟鍣紝鍙互閲嶆柊缂栬瘧鍙敮鎸佷綘闇瑕佺殑瀛楃闆嗐
路 浣犳湁涓涓笓鐢ㄧ紪璇戝櫒(渚嬪pgcc)鎴栨兂瑕佷娇鐢ㄦ洿濂藉湴浼樺寲閫傜敤浣犵殑澶勭悊鍣ㄧ殑缂栬瘧鍣ㄩ夐」銆備簩杩涘埗鍒嗗彂鐗堢紪璇戠殑閫夐」閫傚悎鍚屼竴澶勭悊鍣ㄦ棌鐨勫悇绉嶅鐞嗗櫒銆
路 浣犳兂瑕佷娇鐢BitKeeper搴撲腑鐨勬渶鏂版簮鐮侊紝浠ヨ闂墍鏈夋渶鏂版紡娲炰慨澶嶃備緥濡傦紝濡傛灉浣犲彂鐜颁簡婕忔礊骞跺皢瀹冩姤鍛婄粰MySQL寮鍙戝皬缁勶紝婕忔礊淇浼犻掔粰婧愮爜搴擄紝浣犱究鍙互璁块棶瀹冦傚彂甯冨疄闄呭彂琛屽悗鎵嶄細鍑虹幇婕忔礊淇銆
路 濡傛灉浣犳兂瑕侀槄璇(鎴栦慨鏀)鏋勬垚MySQL鐨C鍜C++浠g爜锛屼綘搴旇鎷垮埌婧愮爜鍒嗗彂鐗堛傛簮鐮佹绘槸鏈缁堢殑鎵嬪唽銆
路 婧愮爜鍒嗗彂鐗堜篃姣斾簩杩涘埗鐨勫垎鍙戠増鍖呭惈鏇村鐨勬祴璇曞拰瀹炰緥銆
MySQL杩涘睍鐨勭浉褰撳揩锛屾垜浠兂瑕佷笌鍏跺畠MySQL鐢ㄦ埛鍒嗕韩瀹冦傚綋鎴戜滑鏈変竴涓湅鏉ュ叾瀹冧汉浼间箮闇瑕佺殑闈炲父鏈夌敤鐨勫姛鑳芥椂锛屾垜浠氨璇曠潃鍒朵綔涓涓彂琛岀増鏈
鎴戜滑涔熷皾璇曞府鍔╅偅浜涢渶瑕佸緢瀹规槗瀹炵幇鐨勫姛鑳界殑鐢ㄦ埛锛屾垜浠篃鍏虫敞鎴戜滑鎺堟潈鐨勭敤鎴锋兂瑕佷粈涔堬紝鎴戜滑鏇寸壒鍒叧娉ㄦ垜浠敮鎸佺殑瀹㈡埛鎯宠浠涔堬紝骞朵笖灏藉姏甯姪浠栦滑銆
娌℃湁浜轰竴瀹氳涓嬭浇涓涓柊鐗堟湰锛屾柊闂诲皬鑺備腑灏嗗憡璇変綘鏂扮増鏈槸鍚︽湁涓浜涗綘纭疄鎯宠鐨勪笢瑗裤傝鍙傝闄勫綍D锛MySQL鍙樻洿鍙銆
褰撴洿鏂MySQL鏃讹紝鎴戜滑浣跨敤涓嬪垪绛栫暐锛
路 灏嗗彂甯冩瘡涓郴鍒椼傛瘡娆″彂甯冩椂锛岀増鏈殑鏈鍚庝竴涓暟瀛椾负鍚屼竴绯诲垪鍓嶄竴鐗堟湰鐨勫熀纭涓婂姞1銆
路 绋冲畾鐨勬祴璇曡繃鐨勪骇鍝佺増鏈瘡骞村噯澶囧嚭鐜1-2娆★紝浣嗘槸濡傛灉鍙戠幇灏忕己闄凤紝鍙湁缂洪櫡淇鐨勪竴涓増鏈皢琚彂琛屻
路 宸ヤ綔鐗堟湰/瀵规棫鐗堟湰鐨勬紡娲炰慨澶嶆枃浠舵瘡4-8鍛ㄥ嚭鐜颁竴娆°
路 瀵逛竴浜涘钩鍙扮殑浜岃繘鍒跺垎鍙戠増锛屼富瑕佺増鏈敱鎴戜滑鍒朵綔銆傚叾瀹冧汉鍙互涓哄叾瀹冪郴缁熷埗浣滀簩杩涘埗鍒嗗彂鐗堬紝浣嗘槸鍙兘涓嶅瑙併
路 鎴戜滑涓鏃﹁瘑鍒苟淇浜嗛潪绱фヤ絾鐑︿汉鐨勭己闄凤紝鍒欑珛鍗冲皢鍏跺彂甯冿紝鍙互浠庡叕鍏BitKeeper搴撲腑绔嬪嵆寰楀埌淇浠g爜锛屽苟灏嗗寘鍚埌涓嬩竴鍙戝竷鐗堜腑銆
鎴戜滑鎶曞叆浜嗗ぇ閲忕殑鏃堕棿鍜屽伐浣滄潵浣挎垜浠殑鍙戝竷娌℃湁缂洪櫡銆傛垜浠粠鏉ユ病鏈夊彂甯冭繃鍚湁宸茬煡鑷村懡閲嶅鎬х己闄风殑鍗曚竴MySQL鐗堟湰銆(鈥鑷村懡鈥濈己闄锋寚鑳藉湪姝e父搴旂敤涓鑷MySQL鐦棯鐨勭己闄凤紝瀵逛簬姝e父鏌ヨ浜х敓閿欒绛旀锛屾垨鏈夊畨鍏ㄩ棶棰橈級銆
鎴戜滑宸茬粡灏嗘墍鏈夊叕寮闂銆佺己闄峰拰鐢辫璁″喅绛栧喅瀹氱殑浜嬪疁璁板叆鏂囦欢銆傝鍙傝A.8鑺傦紝鈥淢ySQL涓殑宸茬煡浜嬪疁鈥銆
鎴戜滑鐨勭洰鏍囨槸淇涓鍒囧彲浠ヤ慨澶嶇殑涓滆タ锛岃屼笉浼氫娇绋冲畾鐨MySQL鐗堟湰鍙樺緱涓嶇ǔ瀹氥傚湪鏌愪簺鎯呭喌锛岃繖鎰忓懗鐫鎴戜滑鍙互鍦ㄥ紑鍙戠増鏈腑淇闂锛岃屼笉鏄湪绋冲畾鐨 (浜у搧) 鐗堟湰銆傝嚜鐒讹紝鎴戜滑浼氬皢杩欎簺闂璁板叆鏂囨。锛屼互渚跨敤鎴疯兘鐭ラ亾銆
涓嬮潰鎻忚堪浜嗘垜浠浣曟搷浣滐細
路 鎴戜滑閫氳繃鎴戜滑鐨勫鎴锋敮鎸佸垪琛ㄣ佸湪http://bugs.mysql.com/ 缂洪櫡鏁版嵁搴撳拰MySQL澶栭儴閭欢鍒楄〃鏉ョ洃鎺х己闄枫
路 褰撳墠鐗堟湰涓墍鏈夎鎶ュ鐨勭己闄疯杈撳叆缂洪櫡鏁版嵁搴撱
路 褰撴垜浠慨澶嶇己闄凤紝鎴戜滑鎬绘槸涓哄叾璁捐涓娆℃祴璇曟渚嬶紝骞跺皢鍏跺寘鎷繘娴嬭瘯绯荤粺涓紝浠ョ‘淇濅笉浼氭紡妫浣跨己闄峰啀鐜般(鎵鏈変慨澶嶇殑缂洪櫡涓ぇ绾90%鐨勫叿鏈夋祴璇曟渚嬶級銆
路 涓烘坊鍔犲埌MySQL涓殑鎵鏈夋柊鍔熻兘鍒涘缓娴嬭瘯妗堜緥銆
路 鎴戜滑寮濮嬫瀯寤烘柊鐨MySQL鍙戝竷鍓嶏紝鎴戜滑纭繚淇浜MySQL鐗堟湰(3.23.x銆4.0.x銆4.1.x銆5.0.x绛夌瓑)涓墍鏈夎鎶ュ鐨勯噸澶嶆х己闄枫傚鏋滄煇浜涘唴瀹逛笉鑳戒慨澶(鐢变簬MySQL鍐呴儴鐨勪竴浜涜璁″喅绛)锛屾垜浠湪鏈墜鍐屼腑璁板綍涓嬫潵銆傝鍙傝A.8鑺傦紝鈥淢ySQL涓殑宸茬煡浜嬪疁鈥銆
路 鎴戜滑鍦ㄦ墍鏈夋敮鎸佷簩杩涘埗鐨勫钩鍙(15+骞冲彴)涓婃瀯寤哄苟杩愯鎴戜滑鐨勬祴璇曞浠跺拰鍩哄噯濂椾欢銆
路 濡傛灉鍦ㄦ煇涓钩鍙颁笂娴嬭瘯鎴栧熀鍑嗗浠跺け璐ワ紝鎴戜滑涓嶄細鍏竷浜岃繘鍒躲傚鏋滈棶棰樻槸鐢变簬婧愮爜涓殑鏅氱己闄凤紝鎴戜滑灏嗚繘琛屼慨澶嶅苟鍦ㄦ墍鏈夌郴缁熶笂鏋勫缓骞舵祴璇曘
路 鏋勫缓鍜屾祴璇曡繃绋嬮渶瑕2-3澶┿傚鏋滃湪璇ヨ繃绋嬩腑鎴戜滑鏀跺埌鑷村懡缂洪櫡鐩稿叧鎶ュ憡(渚嬪锛屼細閫犳垚鍐呮牳杞偍)锛屾垜浠皢淇璇ラ棶棰樺苟閲嶆柊鍚姩鏋勫缓杩囩▼銆
路 鍦http锛//dev.mysql.com/涓婂叕甯冧簩杩涘埗鍚庯紝鎴戜滑鍒欏悜mysql鍙戝嚭鍏憡娑堝苟announce閭欢鍒楄〃銆傝鍙傝1.7.1.1鑺傦紝鈥淭he MySQL閭欢鍒楄〃鈥銆傚叕鍛婃秷鎭寘鍚墍鏈夊彂甯冪殑鏇存敼鍒楄〃鍜屽凡鐭ラ棶棰樸傚彧鏈夐儴鍒嗗彂鐗堜笉闇瑕宸茬煡鐨勯棶棰閮ㄥ垎銆
路 涓轰簡璁╂垜浠殑鐢ㄦ埛蹇熻闂渶鏂MySQL鍔熻兘锛屾垜浠瘡4-8鍛ㄤ骇鐢熶竴涓柊鐨MySQL鍙戝竷銆傛瘡澶╂瀯寤烘簮鐮佸揩鐓э紝鍙互浠http://downloads.mysql.com/snapshots.php鑾峰緱銆
路 濡傛灉锛屽敖绠$粡杩囨垜浠渶澶х殑鍔姏锛屾垜浠湪鍙戝竷鍚庝粛鏀跺埌缂洪櫡鎶ュ憡锛屽嵆鍦ㄦ煇涓叿浣撳钩鍙颁笂鍑虹幇涓ラ噸闂锛屾垜浠皢绔嬪嵆杩涜淇锛屽苟涓鸿骞冲彴鏋勫缓涓涓柊鐨 'a'鐗堟湰銆傜敱浜庢垜浠殑澶х敤鎴风兢锛屽彲浠ュ緢蹇湴鏌ュ嚭骞惰В鍐虫绫婚棶棰樸
路 鎴戜滑涓轰繚璇佺ǔ瀹氱増鏈墍鍋氱殑璺熻釜璁板綍涓嶉敊銆傚湪鏈杩150涓彂甯冧腑锛屾垜浠彧闇瑕佸鍏朵腑涓嶅埌10涓噸鏂版瀯寤恒傚叾涓湁3涓渚嬶紝缂洪櫡涓烘垜浠殑鏋勫缓鏈哄櫒涓婄殑glibc 搴擄紝鑺变簡寰堥暱鏃堕棿鏉ヨ窡韪
浣滀负MySQL AB鐨勬湇鍔★紝鎴戜滑鎻愪緵浜嗕竴濂椾簩杩涘埗MySQL鍒嗗彂鐗堬紝宸茬粡鍦ㄦ垜浠殑绔欑偣涓婃墍鍒楃殑绯荤粺鎴栨敮鎸MySQL銆佸弸濂藉湴涓烘垜浠彁渚涜闂殑鏈哄櫒涓婄殑绯荤粺涓婄紪璇戣繃銆
闄や簡鍏蜂綋骞冲彴瀹夎杞欢鍖呮牸寮忔彁渚涚殑浜岃繘鍒跺垎鍙戠増锛屾垜浠繕浠ュ帇缂tar鏂囦欢(.tar.gz鏂囦欢)涓哄绉嶅钩鍙版彁渚涗簡浜岃繘鍒跺垎鍙戠増銆傝鍙傝2.2鑺傦紝鈥滀娇鐢ㄤ簩杩涘埗鍒嗗彂鐗堢殑鏍囧噯MySQL瀹夎鈥銆
瀵逛簬Windows鍒嗗彂鐗堬紝鍙傝2.3鑺傦紝鈥滃湪Windows涓婂畨瑁匨ySQL鈥銆
浣跨敤鑴氭湰 Build-tools/Do-compile鐢熸垚杩欎簺鍒嗗彂鐗堬紝鍙互缂栬瘧婧愮爜骞朵娇鐢scripts/make_binary_distribution鍒涘缓浜岃繘鍒tar.gz鏂囦欢銆
閫氳繃涓嬮潰鐨勭紪璇戝櫒鍜岄夐」鏉ラ厤缃苟鏋勫缓浜岃繘鍒跺垎鍙戠増銆傚彲浠ユ煡鐪嬪悇涓簱浜岃繘鍒tar鏂囦欢鍒嗗彂鐗堢殑鑴氭湰bin/mysqlbug鍐呯殑鍙橀噺COMP_ENV_INFO鍜 CONFIGURE_LINE鏉ユ煡鐪嬭繖浜涗俊鎭
路 Linux 2.4.xx x86涓殑gcc 2.95.3锛
CFLAGS="-O2 -mcpu=pentiumpro" CXX=gcc CXXFLAGS="-O2 -mcpu=pentiumpro -felide-constructors" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
路 Linux 2.4.x x86涓殑icc(Intel C++ Compiler 8.1鎴栨洿楂樼増鏈)锛
CC=icc CXX=icpc CFLAGS="-O3 -unroll2 -ip -mp -no-gcc -restrict" CXXFLAGS="-O3 -unroll2 -ip -mp -no-gcc -restrict" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-embedded-server --with-innodb
璇锋敞鎰Intel 缂栬瘧鍣8.1鐗堝拰鏇撮珮鐗堟湁涓嶅悓鐨勨滅函鈥C(icc)椹卞姩绋嬪簭鍜C++(icpc)椹卞姩绋嬪簭锛涘鏋滀綘浣跨敤icc 8.0鐗堟湰鎴栬緝鏃╃殑鐗堟湰鏉ユ瀯寤MySQL锛岄渶瑕佽缃CXX=icc銆
路 Linux 2.4.xx Intel Itanium 2涓殑ecc (Intel C++ Itanium Compiler 7.0)锛
CC=ecc CFLAGS="-O2 -tpp2 -ip -nolib_inline" CXX=ecc CXXFLAGS="-O2 -tpp2 -ip -nolib_inline" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile
路 Linux 2.4.xx Intel Itanium涓殑ecc(Intel C++ Itanium Compiler 7.0)锛
CC=ecc CFLAGS=-tpp1 CXX=ecc CXXFLAGS=-tpp1 ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile
路 Linux 2.4.xx alpha涓殑ccc(Compaq C V6.2-505 / Compaq C++ V6.3-006)锛
CC=ccc CFLAGS="-fast -arch generic" CXX=cxx CXXFLAGS="-fast -arch generic -noexceptions -nortti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-mysqld-ldflags=-non_shared --with-client-ldflags=-non_shared --disable-shared
路 Linux 2.x.xx ppc涓殑gcc 2.95.4锛
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-embedded-server --with-innodb
路 Linux 2.4.xx s390涓殑gcc 2.95.3锛
CFLAGS="-O2" CXX=gcc CXXFLAGS="-O2 -felide-constructors" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
路 Linux 2.4.xx x86_64(AMD64)涓殑gcc 3.2.1锛
CXX=gcc ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared
路 Sun Solaris 8 x86涓殑gcc 3.2.3锛
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-inno
路 Sun Solaris 8 SPARC涓殑gcc 3.2锛
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-z-libs=no --with-named-curses-libs=-lcurses --disable-shared
路 Sun Solaris 8 SPARC 64-bit涓殑gcc 3.2锛
CC=gcc CFLAGS="-O3 -m64 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -m64 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --with-named-curses-libs=-lcurses --disable-shared
路 Sun Solaris 9 SPARC涓殑gcc 2.95.3锛
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-curses-libs=-lcurses --disable-shared
路 Sun Solaris 9 SPARC涓殑cc-5.0(Sun Forte 5.0)锛
CC=cc-5.0 CXX=CC ASFLAGS="-xarch=v9" CFLAGS="-Xa -xstrconst -mt -D_FORTEC_ -xarch=v9" CXXFLAGS="-noex -mt -D_FORTEC_ -xarch=v9" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-z-libs=no --enable-thread-safe-client --disable-shared
路 IBM AIX 4.3.2 ppc涓殑gcc 3.2.3锛
CFLAGS="-O2 -mcpu=powerpc -Wa,-many " CXX=gcc CXXFLAGS="-O2 -mcpu=powerpc -Wa,-many -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared
路 IBM AIX 4.3.3 ppc涓殑xlC_r(IBM Visual Age C/C++ 6.0)锛
CC=xlc_r CFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" CXX=xlC_r CXXFLAGS ="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared --with-innodb
路 IBM AIX 5.1.0 ppc涓殑gcc 3.3锛
CFLAGS="-O2 -mcpu=powerpc -Wa,-many" CXX=gcc CXXFLAGS="-O2 -mcpu=powerpc -Wa,-many -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared
路 IBM AIX 5.2.0 ppc涓殑xlC_r(IBM Visual Age C/C++ 6.0)锛
CC=xlc_r CFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" CXX=xlC_r CXXFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared --with-embedded-server --with-innodb
路 HP-UX 10.20 pa-risc1.1涓殑gcc 3.1锛
CFLAGS="-DHPUX -I/opt/dce/include -O3 -fPIC" CXX=gcc CXXFLAGS="-DHPUX -I/opt/dce /include -felide-constructors -fno-exceptions -fno-rtti -O3 -fPIC" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-pthread --with-named-thread-libs=-ldce --with-lib-ccflags=-fPIC --disable-shared
路 HP-UX 11.00 pa-risc涓殑aCC(HP ANSI C++ B3910B A.03.50)锛
CC=cc CXX=aCC CFLAGS=+DAportable CXXFLAGS=+DAportable ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-embedded-server --with-innodb
路 HP-UX 11.11 pa-risc2.0 64bit涓殑aCC(HP ANSI C++ B3910B A.03.33)锛
CC=cc CXX=aCC CFLAGS=+DD64 CXXFLAGS=+DD64 ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared
路 HP-UX 11.11 pa-risc2.0 32bit涓殑aCC(HP ANSI C++ B3910B A.03.33)锛
CC=cc CXX=aCC CFLAGS="+DAportable" CXXFLAGS="+DAportable" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-innodb
路 HP-UX 11.22 ia64 64bit涓殑aCC(HP aC++/ANSI C B3910B A.05.50)锛
CC=cc CXX=aCC CFLAGS="+DD64 +DSitanium2" CXXFLAGS="+DD64 +DSitanium2" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-embedded-server --with-innodb
路 Apple Mac OS X 10.2 powerpc涓殑gcc 3.1锛
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared
路 FreeBSD 4.7 i386涓殑gcc 2.95.4锛
CFLAGS=-DHAVE_BROKEN_REALPATH ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-z-libs=not-used --disable-shared
路 浣跨敤LinuxThreads鐨FreeBSD 4.7 i386涓殑gcc 2.95.4锛
CFLAGS="-DHAVE_BROKEN_REALPATH -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads" CXXFLAGS="-DHAVE_BROKEN_REALPATH -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-thread-libs="-DHAVE_GLIBC2_STYLE_GETHOSTBYNAME_R -D_THREAD_SAFE -I /usr/local/include/pthread/linuxthreads -L/usr/local/lib -llthread -llgcc_r" --disable-shared --with-embedded-server --with-innodb
路 QNX Neutrino 6.2.1 i386涓殑gcc 2.95.3qnx-nto 20010315锛
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared
涓嬮潰鐨勪簩杩涘埗鏄湪鐢卞叾瀹冪敤鎴锋彁渚涚粰MySQL AB鐨勭涓夋柟绯荤粺涓婃瀯寤鸿屾垚銆傝繖鏄厤璐硅禒閫侊紱MySQL AB娌℃湁瀹屽叏鎺у埗杩欎簺绯荤粺锛屽洜姝ゆ垜浠彧鑳藉鍦ㄨ繖浜涚郴缁熶笂鏋勫缓鐨勪簩杩涘埗鎻愪緵鏈夐檺鐨勬敮鎸併
路 SCO Unix 3.2v5.0.7 i386涓殑gcc 2.95.3:
CFLAGS="-O3 -mpentium" LDFLAGS=-static CXX=gcc CXXFLAGS="-O3 -mpentium -felide-constructors" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --enable-thread-safe-client --disable-shared
路 SCO UnixWare 7.1.4 i386涓殑CC 3.2:
CC=cc CFLAGS="-O" CXX=CC ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --enable-thread-safe-client --disable-shared --with-readline
路 CO OpenServer 6.0.0 i386涓殑CC 3.2:
CC=cc CFLAGS="-O" CXX=CC ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --enable-thread-safe-client --disable-shared --with-readline
路 Compaq Tru64 OSF/1 V5.1 732 alpha涓殑cc/cxx(Compaq C V6.3-029i / DIGITAL C++ V6.1-027):
CC="cc -pthread" CFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed -speculate all" CXX="cxx -pthread" CXXFLAGS="-O4 -ansi_alias -fast -inline speed -speculate all -noexceptions -nortti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-thread-libs="-lpthread -lmach -lexc -lc" --disable-shared --with-mysqld-ldflags=-all-static
路 SGI Irix 6.5 IP32涓殑gcc 3.0.1:
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared
路 FreeBSD/sparc64 5.0涓殑gcc 3.2.1:
CFLAGS=-DHAVE_BROKEN_REALPATH ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-innodb
鍦MySQL AB杩囧幓鎻愪緵鐨勪簩杩涘埗杞欢鍖呬腑搴旂敤浜嗕笅闈㈢殑缂栬瘧閫夐」銆傝繖浜涗簩杩涘埗涓嶅啀杩涜鏇存柊锛屼絾鏄湪杩欓噷鍒楀嚭浜嗚繖浜涚紪璇戦夐」渚涘弬鑰冦
路 Linux 2.2.xx SPARC涓殑egcs 1.1.2:
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared
路 Linux 2.2.x x686涓殑gcc 2.95.2:
CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared --with-extra-charsets=complex
路 SunOS 4.1.4 2 sun4c涓殑gcc 2.7.2.1:
CC=gcc CXX=gcc CXXFLAGS="-O3 -felide-constructors" ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=complex --enable-assembler
路 SunOS 5.5.1(鍙婁互涓婄増鏈)sun4u涓殑egcs 1.0.3a鎴2.90.27鎴gcc 2.95.2鍜屾洿鏂扮増:
路 CC=gcc CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-low-memory --with-extra-charsets=complex --enable-assembler
路 SunOS 5.6 i86pc涓殑gcc 2.8.1:
CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql --with-low-memory --with-extra-charsets=complex
路 BSDI BSD/OS 3.1 i386涓殑gcc 2.7.2.1:
CC=gcc CXX=gcc CXXFLAGS=-O ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex
路 BSDI BSD/OS 2.1 i386涓殑gcc 2.7.2:
CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex
路 AIX 4.2涓殑gcc 2.7.2.2锛
CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex
濡傛灉浣犳湁鏇村ソ鐨勪笂杩伴厤缃夐」锛屽彲浠ュ悜MySQL internals閭欢鍒楄〃鍙戦侀偖浠躲傝鍙傝1.7.1.1鑺傦紝鈥淭he MySQL閭欢鍒楄〃鈥銆
鍦ㄦ垜浠殑绔欑偣涓垪鍑虹殑MySQL 5.1鍙戝竷鐨RPM鍒嗗彂鐗堟槸鐢MySQL AB浜х敓鐨勩
濡傛灉浣犳兂瑕佺紪璇MySQL璋冭瘯鐗堟湰锛屽簲褰撳湪鍓嶉潰鐨configure鍛戒护涓姞涓--with-debug鎴--with-debug=full锛屽苟鍘绘帀-fomit-frame-pointer閫夐」銆
鎴戜滑鐨勪富闀滃儚绔欑偣浣嶄簬http://mirrors.sunsite.dk/mysql/銆
路 MD5鏍¢獙鍜
路 浣跨敤GnuPG銆GNU Privacy Guard瀵圭鍚嶈繘琛屽姞瀵
路 瀵逛簬RPM杞欢鍖咃紝浣跨敤鍐呭祵寮RPM瀹屾暣鎬ч獙璇佹満鍒
涓嬮潰鐨勭珷鑺傛弿杩颁簡濡備綍浣跨敤杩欎簺鏂规硶銆
濡傛灉浣犳敞鎰忓埌MD5鏍¢獙鍜屼笌GPG绛惧悕涓嶅尮閰嶏紝棣栧厛搴斿皾璇曞娆′笅杞界浉鍏冲畨瑁呰蒋浠跺寘锛屽彲浠ヤ粠鍏跺畠闀滃儚绔欑偣銆傚鏋滀綘鍙嶅灏濊瘯浠嶄笉鑳芥垚鍔熼獙璇佸畨瑁呰蒋浠跺寘鐨勫畬鏁存э紝璇峰皢姝ょ被闂閫氱煡缁欐垜浠紝鍖呮嫭瀹屾暣鐨勫畨瑁呰蒋浠跺寘鍚嶅拰浣犱娇鐢ㄧ殑涓嬭浇绔欑偣锛屽湪<webmaster@mysql.com>鎴<build@mysql.com>銆備笉瑕佷娇鐢ㄧ己闄-鎶ュ憡鏈哄埗鏉ユ姤鍛婁笅杞介棶棰樸
涓嬭浇MySQL瀹夎杞欢鍖呭悗锛屼綘搴斿綋纭繚瀹冪殑MD5鏍¢獙鍜屼笌鎻愪緵鐨MySQL涓嬭浇椤典笂鐨勭浉鍖归厤銆傛瘡涓畨瑁呰蒋浠跺寘鏈夊敮涓鐨勬牎楠屽拰锛屽彲浠ョ敤涓嬮潰鐨勫懡浠ゆ潵楠岃瘉锛屽叾涓package_name鏄綘涓嬭浇鐨勫畨瑁呰蒋浠跺寘鐨勫悕绉帮細
shell> md5sum package_name
绀轰緥锛
shell> md5sum mysql-st鍜ard-5.1.2-alpha-linux-i686.tar.gz
aaab65abbec64d5e907dcd41b8699945 mysql-st鍜ard-5.1.2-alpha-linux-i686.tar.gz
浣犲簲褰撻獙璇佺粨鏋滄牎楠屽拰(鍗佸叚杩涘埗鏁板瓧瀛楃涓)涓庝笅杞介〉涓婄浉鍏冲畨瑁呰蒋浠跺寘涓嬮潰鏄剧ず鐨勬牎楠屽拰鐩稿尮閰嶃
娉ㄩ噴锛涓瀹氳楠岃瘉褰掓。鏂囦欢(渚嬪锛.zip鎴.tar.gz鏂囦欢)鐨勬牎楠屽拰锛岃屼笉鏄叾涓寘鎷殑鏂囦欢銆
璇锋敞鎰忓苟闈炴墍鏈夋搷浣滅郴缁熸敮鎸md5sum鍛戒护銆傚湪涓浜涙搷浣滅郴缁熶笂锛屽彧鏄О涓md5锛鍙︿竴浜涙牴鏈笉瑁呰浇瀹冦傚湪Linux涓紝瀹冩槸GNU Text Utilities瀹夎杞欢鍖呯殑涓閮ㄥ垎锛岄傚悎鍚勭骞冲彴銆傚彲浠ヤ粠http锛//www.gnu.org/software/textutils/涓嬭浇婧愮爜銆傚鏋滀綘宸茬粡瀹夎浜OpenSSL锛岃繕鍙互浣跨敤鍛戒护openssl md5 package_name銆http锛//www.fourmilab.ch/md5/鎻愪緵浜DOS/Windows浣跨敤鐨md5鍛戒护琛屽疄鐢ㄥ伐鍏枫winMd5Sum鏄竴涓浘褰MD5妫鏌ュ伐鍏凤紝鍙互浠http锛//www.nullriver.com/index/products/winmd5sum鑾峰緱銆
楠岃瘉瀹夎杞欢鍖呭畬鏁存у拰鐪熷疄鎬х殑鍙︿竴涓柟娉曟槸浣跨敤鍔犲瘑绛惧悕銆傝繖姣斾娇鐢MD5鏍¢獙鍜屾洿鍙潬锛屼絾鏄渶瑕佹洿澶氱殑宸ヤ綔銆
MySQL AB鐢GnuPG(GNU Privacy Guard)瀵逛笅杞MySQ杞欢鍖呰繘琛岀鍚嶃GnuPG鏄紑鏀炬簮鐮侊紝涓嶅悓浜Phil Zimmermann鐨勯椈鍚嶇殑Pretty Good Privacy (PGP)銆傚叧浜GnuPG鍜屽浣曡幏寰楀苟瀹夎鍒颁綘鐨勭郴缁熺殑璇︾粏淇℃伅锛岃鍙傝http锛//www.gnupg.org/銆傚ぇ澶氭暟Linux鍒嗗彂鐗堣鏈夐粯璁ゅ畨瑁呯殑GnuPG銆傚叧浜GnuPG鐨勮缁嗕俊鎭紝鍙傝 http锛//www.openpgp.org/銆
瑕佹兂楠岃瘉鍏蜂綋瀹夎杞欢鍖呯殑绛惧悕锛屼綘棣栧厛闇瑕佽幏寰MySQL AB鍏叡GPG鏋勫缓瀵嗛挜鐨勬嫹璐濄傚彲浠ヤ粠http锛//www.keyserver.net/涓嬭浇瀵嗛挜銆備綘鎯宠鑾峰緱鐨勫瘑閽ュ悕涓build@mysql.com銆傚彟澶栵紝鍙互浠庝笅闈㈢殑鏂囨湰鐩存帴鍓垏骞剁矘璐村瘑閽ワ細
Key ID:
pub 1024D/5072E1F5 2003-02-03
MySQL Package signing key (www.mysql.com) <build@mysql.com>
Fingerprint: A4A9 4068 76FC BD3C 4567 70C8 8C71 8D3B 5072 E1F5
Public Key (ASCII-armored):
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
mQGiBD4+owwRBAC14GIfUfCyEDSIePvEW3SAFUdJBtoQHH/nJKZyQT7h9bPlUWC3
RODjQReyCITRrdwyrKUGku2FmeVGwn2u2WmDMNABLnpprWPkBdCk96+OmSLN9brZ
fw2vOUgCmYv2hW0hyDHuvYlQA/BThQoADgj8AW6/0Lo7V1W9/8VuHP0gQwCgvzV3
BqOxRznNCRCRxAuAuVztHRcEAJooQK1+iSiunZMYD1WufeXfshc57S/+yeJkegNW
hxwR9pRWVArNYJdDRT+rf2RUe3vpquKNQU/hnEIUHJRQqYHo8gTxvxXNQc7fJYLV
K2HtkrPbP72vwsEKMYhhr0eKCbtLGfls9krjJ6sBgACyP/Vb7hiPwxh6rDZ7ITnE
kYpXBACmWpP8NJTkamEnPCia2ZoOHODANwpUkP43I7jsDmgtobZX9qnrAXw+uNDI
QJEXM6FSbi0LLtZciNlYsafwAPEOMDKpMqAK6IyisNtPvaLd8lH0bPAnWqcyefep
rv0sxxqUEMcM3o7wwgfN83POkDasDbs3pjwPhxvhz6//62zQJ7Q7TXlTUUwgUGFj
a2FnZSBzaWduaW5nIGtleSAod3d3Lm15c3FsLmNvbSkgPGJ1aWxkQG15c3FsLmNv
bT6IXQQTEQIAHQUCPj6jDAUJCWYBgAULBwoDBAMVAwIDFgIBAheAAAoJEIxxjTtQ
cuH1cY4AnilUwTXn8MatQOiG0a/bPxrvK/gCAJ4oinSNZRYTnblChwFaazt7PF3q
zIhMBBMRAgAMBQI+PqPRBYMJZgC7AAoJEElQ4SqycpHyJOEAn1mxHijft00bKXvu
cSo/pECUmppiAJ41M9MRVj5VcdH/KN/KjRtW6tHFPYhMBBMRAgAMBQI+QoIDBYMJ
YiKJAAoJELb1zU3GuiQ/lpEAoIhpp6BozKI8p6eaabzF5MlJH58pAKCu/ROofK8J
Eg2aLos+5zEYrB/LsrkCDQQ+PqMdEAgA7+GJfxbMdY4wslPnjH9rF4N2qfWsEN/l
xaZoJYc3a6M02WCnHl6ahT2/tBK2w1QI4YFteR47gCvtgb6O1JHffOo2HfLmRDRi
Rjd1DTCHqeyX7CHhcghj/dNRlW2Z0l5QFEcmV9U0Vhp3aFfWC4Ujfs3LU+hkAWzE
7zaD5cH9J7yv/6xuZVw411x0h4UqsTcWMu0iM1BzELqX1DY7LwoPEb/O9Rkbf4fm
Le11EzIaCa4PqARXQZc4dhSinMt6K3X4BrRsKTfozBu74F47D8Ilbf5vSYHbuE5p
/1oIDznkg/p8kW+3FxuWrycciqFTcNz215yyX39LXFnlLzKUb/F5GwADBQf+Lwqq
a8CGrRfsOAJxim63CHfty5mUc5rUSnTslGYEIOCR1BeQauyPZbPDsDD9MZ1ZaSaf
anFvwFG6Llx9xkU7tzq+vKLoWkm4u5xf3vn55VjnSd1aQ9eQnUcXiL4cnBGoTbOW
I39EcyzgslzBdC++MPjcQTcA7p6JUVsP6oAB3FQWg54tuUo0Ec8bsM8b3Ev42Lmu
QT5NdKHGwHsXTPtl0klk4bQk4OajHsiy1BMahpT27jWjJlMiJc+IWJ0mghkKHt92
6s/ymfdf5HkdQ1cyvsz5tryVI3Fx78XeSYfQvuuwqp2H139pXGEkg0n6KdUOetdZ
Whe70YGNPw1yjWJT1IhMBBgRAgAMBQI+PqMdBQkJZgGAAAoJEIxxjTtQcuH17p4A
n3r1QpVC9yhnW2cSAjq+kr72GX0eAJ4295kl6NxYEuFApmr1+0uUq/SlsQ==
=YJkx
-----END PGP PUBLIC KEY BLOCK-----
浣犲彲浠ヤ娇鐢gpg --import灏嗘瀯寤哄瘑閽ュ鍏ヤ綘鐨勪釜浜哄叕鍏GPG閽ュ寵鍦锛keyring锛銆備緥濡傦紝濡傛灉浣犳妸瀵嗛挜淇濆瓨鍒mysql_pubkey.asc鏂囦欢涓紝瀵煎叆鍛戒护搴斾负锛
shell> gpg --import mysql_pubkey.asc
鍏充簬鍏叡瀵嗛挜濡備綍宸ヤ綔鐨勮缁嗕俊鎭紝璇峰弬闃GPG鏂囨。銆
涓嬭浇骞跺鍏ュ叕鍏辨瀯寤哄瘑閽ュ悗锛屼笅杞芥湡鏈涚殑MySQL瀹夎杞欢鍖呭拰鐩稿簲鐨勭鍚嶏紝涔熷彲浠ヤ粠涓嬭浇椤典笂鑾峰緱銆傜鍚嶆枃浠跺悕涓庡垎鍙戠増鏂囦欢鐩稿悓锛屾湁 an .asc鎵╁睍鍚嶃備緥濡傦細
鍒嗗彂鏂囦欢 |
mysql-st鍜ard-5.1.2-alpha-linux-i686.tar.gz |
绛惧悕鏂囦欢 |
mysql-st鍜ard-5.1.2-alpha-linux-i686.tar.gz.asc |
纭繚涓や釜鏂囦欢淇濆瓨鍦ㄥ悓涓鐩綍涓嬶紝杩愯涓嬮潰鐨勫懡浠ゆ潵楠岃瘉鍒嗗彂鏂囦欢鐨勭鍚嶏細
shell> gpg --verify package_name.asc
绀轰緥锛
shell> gpg --verify mysql-standard-5.1.2-alpha-linux-i686.tar.gz.asc
gpg: Signature made Tue 12 Jul 2005 23:35:41 EST using DSA key ID 5072E1F5
gpg: Good signature from "MySQL Package signing key (www.mysql.com) <build@mysql.com>"
Good signature娑堟伅琛ㄧず鎵鏈夊唴瀹归兘寰堟纭備綘鍙互蹇界暐浠讳綍insecure memory璀﹀憡銆
RPM杞欢鍖呮病鏈夊崟鐙殑绛惧悕銆RPM杞欢鍖呭唴缃GPG绛惧悕鍜MD5鏍¢獙鍜屻傚彲浠ヨ繍琛屼笅闈㈢殑鍛戒护鏉ラ獙璇佸畨瑁呰蒋浠跺寘锛
shell> rpm --checksig package_name.rpm
绀轰緥锛
shell> rpm --checksig MySQL-server-5.1.2-alpha-0.i386.rpm
MySQL-server-5.1.2-alpha-0.i386.rpm锛 md5 gpg OK
娉ㄩ噴锛濡傛灉浣犳浣跨敤RPM 4.1锛屽苟涓斿嚭鐜板叧浜(GPG) NOT OK (MISSING KEYS: GPG#5072e1f5)鐨勬姳鎬紝灏界浣犲凡缁忓皢MySQL鍏叡鏋勫缓瀵嗛挜瀵煎叆鍒颁綘鑷繁鐨GPG閽ュ寵鍦堬紝浣犲繀椤婚鍏堝皢瀵嗛挜瀵煎叆鍒RPM閽ュ寵鍦堜腑銆RPM 4.1涓嶅啀浣跨敤浣犵殑涓汉GPG閽ュ寵鍦(鎴GPG鏈韩)銆RPM 4.1缁存姢鑷繁鐨勯挜鍖欏湀锛屽洜涓哄畠鏄郴缁熻寖鍥寸殑搴旂敤绋嬪簭锛岃岀敤鎴GPG鍏叡閽ュ寵鍦堟槸鍏蜂綋鐨勭敤鎴锋枃浠躲傝鎯冲皢MySQL鍏叡瀵嗛挜瀵煎叆RPM閽ュ寵鍦堬紝瑕侀鍏堣幏寰楀墠闈㈢珷鑺傛弿杩扮殑瀵嗛挜銆傜劧鍚庝娇鐢rpm --import瀵煎叆瀵嗛挜銆備緥濡傦紝濡傛灉浣犵殑鍏叡瀵嗛挜淇濆瓨鍦mysql_pubkey.asc鏂囦欢涓紝搴斾娇鐢ㄤ笅杩板懡浠ゅ鍏ュ叕鍏卞瘑閽ワ細
shell> rpm --import mysql_pubkey.asc
濡傛灉浣犻渶瑕佽幏寰MySQL鍏叡瀵嗛挜锛屽弬瑙2.1.4.2鑺傦紝鈥滈氳繃GnuPG杩涜绛惧悕妫鏌鈥銆
鍦Windows涓紝MySQL 5.1鐨勯粯璁ゅ畨瑁呯洰褰曟槸C:\Program Files\MySQL\MySQL Server 5.1銆(涓浜Windows鐢ㄦ埛瀹佹効瀹夎鍒板師鏉ョ殑榛樿瀹夎鐩綍 C锛\mysql銆傜劧鑰岋紝瀛愮洰褰曞竷灞浠嶇劧鐩稿悓锛銆瀹夎鐩綍鍖呮嫭浠ヤ笅瀛愮洰褰曪細
鐩綍 |
鐩綍鍐呭 |
bin |
瀹㈡埛绔▼搴忓拰mysqld鏈嶅姟鍣 |
data |
鏃ュ織鏂囦欢锛屾暟鎹簱 |
Docs |
鏂囨。 |
examples |
绀轰緥绋嬪簭鍜岃剼鏈 |
include |
鍖呭惈(澶)鏂囦欢 |
lib |
搴 |
scripts |
瀹炵敤宸ュ叿鑴氭湰 |
share |
閿欒娑堟伅鏂囦欢 |
浣跨敤MySQL AB's Linux RPM鍒嗗彂杩涜瀹夎鍚庯紝灏嗗湪浠ヤ笅绯荤粺鐩綍浜х敓鏂囦欢锛
鐩綍 |
鐩綍鍐呭 |
/usr/bin |
瀹㈡埛绔▼搴忓拰鑴氭湰 |
/usr/sbin |
mysqld鏈嶅姟鍣 |
/var/lib/mysql |
鏃ュ織鏂囦欢锛屾暟鎹簱 |
/usr/share/doc/packages |
鏂囨。 |
/usr/include/mysql |
鍖呭惈(澶)鏂囦欢 |
/usr/lib/mysql |
搴 |
/usr/share/mysql |
閿欒娑堟伅鍜屽瓧绗﹂泦鏂囦欢 |
/usr/share/sql-bench |
鍩哄噯绋嬪簭 |
鍦Unix涓紝鍙互鍦ㄤ綘閫夋嫨鐨勫畨瑁呬綅缃В鍘嬪苟瀹夎tar鏂囦欢浜岃繘鍒跺垎鍙(typically /usr/local/mysql)骞跺湪璇ヤ綅缃垱寤轰互涓嬬洰褰曪細
鐩綍 |
鐩綍鍐呭 |
bin |
瀹㈡埛绔▼搴忓拰mysqld鏈嶅姟鍣 |
data |
鏃ュ織鏂囦欢锛屾暟鎹簱 |
docs |
鏂囨。锛ChangeLog |
include |
鍖呭惈(澶)鏂囦欢 |
lib |
搴 |
scripts |
mysql_install_db |
share/mysql |
閿欒娑堟伅鏂囦欢 |
sql-bench |
鍩哄噯绋嬪簭 |
閰嶇疆骞剁紪璇戝畬婧愮爜鍒嗗彂鍚庯紝渚垮紑濮嬪畨瑁呫傞粯璁ゆ儏鍐典笅锛屽彲浠ュ皢鏂囦欢瀹夎鍒/usr/local锛屽嵆鍦ㄤ笅闈㈢殑瀛愮洰褰曚腑锛
鐩綍 |
鐩綍鍐呭 |
bin |
瀹㈡埛绔▼搴忓拰鑴氭湰 |
include/mysql |
鍖呭惈(澶)鏂囦欢 |
info |
Info鏍煎紡鐨勬枃妗 |
lib/mysql |
搴 |
libexec |
mysqld鏈嶅姟鍣 |
share/mysql |
閿欒娑堟伅鏂囦欢 |
sql-bench |
鍩哄噯绋嬪簭鍜crash-me娴嬭瘯 |
var |
鏁版嵁搴撳拰鏃ュ織鏂囦欢 |
鍦ㄤ竴涓畨瑁呯洰褰曞唴锛屾簮鐮佸畨瑁呯殑甯冨眬鍦ㄤ笅鍒楁柟闈笉鍚屼簬浜岃繘鍒跺畨瑁咃細
路 mysqld鏈嶅姟鍣ㄨ瀹夎鍦鈥libexec鈥鐩綍鑰屼笉鏄鈥bin鈥鐩綍鍐呫
路 鏁版嵁鐩綍鏄鈥var鈥鑰岄潪鈥data鈥銆
路 mysql_install_db琚畨瑁呭湪鈥bin鈥鐩綍鑰岄潪鈥scripts鈥鍐呫
路 澶存枃浠跺拰搴撶洰褰曟槸鈥include/mysql鈥鍜鈥lib/mysql鈥鑰岄潪鈥include鈥鍜鈥lib鈥銆
鎵ц婧愮爜鍒嗗彂鏍圭洰褰曚笅鐨scripts/make_binary_distribution鑴氭湰锛屼綘鍙互鐢ㄧ紪璇戣繃鐨勬簮鐮佸垎鍙戠増鍒涘缓浣犺嚜宸辩殑浜岃繘鍒跺畨瑁呫
鍚庨潰鍑犵珷鍖呮嫭濡備綍鍦ㄥ畨瑁呰蒋浠跺寘鏍煎紡閫傚悎鐨勫钩鍙颁笂骞冲彴瀹夎MySQL銆(鍗虫墽琛屸浜岃繘鍒跺畨瑁鈥濓級銆涔熷彲浠ュ湪澶氱骞冲彴涓婂畨瑁MySQL浜岃繘鍒跺垎鍙戠増銆傚叧浜庨傚悎鎵鏈夊钩鍙扮殑杞欢鍖呯殑閫氱敤瀹夎鎸囦护鍙傝2.7鑺傦紝鈥滃湪鍏跺畠绫籙nix绯荤粺涓畨瑁匨ySQL鈥銆
鍏充簬浜岃繘鍒跺垎鍙戠増鐨勪娇鐢ㄥ拰濡備綍鑾峰緱鐨勮缁嗕俊鎭鍙傝2.1鑺傦紝鈥滀竴鑸畨瑁呴棶棰樷銆
MySQL AB宸茬粡鎻愪緵浜Windows涓畨瑁呯殑MySQL 3.21浠ヤ笂鐗堟湰锛屽苟鎻愪緵浜嗘瘡澶╀笅杞MySQL鐨勬瘮鐜囥傛湰鑺傛弿杩板湪Windows涓畨瑁MySQL鐨勮繃绋嬨
浣跨敤Windows鐗堟湰MySQL瀹夎鍣紝缁撳悎GUI閰嶇疆鍚戝锛屽彲浠ヨ嚜鍔ㄥ畨瑁MySQL锛屽垱寤洪夐」鏂囦欢锛屽惎鍔ㄦ湇鍔″櫒骞朵娇榛樿鐢ㄦ埛璐︽埛瀹夊叏銆
濡傛灉浣犺鍗囩骇宸叉湁鐨4.1.5鐗堜互鍓嶇殑MySQL,浣犲繀椤绘墽琛屼互涓嬫楠わ細
1. 鑾峰緱骞跺畨瑁呭垎鍙戠増銆
2. 鏍规嵁闇瑕佽缃夐」鏂囦欢銆
3. 閫夋嫨鎯宠浣跨敤鐨勬湇鍔″櫒銆
4. 鍚姩鏈嶅姟鍣ㄣ
5. 涓哄垵濮MySQL璐︽埛鎸囧畾瀵嗙爜銆
璇ヨ繃绋嬭繕閫傚悎瀹夎杞欢鍖呭唴涓嶅寘鎷畨瑁呭櫒鐨MySQL瀹夎銆
Windows鐗MySQL 5.1鏈3绉嶅垎鍙戞牸寮忥細
路 浜岃繘鍒跺垎鍙戠増鍖呭惈涓涓缃▼搴忥紝鍙互瀹夎浣犻渶瑕佺殑浠讳綍鍐呭锛屽洜姝ゅ彲浠ョ珛鍗冲惎鍔ㄦ湇鍔″櫒銆
路 婧愮爜鍒嗗彂鐗堝寘鍚墍鏈変娇鐢Visual Studio 2003缂栬瘧鍣ㄦ潵鏋勫缓鍙墽琛岀▼搴忕殑浠g爜鍜屾敮鎸佹枃浠躲
涓鑸潵璁诧紝浣犲簲褰撲娇鐢ㄤ簩杩涘埗鍒嗗彂鐗堛傚畠姣斿叾瀹冪殑鍒嗗彂鐗堜娇鐢ㄨ捣鏉ヨ绠鍗曪紝涓嶅啀闇瑕佸叾瀹冨伐鍏锋潵鍚姩骞惰繍琛MySQL銆
鏈妭鎻忚堪浜嗗浣曚娇鐢ㄤ簩杩涘埗鍒嗗彂鐗堝湪Windows涓畨瑁MySQL銆傝鎯充娇鐢ㄦ簮鐮佸垎鍙戠増瀹夎锛屽弬瑙2.8.6鑺傦紝鈥滃湪Windows涓嬩粠婧愮爜瀹夎MySQL鈥銆
瑕佹兂鍦Windows涓繍琛MySQL锛屼綘闇瑕侊細
路 32浣Windows鎿嶄綔绯荤粺锛屼緥濡9x銆Me銆NT銆2000銆XP鎴Windows Server 2003銆
鍩轰簬Windows NT鐨勬搷浣滅郴缁(NT锛2000,XP锛2003)锛屽皢MySQL鏈嶅姟鍣ㄥ仛涓烘湇鍔℃潵杩愯銆傚己鐑堝缓璁娇鐢ㄥ熀浜Windows NT鐨勬搷浣滅郴缁熴傝鍙傝2.3.12鑺傦紝鈥滀互Windows鏈嶅姟鏂瑰紡鍚姩MySQL鈥銆
路 TCP/IP鍗忚鏀寔銆
路 Windows鐗堟湰MySQL浜岃繘鍒跺垎鍙戠増锛屽彲浠ヤ粠http锛//dev.mysql.com/涓嬭浇/涓嬭浇銆傝鍙傝2.1.3鑺傦紝鈥滄庢牱鑾峰緱MySQL鈥銆
娉ㄩ噴锛氬鏋滀綘浠FTP涓嬭浇鍒嗗彂鐗堬紝鎴戜滑寤鸿浣跨敤鍏呭垎鐨FTP瀹㈡埛绔互淇濊瘉缁紶锛岄伩鍏嶄笅杞借繃绋嬩腑鏂囦欢琚牬鍧忋
路 鍙互璇诲彇 .zip鏂囦欢鐨勫伐鍏凤紝浠ヨВ鍘嬪垎鍙戞枃浠躲
路 纭洏涓婃湁瓒冲鐨勭┖闂翠繚璇佹牴鎹綘鐨勯渶姹傛潵瑙e寘銆佸畨瑁呭拰鍒涘缓鏁版嵁搴(涓鑸缓璁嚦灏戞湁200鍏嗗瓧鑺)銆
浣犺繕鍙互鏈変互涓嬪彲閫夐渶姹傦細
路 濡傛灉浣犺鍒掗氳繃ODBC杩炴帴MySQL鏈嶅姟鍣紝浣犺繕闇瑕佷竴涓繛鎺ュ櫒/ODBC椹卞姩绋嬪簭銆傝鍙傝26.1鑺傦紝鈥淢ySQL Connector/ODBC鈥銆
路 濡傛灉琛ㄩ渶瑕佸崰鐢ㄧ殑绌洪棿澶т簬4GB锛屽垯鍦NTFS鎴栨洿鏂扮殑鏂囦欢绯荤粺涓婂畨瑁MySQL銆傚綋鍒涘缓琛ㄦ椂涓嶈蹇樿浣跨敤MAX_ROWS鍜 AVG_ROW_LENGTH銆傝鍙傝13.1.5鑺傦紝鈥淐REATE TABLE璇硶鈥銆
鍦Windows涓畨瑁MySQL鏃讹紝鏈3绉MySQL 5.1瀹夎杞欢鍖呭彲渚涢夋嫨锛
路 鍩烘湰瀹夎锛氳瀹夎杞欢鍖呯殑鏂囦欢鍚嶇被浼间簬mysql-essential-5.1.2-alpha-win32.msi锛屽寘鍚湪Windows涓畨瑁MySQL鎵闇瑕佺殑鏈灏戠殑鏂囦欢锛屽寘鎷厤缃悜瀵笺傝瀹夎杞欢鍖呬笉鍖呮嫭鍙夌粍浠讹紝渚嬪宓屽叆寮忔湇鍔″櫒鍜屽熀鍑嗗浠躲
路 瀹屽叏瀹夎锛氳瀹夎杞欢鍖呯殑鏂囦欢鍚嶇被浼间簬mysql-5.1.2-alpha-win32.zip锛屽寘鍚湪Windows涓畨瑁MySQL鎵闇瑕佺殑鍏ㄩ儴鏂囦欢锛屽寘鎷厤缃悜瀵笺傝瀹夎杞欢鍖呭寘鎷彲閫夌粍浠讹紝渚嬪宓屽叆寮忔湇鍔″櫒鍜屽熀鍑嗗浠躲
路 闈炶嚜鍔ㄥ畨瑁呮枃浠锛氳瀹夎杞欢鍖呯殑鏂囦欢鍚嶇被浼间簬mysql-noinstall-5.1.2-alpha-win32.zip锛屽寘鍚畬鏁村畨瑁呭寘涓殑鍏ㄩ儴鏂囦欢锛屽彧鏄笉鍖呮嫭閰嶇疆鍚戝銆傝瀹夎杞欢鍖呬笉鍖呮嫭鑷姩瀹夎鍣紝蹇呴』鎵嬪姩瀹夎鍜岄厤缃
瀵逛簬澶у鏁扮敤鎴凤紝寤鸿閫夋嫨鍩烘湰瀹夎銆
浣犵殑閫夋嫨浼氬奖鍝嶄綘鍚庨潰蹇呴』閬典粠鐨勫畨瑁呰繃绋嬨傚鏋滀綘閫夋嫨鍩烘湰瀹夎鎴栧畬鍏ㄥ畨瑁咃紝鍙傝2.3.3鑺傦紝鈥滅敤鑷姩瀹夎鍣ㄥ畨瑁匨ySQL鈥銆傚鏋滀綘閫夋嫨闈炶嚜鍔ㄥ畨瑁MySQL锛屽弬瑙2.3.6鑺傦紝鈥滈氳繃闈炲畨瑁匷ip鏂囦欢瀹夎MySQL鈥銆
MySQL瀹夎甯姪鏄MySQL鏈嶅姟鍣ㄧ殑瀹夎鍣紝浣跨敤鏈鏂扮殑Microsoft Window瀹夎鍣ㄦ妧鏈傜粨鍚堜娇鐢MySQL瀹夎甯姪鍜岄厤缃悜瀵硷紝鐢ㄦ埛瀹夎骞 閰嶇疆瀹MySQL鏈嶅姟鍣ㄥ悗渚垮彲浠ョ洿鎺ヤ娇鐢ㄣ
MySQL瀹夎甯姪鏄MySQL 5.1鏈嶅姟鍣ㄥ垎鍙戠殑鏍囧噯瀹夎鍣ㄣ備娇鐢MySQL瀹夎甯姪瀹夎MySQL涔嬪墠锛岀敤鎴烽渶瑕佹墜鍔ㄥ叧闂苟鍗歌浇宸茬粡瀹夎鐨勪互鍓嶇増鏈殑MySQL銆傚叧浜庡浠ュ墠鐗堟湰杩涜鍗囩骇鐨勮缁嗕俊鎭鍙傝 2.3.4.7鑺傦紝鈥滃崌绾ySQL鈥銆
鏈杩戠増鏈殑Windows鍖呭惈浜嗘敼杩涚増鏈殑Microsoft Windows瀹夎鍣(MSI)銆MSI宸茬粡鎴愪负Windows 2000銆Windows XP鍜Windows Server 2003搴旂敤绋嬪簭瀹夎鐨勪簨瀹炴爣鍑嗐MySQL瀹夎甯姪涓娇鐢ㄤ簡璇ユ妧鏈紝浣垮畨瑁呰繃绋嬫洿鍔犵伒娲汇侀『鍒┿
Microsoft Windows瀹夎鍣ㄥ紩鎿庨殢鐫Windows XP鐨勬洿鏂拌屾洿鏂帮紱浣跨敤浠ュ墠Windows鐗堟湰鐨勭敤鎴峰彲浠ュ弬鑰Microsoft 鐭ヨ瘑搴撴枃绔鏌ラ槄鍏充簬鍗囩骇鍒版渶鏂扮増Windows瀹夎鍣ㄥ紩鎿庣殑璧勬枡銆
姝ゅ锛Microsoft鏈杩戝凡缁忓紩鍏ヤ簡WiX(Windows 瀹夎鍣 XML)宸ュ叿鍖呫傝繖鏄Microsoft鍏鐨勫紑鏀炬簮鐮侀」鐩傛垜浠浆鎹㈠埌WiX鏄洜涓哄畠鏄竴涓紑鏀炬簮鐮侀」鐩紝鍙互浣跨敤鑴氭湰鏇村姞鐏垫椿鍦板鐞嗘暣涓Windows瀹夎杩囩▼銆
瀵MySQL瑁呭府鍔╃殑鏀硅繘渚濊禆浜庡悇鐢ㄦ埛鐨勬敮鎸佸拰鍙嶉銆傚鏋滀綘鍙戠幇MySQL瀹夎甯姪缂哄皯瀵逛綘寰堥噸瑕佺殑鏌愪簺鍔熻兘锛屾垨濡傛灉浣犲彂鐜版煇涓己闄凤紝璇蜂娇鐢ㄦ垜浠殑MySQL缂洪櫡绯荤粺鏉ョ储鍙栧姛鑳芥垨鎶ュ憡闂銆
鍙互浠http://dev.mysql.com/downloads/涓嬭浇MySQL鏈嶅姟鍣ㄥ畨瑁呰蒋浠跺寘銆傚鏋滀綘涓嬭浇鐨勫畨瑁呰蒋浠跺寘鍦Zip鏂囦欢涓紝浣犻渶瑕佸厛鎻愬彇鏂囦欢銆
鍚姩甯姪鐨勮繃绋嬪彇鍐充簬涓嬭浇鐨勫畨瑁呰蒋浠跺寘鐨勫唴瀹广傚鏋滄湁setup.exe鏂囦欢锛屽弻鍑诲惎鍔ㄥ畨瑁呰繃绋嬨傚鏋滄湁.msi鏂囦欢锛屽弻鍑诲惎鍔ㄥ畨瑁呰繃绋嬨
鏈3绉嶅畨瑁呯被鍨嬶細Typical(鍏稿瀷瀹夎)銆Complete(瀹屽叏瀹夎)鍜Custom(瀹氬埗瀹夎)銆
Typical(鍏稿瀷瀹夎)瀹夎鍙畨瑁MySQL鏈嶅姟鍣ㄣmysql鍛戒护琛屽鎴风鍜屽懡浠よ瀹炵敤绋嬪簭銆傚懡浠よ瀹㈡埛绔拰瀹炵敤绋嬪簭鍖呮嫭mysqldump銆myisamchk鍜屽叾瀹冨嚑涓伐鍏锋潵甯姪浣犵鐞MySQL鏈嶅姟鍣ㄣ
Complete(瀹屽叏瀹夎)瀹夎灏嗗畨瑁呰蒋浠跺寘鍐呭寘鍚殑鎵鏈夌粍浠躲傚畬鍏ㄥ畨瑁呰蒋浠跺寘鍖呮嫭鐨勭粍浠跺寘鎷祵鍏ュ紡鏈嶅姟鍣ㄥ簱銆佸熀鍑嗗浠躲佹敮鎸佽剼鏈拰鏂囨。銆
Custom(瀹氬埗瀹夎)瀹夎鍏佽浣犲畬鍏ㄦ帶鍒朵綘鎯宠瀹夎鐨勮蒋浠跺寘鍜屽畨瑁呰矾寰勩傚叧浜庡畾鍒跺畨瑁呯殑璇︾粏淇℃伅璇峰弬瑙2.3.4.4鑺傦紝鈥滃畾鍒跺畨瑁呭璇濇鈥銆
濡傛灉浣犻夋嫨Typical(鍏稿瀷瀹夎)鎴Complete(瀹屽叏瀹夎)瀹夎骞剁偣鍑 鎸夐挳锛屼綘灏嗚繘鍏ョ‘璁ょ獥鍙g‘璁ら夋嫨骞跺紑濮嬪畨瑁呫傚鏋滀綘閫夋嫨瀹氬埗瀹夎骞剁偣鍑 鎸夐挳锛屼綘灏嗚繘鍏ュ畾鍒跺畨瑁呭璇濇锛屽弬瑙2.3.4.4鑺傦紝鈥滃畾鍒跺畨瑁呭璇濇鈥銆
閫夋嫨浜嗗畨瑁呯被鍨嬪拰鍙夊畨瑁呯粍浠跺悗锛屽垯杩涘叆纭瀵硅瘽妗嗐傝瀵硅瘽妗嗕腑灏嗘樉绀哄畨瑁呯被鍨嬪拰瀹夎璺緞渚涙鏌ャ
濡傛灉浣犳弧鎰忚瀹氬艰鎯冲畨瑁MySQL锛岀偣鍑 鎸夐挳銆傝鎯虫洿鏀硅瀹氬硷紝鐐瑰嚮 鎸夐挳銆傝鎯抽鍑MySQL瀹夎甯姪涓嶅啀瀹夎 MySQL锛岀偣鍑 鎸夐挳銆
瀹屾垚瀹夎鍚庯紝灏嗗嚭鐜版敞鍐岄夐」鍜MySQL缃戝潃銆傛敞鍐屽悗渚垮彲浠ヨ闂forums.mysql.com澶勭殑MySQL璁哄潧锛屽彲浠ュ湪bugs.mysql.com鎶ュ憡缂洪櫡锛屽苟鍙互娉ㄥ唽涓烘椂浜嬫柊闂昏鎴枫傚湪瀹夎鍣ㄧ殑鏈鍚庝竴涓獥鍙e唴锛屾彁渚涗簡瀹夎鎽樿锛屽苟鎻愪緵閫夐」浠ュ惎鍔MySQL Configuration Wizard锛堥厤缃悜瀵硷級锛屽彲浠ョ敤鏉ュ垱寤洪厤缃枃浠讹紝瀹夎MySQL鏈嶅姟骞惰繘琛屽畨鍏ㄩ厤缃
鏇存敼娉ㄥ唽琛
鍦ㄥ吀鍨嬪畨瑁呬腑锛MySQL瀹夎甯姪鍦HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB鍒涘缓Windows娉ㄥ唽閿笺
MySQL瀹夎甯姪鏍规嵁姝e畨瑁呯殑鏈嶅姟鍣ㄧ殑涓昏鐗堟湰鍒涘缓涓涓敭鍊硷紝渚嬪 MySQL鏈嶅姟鍣5.1銆瀹冨寘鍚袱涓瓧绗︿覆鍊硷紝Location鍜Version銆Location瀛楃涓插寘鍚畨瑁呯洰褰曘傚湪榛樿瀹夎涓紝瀹冨寘鍚C:\Program Files\MySQL\MySQL Server 5.1\銆Version瀛楃涓插寘鍚彂甯冨彿銆備緥濡傦紝瀹夎MySQL Server 5.1.2-alpha锛岄敭鍊煎寘鍚竴涓5.1.2-alpha鍊笺
杩欎簺娉ㄥ唽閿肩敤鏉ュ府鍔╁閮ㄥ伐鍏疯瘑鍒MySQL鏈嶅姟鍣ㄧ殑瀹夎浣嶇疆锛屼笉闇瑕佹壂鎻忔暣涓‖鐩樻潵纭畾MySQL鏈嶅姟鍣ㄧ殑瀹夎璺緞銆傝繍琛屾湇鍔″櫒鏃朵笉闇瑕佹敞鍐岄敭鍊硷紝浣跨敤noinstall Zip鏂囦欢鏃朵笉鍒涘缓娉ㄥ唽閿笺
鏇存敼鍚姩鑿滃崟
MySQL瀹夎甯姪鍦Windows 鑿滃崟涓垱寤轰竴鏉℃柊鐨勬潯鐩紝浣跨敤MySQL鑿滃崟锛屾牴鎹畨瑁呯殑MySQL鐨勪富鐗堟湰鏉ュ懡鍚嶃備緥濡傦紝濡傛灉瀹夎浜MySQL 5.1, MySQL瀹夎甯姪鍦 鑿滃崟涓垱寤 閮ㄥ垎銆
灏嗗湪鏂
鑿滃崟閮ㄥ垎鍒涘缓涓嬮潰鐨勬潯鐩細路 锛氳繖鏄mysql鍛戒护琛屽鎴风鐨勫揩鎹锋柟寮忥紝瀵瑰叾杩涜閰嶇疆浠ヨ繛鎺ヤ负root鐢ㄦ埛銆傚綋杩炴帴鏃跺揩鎹锋柟寮忔彁绀鸿緭鍏root鐢ㄦ埛瀵嗙爜銆
路 锛氳繖鏄MySQL Configuration Wizard锛堥厤缃悜瀵硷級鐨勫揩鎹锋柟寮忋備娇鐢ㄨ蹇嵎鏂瑰紡鏉ラ厤缃柊瀹夎鐨勬湇鍔″櫒锛屾垨閲嶆柊閰嶇疆宸叉湁鐨勬湇鍔″櫒銆
路 锛氬彲浠ヨ繛鎺ュ埌淇濆瓨鍦MySQL鏈嶅姟鍣ㄥ畨瑁呯洰褰曚笅鐨勬枃妗c傞噰鐢ㄥ熀鏈畨瑁呮柟寮忓畨瑁MySQL鏈嶅姟鍣ㄦ椂锛岃閫夐」涓嶅彲鐢ㄣ
鏇存敼鏂囦欢绯荤粺
榛樿鎯呭喌涓嬶紝MySQL瀹夎甯姪灏MySQL 5.1鏈嶅姟鍣ㄥ畨瑁呭埌C:\Program Files\MySQL\MySQL Server 5.1锛屽叾涓Program Files鏄郴缁熷簲鐢ㄧ▼搴忕殑榛樿浣嶇疆锛5.1鏄MySQL鏈嶅姟鍣ㄧ殑涓昏鐗堟湰銆傝繖鏄缓璁殑MySQL鏈嶅姟鍣ㄧ殑鏂板畨瑁呬綅缃紝鏇挎崲浜嗗墠闈㈢殑榛樿浣嶇疆c锛\mysql銆
榛樿鎯呭喌涓嬶紝鎵鏈MySQL搴旂敤绋嬪簭淇濆瓨鍒扮洰褰C:\Program Files\MySQL涓嬶紝鍏朵腑Program Files鏄簲鐢ㄧ▼搴忓湪Windows涓殑榛樿瀹夎浣嶇疆銆傚紑鍙戞満鍣ㄤ笂鐨勫吀鍨MySQL瀹夎搴斾负锛
C:\Program Files\MySQL\MySQL Server 5.1
C:\Program Files\MySQL\MySQL Administrator 1.0
C:\Program Files\MySQL\MySQL Query Browser 1.0
璇ユ柟娉曚娇绠$悊鍜岀淮鎶ゅ叿浣撶郴缁熶笂瀹夎鐨MySQL搴旂敤绋嬪簭鏇村姞瀹规槗銆
浣跨敤MSI鐨勫崌绾у姛鑳斤紝MySQL瀹夎甯姪鍙互鑷姩鎵ц鏈嶅姟鍣ㄥ崌绾с傝繖鎰忓懗鐫瀹夎鏂扮増鏈墠锛屼笉闇瑕佹墜鍔ㄥ嵏杞藉墠闈㈠畨瑁呯殑绋嬪簭銆傚畨瑁呮柊鐗堟湰鍓嶏紝瀹夎鍣ㄨ嚜鍔ㄥ叧闂苟鍗歌浇鍓嶉潰瀹夎鐨MySQL鏈嶅姟銆
鍙湁鍦ㄤ富鐗堟湰鍙峰拰娆¤鐗堟湰鍙风浉鍚岀殑瀹夎涔嬮棿杩涜鍗囩骇鏃讹紝鎵嶈兘鑷姩杩涜鍗囩骇銆備緥濡傦紝鍙互鑷姩浠MySQL 4.1.5鍗囩骇鍒MySQL 4.1.6,浣嗘槸涓嶈兘浠MySQL 5.0鍗囩骇鍒MySQL 5.1銆
MySQL Configuration Wizard锛堥厤缃悜瀵硷級鍖呭惈鍦MySQL 5.1鏈嶅姟鍣ㄤ腑锛岀洰鍓嶅彧閫傜敤浜Windows鐢ㄦ埛銆
MySQL Configuration Wizard锛堥厤缃悜瀵硷級鍦ㄥ緢澶х▼搴︿笂鏄MySQL AB缁忚繃澶氬勾浠庤澶氱敤鎴锋敹鍒扮殑鍙嶉鐨勭粨鏋溿傜劧鑰岋紝濡傛灉浣犲彂鐜板畠缂哄皯鏌愪簺瀵逛綘寰堥噸瑕佺殑鍔熻兘锛屾垨濡傛灉浣犲彂鐜颁竴涓己闄凤紝璇蜂娇鐢ㄦ垜浠殑MySQL 缂洪櫡绯荤粺鏉ョ储鍙栧姛鑳芥垨鎶ュ憡闂銆
瑕佹兂閲嶆柊閰嶇疆宸叉湁鐨勬湇鍔″櫒锛岄夋嫨my.ini鏂囦欢閲嶆柊鍛藉悕涓mytimestamp.ini.bak锛屽叾涓timestamp鏄my.ini鏂囦欢鍒涘缓鏄殑鏃ユ湡鍜屾椂闂淬傝鎯冲嵏杞藉凡鏈夌殑鏈嶅姟鍣ㄥ疄渚嬶紝閫夋嫨 閫夐」骞剁偣鍑 鎸夐挳銆
閫夐」骞剁偣鍑 鎸夐挳銆傚凡鏈夌殑濡傛灉閫夋嫨浜MySQL Configuration Wizard锛堥厤缃悜瀵硷級鍋滄骞跺嵏杞MySQL鏈嶅姟锛岀劧鍚庡垹闄my.ini鏂囦欢銆傛湇鍔″櫒瀹夎鍜岃嚜宸辩殑data鏂囦欢澶逛笉鍒犻櫎銆
閫夐」锛屽垯杩涘叆纭绐楀彛銆傜偣鍑 鎸夐挳锛濡傛灉閫夋嫨浜
閫夐」锛屽垯杩涘叆閰嶇疆 瀵硅瘽妗嗭紝鍙互閫夋嫨浣犳兂瑕侀厤缃殑瀹夎绫诲瀷銆褰撳惎鍔MySQL Configuration Wizard锛堥厤缃悜瀵硷級閲嶆柊瀹夎MySQL锛屾垨涓哄凡鏈夊畨瑁呴夋嫨 閫夐」锛屽垯杩涘叆閰嶇疆 瀵硅瘽妗嗐
鍙互閫夋嫨涓ょ閰嶇疆绫诲瀷锛MySQL鑰屼笉蹇呰冭檻鏈嶅姟鍣ㄩ厤缃殑鏂扮敤鎴枫 閫夐」閫傚悎鎯宠鏇村姞缁嗙矑搴︽帶鍒舵湇鍔″櫒閰嶇疆鐨勯珮绾х敤鎴枫
鍜 銆 閫夐」閫傚悎鎯宠蹇熷惎鍔濡傛灉浣犳槸MySQL鐨勬柊鎵嬶紝闇瑕侀厤缃负鍗曠敤鎴峰紑鍙戞満鐨勬湇鍔″櫒锛 搴斿綋閫傚悎浣犵殑闇姹傘傞夋嫨 閫夐」锛屽垯 MySQL Configuration Wizard锛堥厤缃悜瀵硷級鑷姩璁剧疆鎵鏈夐厤缃夐」锛屼絾涓嶅寘鎷 鍜屽畨鍏 銆
MySQL鐨勭郴缁熶笉鍏煎銆傚鏋滅郴缁熶笂宸茬粡瀹夎浜MySQL鍜屼綘鎯宠閰嶇疆鐨勫畨瑁咃紝寤鸿閫夋嫨 銆
璁剧疆閫夐」鍙兘涓庡畨瑁 锛岃鍒嗗埆鍙傞槄路 锛氳閫夐」浠h〃鍏稿瀷涓汉鐢ㄦ闈㈠伐浣滅珯銆傚亣瀹氭満鍣ㄤ笂杩愯鐫澶氫釜妗岄潰搴旂敤绋嬪簭銆傚皢MySQL鏈嶅姟鍣ㄩ厤缃垚浣跨敤鏈灏戠殑绯荤粺璧勬簮銆
路 锛氳閫夐」浠h〃鏈嶅姟鍣紝MySQL鏈嶅姟鍣ㄥ彲浠ュ悓鍏跺畠搴旂敤绋嬪簭涓璧疯繍琛岋紝渚嬪FTP銆email鍜web鏈嶅姟鍣ㄣMySQL鏈嶅姟鍣ㄩ厤缃垚浣跨敤閫傚綋姣斾緥鐨勭郴缁熻祫婧愩
路 锛氳閫夐」浠h〃鍙繍琛MySQL鏈嶅姟鐨勬湇鍔″櫒銆傚亣瀹氳繍琛屾病鏈夎繍琛屽叾瀹冨簲鐢ㄧ▼搴忋MySQL鏈嶅姟鍣ㄩ厤缃垚浣跨敤鎵鏈夊彲鐢ㄧ郴缁熻祫婧愩
路 锛氶夋嫨璇ラ夐」锛屽垯鍚屾椂浣跨敤InnoDB鍜MyISAM鍌ㄥ瓨寮曟搸锛屽苟鍦ㄤ袱涓紩鎿庝箣闂村钩鍧囧垎閰嶈祫婧愩傚缓璁粡甯镐娇鐢ㄤ袱涓偍瀛樺紩鎿庣殑鐢ㄦ埛閫夋嫨璇ラ夐」銆
路 锛氳閫夐」鍚屾椂浣跨敤InnoDB鍜MyISAM 鍌ㄥ瓨寮曟搸锛屼絾鏄皢澶у鏁版湇鍔″櫒璧勬簮鎸囨淳缁InnoDB鍌ㄥ瓨寮曟搸銆傚缓璁富瑕佷娇鐢InnoDB鍙伓灏斾娇鐢MyISAM鐨勭敤鎴烽夋嫨璇ラ夐」銆
路 锛氳閫夐」瀹屽叏绂佺敤InnoDB鍌ㄥ瓨寮曟搸锛屽皢鎵鏈夋湇鍔″櫒璧勬簮鎸囨淳缁MyISAM鍌ㄥ瓨寮曟搸銆傚缓璁笉浣跨敤InnoDB鐨勭敤鎴烽夋嫨璇ラ夐」銆
瑕佹兂鏇存敼InnoDB琛ㄧ┖闂存枃浠剁殑榛樿浣嶇疆锛屼粠椹卞姩鍣ㄤ笅鎷夊垪琛ㄩ夋嫨涓涓柊鐨勯┍鍔ㄥ櫒锛屽苟浠庤矾寰勪笅鎷夊垪琛ㄩ夋嫨鏂扮殑璺緞銆傝鎯冲垱寤鸿矾寰勶紝鐐瑰嚮 鎸夐挳銆
濡傛灉浣犺鏇存敼宸叉湁鏈嶅姟鍣ㄧ殑閰嶇疆锛屾洿鏀硅矾寰勫墠浣犲繀椤荤偣鍑
鎸夐挳銆傛鏃跺惎鍔ㄦ湇鍔″櫒涔嬪墠锛屼綘蹇呴』灏嗗凡鏈夎〃绌洪棿鏂囦欢绉诲埌鏂颁綅缃路 锛氬鏋滄湇鍔″櫒涓嶉渶瑕佸ぇ閲忕殑骞惰杩炴帴鍙互閫夋嫨璇ラ夐」銆傚亣瀹氭渶澶ц繛鎺ユ暟鐩缃负100,骞冲潎骞惰杩炴帴鏁颁负20銆
路 锛氬鏋滀綘鐨勬湇鍔″櫒闇瑕佸ぇ閲忕殑骞惰杩炴帴鍒欓夋嫨璇ラ夐」銆傛渶澶ц繛鎺ユ暟璁剧疆涓500銆
路 锛氶夋嫨璇ラ夐」鍙互鎵嬪姩璁剧疆鏈嶅姟鍣ㄥ苟琛岃繛鎺ョ殑鏈澶ф暟鐩備粠鍓嶉潰鐨勪笅鎷夋涓夋嫨骞惰杩炴帴鐨勬暟鐩紝濡傛灉浣犳湡鏈涚殑鏁扮洰涓嶅湪鍒楄〃涓紝鍒欏湪涓嬫媺妗嗕腑杈撳叆鏈澶ц繛鎺ユ暟銆
路 锛氬鏋滄兂瑕佷娇鐢Latin1鍋氫负榛樿鏈嶅姟鍣ㄥ瓧绗﹂泦锛屽垯閫夋嫨璇ラ夐」銆Latin1鐢ㄤ簬鑻辫鍜岃澶氳タ娆ц瑷銆
路 锛氬鏋滄兂瑕佷娇鐢UTF8鍋氫负榛樿鏈嶅姟鍣ㄥ瓧绗﹂泦锛屽垯閫夋嫨璇ラ夐」銆UTF8鍙互 灏嗕笉鍚岃瑷鐨勫瓧绗﹀偍瀛樹负鍗曚竴鐨勫瓧绗﹂泦銆
路 锛 锛氬鏋滄兂瑕佹墜鍔ㄩ夋嫨鏈嶅姟鍣ㄧ殑榛樿瀛楃闆嗭紝璇烽夋嫨璇ラ」銆備粠涓嬫媺鍒楄〃涓夋嫨鏈熸湜鐨勫瓧绗﹂泦銆
鍦ㄥ熀浜Windows NT鐨勫钩鍙颁笂锛屽彲浠ュ皢MySQL鏈嶅姟鍣ㄥ畨瑁呮垚鏈嶅姟銆傚畨瑁呮垚鏈嶅姟锛岀郴缁熷惎鍔ㄦ椂鍙互鑷姩鍚姩MySQL鏈嶅姟鍣紝鐢氳嚦鍑虹幇鏈嶅姟鏁呴殰鏃跺彲浠ラ殢Windows鑷姩鍚姩銆
榛樿鎯呭喌锛MySQL Configuration Wizard锛堥厤缃悜瀵硷級灏MySQL鏈嶅姟鍣ㄥ畨瑁呬负鏈嶅姟锛屾湇鍔″悕涓MySQL銆傚鏋滀綘涓嶆兂瀹夎鏈嶅姟锛屽彇娑閫夐」鏃佽竟鐨勯夋嫨妗嗐傚彲浠ヤ粠涓嬫媺妗嗛夋嫨鏂扮殑鏈嶅姟鍚嶆垨鍦ㄤ笅鎷夋杈撳叆鏂扮殑鏈嶅姟鍚嶆潵鏇存敼鏈嶅姟鍚嶃
瑕佹兂灏MySQL鏈嶅姟鍣ㄥ畨瑁呬负鏈嶅姟锛屼絾鏄笉鑷姩鍚姩锛屼笉閫変腑 閫夐」鏃佽竟鐨勬鏌ユ銆
寮虹儓寤鸿涓轰綘鐨MySQL鏈嶅姟鍣ㄨ缃竴涓root瀵嗙爜锛岄粯璁ゆ儏鍐MySQL Configuration Wizard锛堥厤缃悜瀵硷級瑕佹眰浣犺缃竴涓root瀵嗙爜銆傚鏋滀綘涓嶆兂璁剧疆root瀵嗙爜锛屼笉閫変腑 閫夐」鏃佽竟鐨勯夋嫨妗嗐
瑕佹兂璁剧疆root瀵嗙爜锛屽湪 鍜 涓や釜妗嗗唴杈撳叆鏈熸湜鐨勫瘑鐮併傚鏋滈噸鏂伴厤缃凡鏈夌殑鏈嶅姟鍣紝浣犺繕闇瑕 妗嗗唴杈撳叆宸叉湁鐨root瀵嗙爜銆
瑕佹兂闃叉閫氳繃缃戠粶浠root鐧诲綍锛岄変腑 閫夐」鏃佽竟鐨勬銆傝繖鏍峰彲浠ユ彁楂root璐︽埛鐨勫畨鍏ㄣ
瑕佹兂鍒涘缓涓涓尶鍚嶇敤鎴疯处鎴凤紝閫変腑
閫夐」鏃佽竟鐨勬銆傚垱寤哄尶鍚嶈处鎴蜂細闄嶄綆鏈嶅姟鍣ㄧ殑瀹夊叏锛屽苟閫犳垚鐧诲綍鍜岃鍙洶闅俱傚洜姝や笉寤鸿銆鐐瑰嚮MySQL Configuration Wizard锛堥厤缃悜瀵硷級鎵ц涓绯诲垪鐨勪换鍔★紝鎵ц杩囩▼灏嗘樉绀哄湪灞忓箷涓娿
鎸夐挳鍚庯紝MySQL Configuration Wizard锛堥厤缃悜瀵硷級棣栧厛浣跨敤MySQL AB寮鍙戜汉鍛樺拰宸ョ▼甯堝噯澶囩殑妯℃澘鏍规嵁浣犵殑閫夋嫨纭畾閰嶇疆鏂囦欢閫夐」銆傝妯℃澘鐨勫悕绉颁负my-template.ini锛屼綅浜庢湇鍔″櫒瀹夎鐩綍涓
MySQL Configuration Wizard锛堥厤缃悜瀵硷級灏嗚繖浜涢夐」鍐欏叆鍒颁竴涓my.ini鏂囦欢涓my.ini鏂囦欢鐨勬渶缁堜綅缃樉绀哄湪鍐閰嶇疆鏂囦欢浠诲姟鐨勬梺杈广
濡傛灉閫夋嫨涓MySQL鏈嶅姟鍣ㄥ垱寤轰竴涓湇鍔★紝MySQL Configuration Wizard锛堥厤缃悜瀵硷級鍒欏垱寤哄苟鍚姩鏈嶅姟銆傚鏋滀綘閲嶆柊閰嶇疆宸叉湁鐨勬湇鍔★紝MySQL Configuration Wizard锛堥厤缃悜瀵硷級鍒欐牴鎹綘鐨勯厤缃洿鏀归噸鏂板惎鍔ㄦ湇鍔°
濡傛灉閫夋嫨璁剧疆root瀵嗙爜锛MySQL Configuration Wizard锛堥厤缃悜瀵硷級鍒欒繛鎺ユ湇鍔″櫒锛岃缃柊root瀵嗙爜骞跺簲鐢ㄤ綘閫夋嫨鐨勫叾瀹冨畨鍏ㄨ瀹氬笺
MySQL Configuration Wizard锛堥厤缃悜瀵硷級瀹屾垚浠诲姟鍚庯紝鍒欐樉绀轰竴涓瑕併傜偣鍑 鎸夐挳閫鍑MySQL Configuration Wizard锛堥厤缃悜瀵硷級銆
瑕佹兂纭繚MySQL鏈嶅姟鍣ㄧ煡閬撲粠鍝噷鏌ユ壘my.ini鏂囦欢锛屽嵆鍋氫负鏈嶅姟瀹夎鐨勪竴閮ㄥ垎浼犻掔粰MySQL鏈嶅姟鍣ㄧ殑閮ㄥ垎锛--defaults-file="C:\Program Files\MySQL\MySQL Server 5.1\my.ini"锛屽叾涓C:\Program Files\MySQL\MySQL Server 5.1 琚MySQL鏈嶅姟鍣ㄧ殑瀹夎璺緞鏇夸唬銆
--defaults-file鎸囧MySQL鏈嶅姟鍣ㄨ鍙栧叿浣撶殑閰嶇疆鏂囦欢銆
MySQL瀹㈡埛绔拰瀹炵敤绋嬪簭锛屼緥濡mysql鍛戒护琛屽鎴风鍜mysqldump涓嶈兘灏my.ini鏂囦欢鏀惧埌鏈嶅姟鍣ㄥ畨瑁呯洰褰曚腑銆傝鎯抽厤缃鎴风鍜屽疄鐢ㄥ伐鍏凤紝鏍规嵁Windows 鐗堟湰锛屽湪C锛\Windows鎴C锛\WINNT鐩綍涓嬪垱寤轰竴涓柊鐨my.ini鏂囦欢銆
鎯充娇鐢ㄩ潪鑷姩瀹夎鍖呯殑鐢ㄦ埛鍙互浣跨敤鏈妭鐨勬寚浠ゆ墜鍔ㄥ畨瑁MySQL銆備粠Zip鏂囨。瀹夎MySQL鐨勮繃绋嬩负锛
1. 灏嗘枃妗f彁鍙栧埌鏈熸湜鐨勫畨瑁呯洰褰曚腑銆
2. 鍒涘缓涓涓夐」鏂囦欢銆
3. 閫夋嫨MySQL鏈嶅姟鍣ㄧ被鍨嬨
4. 鍚姩MySQL鏈嶅姟鍣ㄣ
5. 浣块粯璁ょ敤鎴疯处鎴峰畨鍏ㄣ
涓嬮潰涓鑺傛弿杩颁簡璇ヨ繃绋嬨
瑕佹兂鎵嬪姩瀹夎MySQL锛屽叾姝ラ涓猴細
1. 濡傛灉浣犱粠浠ュ墠鐨勭増鏈崌绾э紝寮濮嬪崌绾ц繃绋嬪墠璇峰弬闃2.3.15鑺傦紝鈥滃湪Windows涓嬪崌绾ySQL鈥銆
2. 濡傛灉浣犱娇鐢ㄥ熀浜Windows NT鐨勬搷浣滅郴缁燂紝渚嬪Windows NT銆Windows 2000銆Windows XP鎴Windows Server 2003,纭繚鐧诲綍鐨勭敤鎴峰悕鍏锋湁绠$悊鍛樻潈闄愩
3. 閫夋嫨瀹夎浣嶇疆銆備紶缁熷畨瑁呬腑MySQL鏈嶅姟鍣ㄥ畨瑁呭埌C锛\mysql锛MySQL Installation Wizard锛堝畨瑁呭府鍔╋級灏MySQL瀹夎鍒C:\Program Files\MySQL銆傚鏋滀綘涓嶆兂灏MySQL瀹夎鍒C锛\mysql锛屼綘蹇呴』鍦ㄥ惎鍔ㄨ繃绋嬫垨鍦ㄩ夐」鏂囦欢涓寚瀹氬畨瑁呯洰褰曠殑璺緞銆傝鍙傝2.3.8鑺傦紝鈥滃垱寤洪夐」鏂囦欢鈥銆
4. 浣跨敤zip鏂囦欢宸ュ叿锛屽皢瀹夎鏂囦欢鎻愬彇鍒伴夊畾鐨勫畨瑁呬綅缃備娇鐢ㄦ煇浜涘伐鍏凤紝鍙互灏嗘枃妗f彁鍙栧埌閫夋嫨鐨勫畨瑁呬綅缃殑鏂囦欢澶逛腑銆傚湪杩欑鎯呭喌涓嬶紝浣犲彲浠ュ皢瀛愭枃浠跺す涓殑鍐呭绉诲姩鍒伴夋嫨鐨勫畨瑁呬綅缃
路 瀹夎鎴栨暟鎹洰褰曚綅缃笉鏄粯璁や綅缃(C:\Program Files\MySQL\MySQL Server 5.1鍜C:\Program Files\MySQL\MySQL Server 5.1\data)銆
路 闇瑕佽皟鑺傛湇鍔″櫒璁惧畾鍊笺
妗MySQL鏈嶅姟鍣ㄥ湪Windows涓惎鍔ㄦ椂锛屽畠浠庝袱涓枃浠朵腑瀵绘壘閫夐」锛Windows鐩綍涓殑my.ini鏂囦欢鍜C锛\my.cnf 鏂囦欢銆Windows鐩綍鍏稿瀷鍚嶇О涓C锛\WINDOWS鎴C锛\WINNT銆傚彲浠ヤ娇鐢ㄤ笅闈㈢殑鍛戒护浠WINDIR鐜鍙橀噺鍊肩‘瀹氳嚜宸辩殑纭垏浣嶇疆锛
C锛\> echo %WINDIR%
MySQL棣栧厛浠my.ini鏂囦欢涓鎵鹃夐」锛岀劧鍚庝粠my.cnf鏂囦欢涓鎵俱備负浜嗛伩鍏嶆贩娣嗭紝鏈濂藉彧浣跨敤涓涓枃浠躲傚鏋滀綘鐨PC浣跨敤浜嗕竴涓紩瀵煎姞杞藉櫒锛屽叾涓C锛涓嶆槸寮曞鐩橈紝鍞竴鐨勯夊垯鏄娇鐢my.ini鏂囦欢銆備笉绠′綘浣跨敤鍝釜閫夐」鏂囦欢锛屽繀椤讳负绾枃鏈枃浠躲
杩樺彲浠ヤ娇鐢MySQL鍒嗗彂涓殑绀轰緥閫夐」鏂囦欢銆傚湪瀹夎鐩綍涓煡鎵句互涓嬫枃浠讹細my-small.cnf銆my-medium.cnf銆my-large.cnf鍜my-huge.cnf锛屼綘鍙互閲嶆柊鍛藉悕骞跺鍒跺埌鐩稿簲浣嶇疆鐢ㄤ綔鍩烘湰閰嶇疆鏂囦欢銆
鍙互鐢ㄤ换浣曟枃鏈紪杈戝櫒鏉ュ垱寤哄苟淇敼閫夐」鏂囦欢锛屼緥濡傝浜嬫湰銆備緥濡傦紝濡傛灉MySQL瀹夎鍦E锛\mysql锛鏁版嵁鐩綍瀹夎鍦E:\mydata\data锛屼綘鍙互 鍒涘缓鍚湁[mysqld]閮ㄥ垎鐨勯夐」鏂囦欢锛屾寚瀹basedir鍜datadir鍙傛暟鐨勫硷細
[mysqld]
# set basedir to your installation path
basedir=E:/mysql
# set datadir to the location of your data directory
datadir=E:/mydata/data
璇锋敞鎰忓湪閫夐」鏂囦欢涓娇鐢ㄦ鏂滅嚎鍎夸笉鏄弽鏂滅嚎鎸囧畾Windows璺緞鍚嶃傚鏋滀娇鐢ㄥ弽鏂滅嚎锛屽繀椤荤敤鍙屽弽鏂滅嚎锛
[mysqld]
# set basedir to your installation path
basedir=E:\\mysql
# set datadir to the location of your data directory
datadir=E:\\mydata\\data
鍦Windows涓嬶紝MySQL瀹夎鍣ㄥ皢鏁版嵁鐩綍鐩存帴鏀惧埌瀹夎MySQL鐨勭洰褰曚笅銆傚鏋滀綘鎯宠浣跨敤鍏跺畠浣嶇疆鐨勬暟鎹洰褰曪紝搴斿綋灏data鐩綍涓殑鍏ㄩ儴鍐呭澶嶅埗鍒版柊鐨勭洰褰曚笅銆備緥濡傦紝濡傛灉MySQL瀹夎鍒C:\Program Files\MySQL\MySQL Server 5.1涓紝鏁版嵁鐩綍榛樿鍦C:\Program Files\MySQL\MySQL Server 5.1\data銆傚鏋滄兂瑕佷娇鐢E:\mydata鍋氫负鏁版嵁鐩綍锛屼綘蹇呴』鍋氫袱浠朵簨鎯咃細
1. 灏嗘暣涓data鐩綍鍜屽叏閮ㄥ唴瀹逛粠C:\Program Files\MySQL\MySQL Server 5.1\data绉诲姩鍒E:\mydata銆
2. 姣忔鍚姩鏈嶅姟鍣ㄦ椂锛屼娇鐢--datadir閫夐」鏉ユ寚瀹氭柊鐨勬暟鎹洰褰曘
涓嬮潰鐨勮〃鏄剧ず浜Windows涓嬪彲鐢ㄧ殑MySQL 5.1鏈嶅姟鍣細
浜岃繘鍒 |
鎻忚堪 |
mysqld- debug |
宸茬粡缂栬瘧杩囷紝鍙互杩涜瀹屽叏璋冭瘯鍜岃嚜鍔ㄥ唴瀛樺垎閰嶆鏌ワ紝鐢ㄤ簬琛InnoDB鍜BDB銆 |
mysqld |
浼樺寲鐨勪簩杩涘埗锛屾敮鎸InnoDB銆 |
mysqld-nt |
浼樺寲鐨勪簩杩涘埗锛屾敮鎸Windows NT锛2000 XP锛屾湁鍛藉悕绠¢亾銆 |
mysqld-max |
浼樺寲鐨勪簩杩涘埗锛屾敮鎸InnoDB鍜BDB琛ㄣ |
mysqld-max-nt |
鍚mysqld-max锛屼絾鏄凡缁忕紪璇戣繃锛屾敮鎸佸懡鍚嶇閬撱 |
宸茬粡瀵规墍鏈夊墠闈㈢殑浜岃繘鍒惰繘琛屼簡浼樺寲浠ラ傜敤鐜颁唬Intel澶勭悊鍣紝浣嗘槸搴斿綋宸ヤ綔鍦Intel i386-绫绘垨鏇撮珮鐨勫鐞嗗櫒涓娿
鎵鏈Windows MySQL 5.1鏈嶅姟鍣ㄦ敮鎸佹暟鎹簱鐩綍绗﹀彿閾炬帴銆
MySQL鏀寔鎵鏈Windows骞冲彴鐨TCP/IP銆mysqld-nt鍜mysql-max-nt鏈嶅姟鍣ㄦ敮鎸Windows NT銆2000銆XP鍜2003鐨勫懡鍚嶇閬撱傜劧鑰岋紝鍦ㄦ墍鏈夊钩鍙颁笅榛樿浣跨敤TCP/IP銆(鍦ㄨ澶Windows閰嶇疆涓紝鍛藉悕绠¢亾姣TCP/IP鎱級銆
鍛藉悕绠¢亾鍦ㄤ互涓嬫潯浠朵笅浣跨敤锛
路 濡傛灉浣跨敤--enable-named-pipe閫夐」鍚姩鏈嶅姟鍣紝鍒欏惎鐢ㄤ簡鍛藉悕绠¢亾銆傞渶瑕佹槑纭娇鐢ㄨ閫夐」锛屽洜涓哄綋浣跨敤鍛藉悕绠¢亾鍏抽棴MySQL鏈嶅姟鍣ㄦ椂锛屾煇浜涚敤鎴蜂細閬囧埌闂銆
路 鍙湁mysqld-nt鎴mysqld-max-nt鏈嶅姟鍣紝骞朵笖鏈嶅姟鍣ㄨ繍琛屽湪鏀寔鍛藉悕绠¢亾鐨Windows鐗堟湰(NT銆2000銆XP銆2003)锛屾墠鑳藉浣跨敤鍛藉悕绠¢亾杩炴帴銆
路 杩欎簺鏈嶅姟鍣ㄥ彲浠ヨ繍琛屽湪Windows 98 鎴Me涓紝浣嗘槸蹇呴』瀹夎TCP/IP鍗忚锛涙鏃朵笉鍙互浣跨敤鍛藉悕绠¢亾杩炴帴銆
路 杩欎簺鏈嶅姟鍣ㄤ笉鑳藉湪Windows 95涓繍琛屻
娉ㄩ噴锛鍙傝冩墜鍐屼腑鐨勫ぇ澶氭暟渚嬪瓙浣跨敤mysqld鍋氫负鏈嶅姟鍣ㄥ悕銆傚鏋滀綘閫夋嫨浣跨敤涓嶅悓鐨勬湇鍔″櫒锛屼緥濡mysqld-nt锛屽垯鍦ㄧ浉搴斾緥瀛愪腑鐨勫懡浠や腑杩涜鐩稿簲鐨勬浛鎹€
鏈妭涓殑淇℃伅涓昏閫傜敤閫夋嫨NoinstallMySQL瀹夎鐗堟湰锛屾垨鎯宠鎵嬪姩閰嶇疆鍜屾祴璇MySQL鑰屼笉鐢GUI宸ュ叿鐨勬儏鍐点
鍦Windows 95,98,鎴Me涓紝MySQL瀹㈡埛绔讳娇鐢TCP/IP杩炴帴鏈嶅姟鍣ㄣ(杩欐牱鍏佽缃戠粶涓殑鎵鏈夋満鍣ㄨ繛鎺MySQL鏈嶅姟鍣級銆鍥犳锛屽湪鍚姩MySQL涔嬪墠锛屼綘蹇呴』纭繚鏈哄櫒鏀寔TCP/IP銆傚彲浠ヤ粠Windows CD-ROM涓壘鍒TCP/IP銆
璇锋敞鎰忓鏋滀娇鐢ㄦ棫鐗堟湰鐨Windows 95(渚嬪锛OSR2)锛屽緢鍙兘浣犱娇鐢ㄤ簡鏃х殑Winsock鍖咃紱MySQL闇瑕Winsock 2銆傚彲浠ヤ粠http://www.microsoft.com/鑾峰緱鏈鏂扮殑Winsock銆Windows 98鍖呭惈鏂扮殑Winsock 2搴擄紝鍥犳涓嶉渶瑕佹洿鏂板簱銆
鍦ㄥ熀浜NT鐨勭郴缁熶腑锛屼緥濡 Windows NT銆2000銆XP鎴2003,瀹㈡埛绔彲浠ユ湁涓や釜閫夋嫨銆傚彲浠ヤ娇鐢TCP/IP锛屽鏋滄湇鍔″櫒鏀寔鍛藉悕绠¢亾杩炴帴锛屼篃鍙互浣跨敤鍛藉悕绠¢亾銆傝鎯充娇MySQL浣跨敤Windows NT 4涓殑TCP/IP,浣犲繀椤诲畨瑁呮湇鍔pack 3(鎴栨洿鏂扮殑琛ヤ竵)銆
濡傛灉鐢--shared-memory閫夐」鍚姩锛Windows鐗MySQL杩樻敮鎸佸叡浜唴瀛樿繛鎺ャ傚鎴风鍙互閫氳繃--protocol=memory閫夐」閫氳繃鍏变韩鍐呭瓨杩涜杩炴帴銆
鍏充簬杩愯鍝釜鏈嶅姟鍣ㄤ簩杩涘埗鐨勪俊鎭紝鍙傝2.3.9鑺傦紝鈥滈夋嫨MySQL鏈嶅姟鍣ㄧ被鍨嬧銆
鏈妭瀵MySQL鏈嶅姟鍣ㄥ惎鍔ㄨ繘琛屼簡姒傝堪銆備笅闈㈢珷鑺傝缁嗚鏄庝簡浠庡懡浠よ鎴Windows 鏈嶅姟鍚姩MySQL鏈嶅姟鍣ㄧ殑鍏蜂綋淇℃伅銆
杩欎簺绔犺妭鐨勪緥瀛愬亣瀹MySQL瀹夎鍒伴粯璁や綅缃C:\Program Files\MySQL\MySQL Server 5.1銆濡傛灉浣犲皢MySQL瀹夎鍒颁簡鍏跺畠浣嶇疆锛屽垯瑕佹洿鏀逛緥瀛愪腑鐨勮矾寰勫悕銆
鍦ㄦ帶鍒跺彴绐楀彛(鎴栤DOS window鈥)涓紝鏈濂芥牴鎹懡浠ゆ彁绀鸿繘琛屾祴璇曘傝繖鏍峰彲浠ヨ鏈嶅姟鍣ㄥ湪window涓鏄撶湅瑙佺殑鍦版柟鏄剧ず鐘舵佹秷鎭傚鏋滈厤缃嚭鐜伴敊璇紝閫氳繃杩欎簺娑堟伅锛屽彲浠ユ洿瀹规槗鍦拌瘑鍒苟淇闂銆
瑕佹兂鍚姩鏈嶅姟鍣紝杈撳叆鍛戒护锛
C锛\> C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld --console
鏀寔InnoDB鐨勬湇鍔″櫒鍚姩鏃讹紝浣犲簲褰撹兘鐪嬭涓嬮潰鐨勬秷鎭細
InnoDB: The first specified datafile c:\ibdata\ibdata1 did not exist:
InnoDB: a new database to be created锛
InnoDB: Setting file c:\ibdata\ibdata1 size to 209715200
InnoDB: Database physically writes the file full: wait...
InnoDB: Log file c:\iblogs\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file c:\iblogs\ib_logfile0 size to 31457280
InnoDB: Log file c:\iblogs\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file c:\iblogs\ib_logfile1 size to 31457280
InnoDB: Log file c:\iblogs\ib_logfile2 did not exist: new to be created
InnoDB: Setting log file c:\iblogs\ib_logfile2 size to 31457280
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: creating foreign key constraint system tables
InnoDB: foreign key constraint system tables created
011024 10:58:25 InnoDB: Started
鏈嶅姟鍣ㄥ畬鎴愬惎鍔ㄥ簭鍒楀悗锛屼綘搴斿綋鑳界湅瑙佷笅杩板唴瀹癸紝琛ㄧず鏈嶅姟鍣ㄥ噯澶囧ソ锛屽彲浠ヨ繘琛屽鎴风杩炴帴锛
mysqld: ready for connections
Version: '5.1.2-alpha' socket: '' port: 3306
鏈嶅姟鍣ㄧ户缁悜鎺у埗鍙板啓鍏ヨ瘖鏂緭鍑恒備綘鍙互鎵撳紑鏂扮殑鎺у埗鍙扮獥鍙h繍琛屽鎴风绋嬪簭銆
濡傛灉鐪佺暐--console閫夐」锛屾湇鍔″櫒鍚戞暟鎹洰褰(榛樿涓C:\Program Files\MySQL\MySQL Server 5.1\data)涓殑閿欒鏃ュ織鍐欏叆璇婃柇杈撳嚭銆傞敊璇棩蹇楁枃浠剁殑鎵╁睍鍚嶄负.err銆
娉ㄩ噴锛MySQL鎺堟潈琛ㄤ腑鐨勮处鎴蜂竴寮濮嬫病鏈夊瘑鐮併傛湇鍔″櫒鍚姩鍚庯紝浣犲簲褰撴牴鎹2.9鑺傦紝鈥滃畨瑁呭悗鐨勮缃拰娴嬭瘯鈥涓殑璇存槑璁剧疆瀵嗙爜銆
鍙互浠庡懡浠よ鎵嬪姩鍚姩MySQL鏈嶅姟鍣ㄣ傚彲浠ュ湪浠讳綍鐗堟湰鐨Windows涓疄鐜般
瑕佹兂浠庡懡浠よ鍚姩mysqld鏈嶅姟鍣紝浣犲簲褰撳惎鍔ㄦ帶鍒跺彴绐楀彛(鎴栤DOS window鈥)骞惰緭鍏ュ懡浠わ細
C锛\> C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld
鏍规嵁绯荤粺涓MySQL瀹夎浣嶇疆鐨勪笉鍚岋紝鍓嶉潰鐨勪緥瀛愪腑浣跨敤鐨勮矾寰勪篃涓嶅悓銆
鍦ㄩ潪NT鐗堟湰鐨Windows涓紝鍦ㄥ悗鍙板惎鍔mysqld銆備篃灏辨槸锛屾湇鍔″櫒鍚姩鍚庯紝浣犲簲褰撳彲浠ョ湅瑙佸悗闈㈢殑鍛戒护鎻愮ず銆傚鏋滀綘鐢ㄨ鏂规硶鍦Windows NT銆2000銆XP鎴2003涓惎鍔ㄦ湇鍔″櫒锛屾湇鍔″櫒鍒欏湪鍓嶅彴杩愯锛屽湪鏈嶅姟鍣ㄩ鍑哄墠锛屼笉浼氬嚭鐜板懡浠ゆ彁绀恒傚洜姝わ紝褰撴湇鍔″櫒杩愯鏃讹紝搴斿綋鎵撳紑鍙︿竴涓帶鍒跺彴绐楀彛鏉ヨ繍琛屽鎴风绋嬪簭銆
涓嬭堪鍛戒护鍙互鍋滄MySQL鏈嶅姟鍣細
C锛\> C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqladmin -u root shutdown
璇ュ懡浠よ皟鐢MySQL绠$悊宸ュ叿mysqladmin杩炴帴鏈嶅姟鍣ㄥ苟鍛婄煡瀹冨叧闂湇鍔°傝鍛戒护浣跨敤MySQL root鐢ㄦ埛杩炴帴锛岃繖鏄MySQL鏉冮檺绯荤粺涓殑榛樿绠$悊璐︽埛銆傝娉ㄦ剰MySQL鏉冮檺绯荤粺涓殑鐢ㄦ埛瀹屽叏鐙珛浜Windows涓嬬殑鐧诲綍鐢ㄦ埛銆
濡傛灉mysqld涓嶈兘鍚姩锛屾鏌ラ敊璇棩蹇楃湅鐪嬫湇鍔″櫒鏄惁鍐欏叆浜嗘樉绀洪棶棰樺師鍥犵殑浠讳綍娑堟伅銆傞敊璇棩蹇椾綅浜C:\Program Files\MySQL\MySQL Server 5.1\data鐩綍涓傛槸甯﹀悗缂.err鐨勬枃浠躲傝繕鍙互灏濊瘯灏嗘湇鍔″櫒鍚姩涓mysqld --console锛涙鏃讹紝鍙互浠庣獥鍙d腑鑾峰緱涓浜涙湁鐢ㄧ殑淇℃伅锛屽彲浠ュ府鍔╄В鍐抽棶棰樸
鏈鍚庨夐」鏄敤--standalone --debug鍚姩mysqld銆傛鏃讹紝mysqld 鍐欏叆鏃ュ織鏂囦欢C锛\mysqld.trace锛搴斿綋鍖呭惈mysqld涓嶅惎鍔ㄧ殑鍘熷洜銆傝鍙傝E.1.2鑺傦紝鈥滃垱寤鸿窡韪枃浠垛銆
浣跨敤mysqld --verbose --help鏄剧ずmysqld鐨勬墍鏈夐夐」銆
鍦NT瀹舵棌 (Windows NT锛2000,XP锛2003)涓紝寤鸿灏MySQL瀹夎涓Windows鏈嶅姟锛屽綋Windows鍚姩銆佸仠姝㈡椂锛MySQL涔熻嚜鍔ㄥ惎鍔ㄣ佸仠姝€傝繕鍙互浠庡懡浠よ浣跨敤NET鍛戒护锛屾垨浣跨敤鍥惧舰Services宸ュ叿鏉ユ帶鍒AMySQL鏈嶅姟鍣ㄣ
鍦Windows鎺у埗闈㈡澘(Windows 2000,XP鍜Server 2003鐨)涓彲浠ョ湅瑙Services宸ュ叿(Windows Service Control Manager)銆寤鸿浠庡懡浠よ瀹夎娲诲嵏杞芥湇鍔″櫒鏃跺叧闂Services宸ュ叿銆傝繖鏍峰彲浠ラ槻姝㈣澶氶敊璇
瀹夎MySQL Windows鏈嶅姟涔嬪墠锛屽簲褰撲娇鐢ㄤ笅闈㈢殑鍛戒护鍏堝仠姝㈠綋鍓嶆杩愯鐨勬湇鍔″櫒锛
C锛\> C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqladmin -u root shutdown
娉ㄩ噴锛濡傛灉MySQL root鐢ㄦ埛璐︽埛鏈夊瘑鐮侊紝浣犻渶瑕佽皟鐢ㄥ懡浠 C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqladmin -u root -p shutdown骞舵牴鎹彁绀鸿緭鍏ュ瘑鐮併
璇ュ懡浠よ皟鐢MySQL绠$悊宸ュ叿mysqladmin锛岃繛鎺ユ湇鍔″櫒骞跺憡鐭ュ畠鍏抽棴鏈嶅姟銆傝鍛戒护浣跨敤MySQL root鐢ㄦ埛杩炴帴锛岃繖鏄MySQL鏉冮檺绯荤粺涓殑榛樿绠$悊璐︽埛銆傝娉ㄦ剰MySQL鏉冮檺绯荤粺涓殑鐢ㄦ埛瀹屽叏鐙珛浜Windows涓嬬殑鐧诲綍鐢ㄦ埛銆
浣跨敤璇ュ懡浠ゅ畨瑁呮湇鍔″櫒
C锛\> mysqld --install
濡傛灉鍙娇鐢ㄦ湇鍔″櫒鍚嶅畨瑁mysqld鏃舵湁闂锛屽皾璇曚娇鐢ㄥ叏璺緞鍚嶆潵瀹夎銆備緥濡傦細
C锛\> C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld --install
浣犺繕鍙互灏MySQL bin鐩綍鐨勮矾寰勫姞鍒Windows绯荤粺PATH鐜鍙橀噺涓細
路 鍙冲嚮Windows妗岄潰涓婄殑My Computer锛堟垜鐨勮绠楁満锛鍥炬爣锛岄夋嫨
路 鐒跺悗浠庡嚭鐜扮殑 鑿滃崟涓夋嫨 锛岀劧鍚庣偣鍑 锛 鎸夐挳銆
路 閫夋嫨System Variables锛绯荤粺鍙橀噺锛変笅闈㈢殑 锛岀劧鍚庣偣鍑 锛 鎸夐挳銆傚皢寮瑰嚭 瀵硅瘽妗嗐
路 灏嗗厜鏍囨斁鍒版爣璁Variable Value锛鍙橀噺鍊硷級澶勭殑鏂囨湰鐨勫悗闈€(浣跨敤End閿‘淇濆厜鏍囦綅浜庢枃鏈殑鏈鍚)銆傜劧鍚庤緭鍏MySQL bin鐩綍 鐨勫畬鏁磋矾寰(渚嬪锛C:\Program Files\MySQL\MySQL Server 5.1\bin)锛岃娉ㄦ剰搴斾娇鐢ㄥ垎鍙峰皢璇ヨ矾寰勪笌璇ュ煙鍐呯殑鍏跺畠鍊奸殧绂诲紑銆備竴娆″叧闂瀵硅瘽妗嗗拰鍚勪釜瀵硅瘽妗嗭紝鐐瑰嚮 鐩村埌鎵撳紑鐨勬墍鏈夊璇濇琚叧闂備綘鐜板湪鍙互鍦DOS鎻愮ず绗︿笅浠庣郴缁熺殑浠讳綍鐩綍杈撳叆MySQL鍙墽琛岀▼搴忓悕鏉ヨ皟鐢MySQL鍙墽琛岀▼搴忥紝鑰屼笉蹇呮彁渚涜矾寰勫悕銆傚寘鎷湇鍔″櫒銆MySQL瀹㈡埛绔拰鎵鏈MySQL鍛戒护琛屽疄鐢ㄧ▼搴忥紝渚嬪mysqladmin鍜mysqldump銆
路 璇锋敞鎰忓湪鍚屼竴涓満鍣ㄤ笂杩愯澶氫釜MySQL鏈嶅姟鍣ㄦ椂锛屼笉闇瑕佸湪Windows PATH涓姞鍏MySQL bin鐩綍銆
璀﹀憡锛氱紪杈戠郴缁PATH鏃跺繀椤荤壒鍒敞鎰忥紱鎰忓鍒犻櫎鎴栦慨鏀瑰凡鏈夎矾寰勫间細閫犳垚绯荤粺鏁呴殰鐢氳嚦鐦棯銆
鏈嶅姟瀹夎鍛戒护涓嶄細鍚姩鏈嶅姟鍣ㄣ傚湪鏈妭鍚庨潰灏嗙粰鍑虹浉鍏虫寚浠ゃ
瀹夎鏈嶅姟鏃讹紝鍙互浣跨敤MySQL 5.1涓殑涓嬮潰鐨勫弬鏁帮細
路 鍙互鐩存帴鍦--install閫夐」鍚庨潰鎸囧畾鏈嶅姟鍚嶃傞粯璁ゆ湇鍔″悕鏄MySQL銆
路 濡傛灉缁欏嚭浜嗘湇鍔″悕锛屽悗闈㈠彲浠ヨ窡涓涓夐」銆備竴鑸儏鍐碉紝搴斿綋涓defaults-file=file_name锛屾寚瀹氶夐」鏂囦欢鐨勫悕绉帮紝鏈嶅姟鍣ㄥ惎鍔ㄦ椂搴斿綋浠庝腑璇诲彇閫夐」銆
鍙互浣跨敤鍗曚釜閫夐」浠f浛--defaults-file锛屼絾鏄笉鎻愬¤繖鏍峰仛銆--defaults-file鏇村姞鐏垫椿涓浜涳紝鍥犱负浣犲彲浠ュ皢澶氫釜鏈嶅姟鍣ㄥ惎鍔ㄩ夐」鏀惧叆鍛藉悕鐨勯夐」鏂囦欢涓
路 鍙互鍦ㄦ湇鍔″悕鍚庨潰鎸囧畾涓涓--local-service閫夐」銆傝繖鏍锋湇鍔″櫒杩愯鏃朵娇鐢LocalService Windows璐︽埛锛屽彧鍏锋湁鏈夐檺鐨勭郴缁熸潈闄愩傝璐︽埛鍙傜敤浜Windows XP鎴栨洿鏂扮増鏈傚鏋滄湇鍔″悕鍚庨潰鍚屾椂璺熸湁--defaults-file鍜--local-service锛屼簩鑰呭彲浠ユ寜浠讳綍椤哄簭鎺掓斁銆
瀵逛簬Windows MySQL鏈嶅姟鍣紝鏍规嵁涓嬮潰瑙勫垯纭畾鏈嶅姟鍣ㄤ娇鐢ㄧ殑鏈嶅姟鍚嶅拰閫夐」鏂囦欢锛
路 濡傛灉鍦ㄦ湇鍔″畨瑁呭懡浠や腑锛屾病鏈夊湪--install閫夐」鍚庨潰鎸囧畾浜嗘湇鍔″悕鎴栦娇鐢ㄩ粯璁ゆ湇鍔″悕(MySQL)锛屾湇鍔″櫒鍒欎娇鐢MySQL鏈嶅姟鍚嶅苟浠庢爣鍑嗛夐」鏂囦欢鐨[mysqld]缁勮鍙栭夐」銆
路 濡傛灉鍦ㄦ湇鍔″畨瑁呭懡浠や腑锛屽湪--install閫夐」鍚庨潰鎸囧畾鐨勬湇鍔″悕涓嶆槸榛樿鏈嶅姟鍚(MySQL)銆傚垯浠庡叿鏈夌浉鍚屾湇鍔″悕鐨勭粍涓鍙栭夐」锛屽苟浠庢爣鍑嗛夐」鏂囦欢璇诲彇閫夐」銆
鏈嶅姟鍣ㄨ繕浠庢爣鍑嗛夐」鏂囦欢鐨[mysqld]缁勮鍙栭夐」銆備綘鍙互浣跨敤[mysqld]缁勪腑鐨勯夐」鐢ㄤ簬鎵鏈MySQL 鏈嶅姟锛岃繕鍙互浣跨敤鍏锋湁鐩稿悓鏈嶅姟鍚嶇殑缁勶紝鐢ㄤ簬璇ユ湇鍔″悕鎵瀵瑰簲鐨勬湇鍔″櫒銆
路 濡傛灉鍦ㄦ湇鍔″畨瑁呭懡浠や腑锛屽湪鏈嶅姟鍚嶅悗闈㈡寚瀹氫簡--defaults-file閫夐」锛屾湇鍔″櫒鍙粠鍛藉悕鏂囦欢鐨[mysqld]缁勪腑璇诲彇閫夐」锛屽拷鐣ユ爣鍑嗛夐」鏂囦欢銆
瀵逛簬鏇村鏉傜殑渚嬪瓙鍙互鑰冭檻浣跨敤鍛戒护锛
C锛\> C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld --install MySQL --defaults-file=C:\my-opts.cnf
璇ュ懡浠や腑锛--install閫夐」鍚庨潰缁欏嚭浜嗛粯璁ゆ湇鍔″悕(MySQL)銆傚鏋滄湭缁欏嚭--defaults-file閫夐」锛岃鍛戒护鍙互璁╂湇鍔″櫒浠庢爣鍑嗛夐」鏂囦欢鐨[mysqld]缁勪腑璇绘暟銆傜敱浜庢彁渚涗簡--defaults-file閫夐」锛屾湇鍔″櫒鍙粠鍛藉悕鏂囦欢鐨[mysqld]缁勮鍙栭夐」銆
杩樺彲浠ュ湪鍚姩MySQL鏈嶅姟涔嬪墠锛屽湪Windows Services宸ュ叿涓寚瀹氬惎鍔ㄥ弬鏁伴夐」銆
MySQL鏈嶅姟鍣ㄥ畨瑁呬负鏈嶅姟鍚庯紝Windows鍚姩鏃惰嚜鍔ㄥ惎鍔ㄦ湇鍔°傝繕鍙互浠Services宸ュ叿鐩存帴鍚姩鏈嶅姟锛屾垨浣跨敤鍛戒护NET START MySQL銆NET鍛戒护蹇界暐澶у皬鍐欍
鍋氫负鏈嶅姟杩愯鏃讹紝mysqld涓嶈兘璁块棶鎺у埗鍙扮獥鍙o紝鍥犳鐪嬩笉瑙佷换浣曟秷鎭傚鏋mysqld鏈惎鍔紝妫鏌ラ敊璇棩蹇楃湅鐪嬫湇鍔″櫒鏄惁鍐欏叆浜嗘樉绀洪棶棰樺師鍥犵殑浠讳綍娑堟伅銆傞敊璇棩蹇椾綅浜MySQL鏁版嵁鐩綍涓(渚嬪锛C:\Program Files\MySQL\MySQL Server 5.1\data)锛屾槸甯﹀悗缂.err鐨勬枃浠躲
濡傛灉MySQL鏈嶅姟鍣ㄥ畨瑁呬负鏈嶅姟锛屽苟涓旀湇鍔℃杩愯锛Windows鍏抽棴鏃惰嚜鍔ㄥ仠姝㈡湇鍔°傝繕鍙互閫氳繃Services宸ュ叿銆NET STOP MySQL鍛戒护鎴 mysqladmin shutdown鍛戒护鎵嬪姩鍋滄鏈嶅姟鍣ㄣ
濡傛灉涓嶆兂鍦ㄥ紩瀵艰繃绋嬩腑鑷姩鍚姩鏈嶅姟锛岃繕鍙互灏嗘湇鍔¤缃负鎵嬪姩鍚姩妯″紡銆傚疄鐜扮殑鏂规硶鏄娇鐢--install-manual閫夐」鑰岄潪--install閫夐」锛
C锛\> C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld --install-manual
瑕佹兂鍗歌浇鏈嶅姟鍣紝濡傛灉鏈嶅姟姝h繍琛屽垯搴旈鍏堜娇鐢ㄥ懡浠NET STOP MYSQL鍋滄鏈嶅姟銆傜劧鍚庝娇鐢--remove閫夐」鍗歌浇鏈嶅姟锛
C锛\> C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld --remove
濡傛灉mysqld涓嶆槸鏈嶅姟锛屽彲浠ヤ粠鍛戒护琛屽惎鍔ㄥ畠銆傝缁嗚鏄庡弬瑙2.3.11鑺傦紝鈥滀粠Windows鍛戒护琛屽惎鍔∕ySQL鈥銆
濡傛灉鍦ㄥ畨瑁呰繃绋嬩腑閬囧埌闂锛岃鍙傞槄2.3.14鑺傦紝鈥滃湪Windows鐜涓嬪MySQL瀹夎鐨勬晠闅滆瘖鏂笌鎺掗櫎鈥銆
C:\> C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqlshow
C:\> C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqlshow -u root mysql
C:\> C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqladmin version status proc
C:\> C:\Program Files\MySQL\MySQL Server 5.1\bin\mysql test
濡傛灉mysqld瀵瑰鎴风绋嬪簭TCP/IP杩炴帴鐨勫搷搴旇緝鎱紝鍙兘鏄DNS闂銆傛鏃讹紝浣跨敤--skip-name-resolve閫夐」鍚姩mysqld锛屽湪MySQL鎺堟潈琛ㄧ殑Host鍒楀彧浣跨敤localhost鍜IP鍙枫
鍙互閫氳繃--pipe鎴--protocol=PIPE閫夐」寮哄埗MySQL瀹㈡埛绔娇鐢ㄥ懡鍚嶇閬撹繛鎺ヤ唬鏇TCP/IP杩炴帴锛屾垨鎸囧畾.(闃舵)鍋氫负涓绘満鍚嶃備娇鐢--socket閫夐」鎸囧畾绠¢亾鍚嶃
棣栨瀹夎銆佽繍琛MySQL鏃讹紝浣犲彲鑳戒細閬囧埌涓浜涢敊璇紝浣MySQL鏈嶅姟鍣ㄤ笉鑳藉惎鍔ㄣ傛湰鑺傜殑鐩殑鏄府鍔╀綘璇婃柇骞剁籂姝h繖浜涢敊璇
瑙e喅鏈嶅姟鍣ㄩ棶棰樻椂浣犵殑绗竴璧勬枡鏄敊璇棩蹇椼MySQL鏈嶅姟鍣ㄤ娇鐢ㄩ敊璇棩蹇楁潵璁板綍鏈嶅姟鍣ㄤ笉鑳藉惎鍔ㄧ殑淇℃伅銆傞敊璇棩蹇椾綅浜my.ini鏂囦欢鎸囧畾鐨勬暟鎹洰褰曚腑銆傞粯璁ゆ暟鎹洰褰曚綅浜C:\Program Files\MySQL\MySQL Server 5.1\dat銆傝鍙傝5.11.1鑺傦紝鈥滈敊璇棩蹇椻銆
鍙︿竴涓敊璇浉鍏充俊鎭簮鏄MySQL鏈嶅姟鍚姩鏃舵帶鍒跺彴涓婃樉绀虹殑娑堟伅銆傚皢mysqld瀹夎涓烘湇鍔″悗锛屼粠鍛戒护琛岄氳繃NET START mysql鍛戒护鏉ユ煡鐪MySQL鏈嶅姟鍚姩鐩稿叧鐨勯敊璇秷鎭傝鍙傝2.3.12鑺傦紝鈥滀互Windows鏈嶅姟鏂瑰紡鍚姩MySQL鈥銆
涓嬮潰璺濈璇存槑浜嗛娆″畨瑁呭苟鍚姩MySQL鏈嶅姟鏃朵細閬囧埌鐨勬渶甯歌鐨勯敊璇秷鎭細
路 System error 1067 has occurred.
路 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
路 褰MySQL鏈嶅姟鍣ㄦ壘涓嶅埌MySQL鏉冮檺鏁版嵁搴撴垨鍏抽敭鏂囦欢鏃朵細鍑虹幇杩欎簺娑堟伅銆傚綋MySQL鍩烘垨鏁版嵁鐩綍娌℃湁瀹夎鍦ㄩ粯璁や綅缃(C锛\mysql鍜 C:\Program Files\MySQL\MySQL Server 5.1\data)锛岃屾槸瀹夎鍒板叾瀹冧綅缃椂閫氬父浼氶亣鍒拌闂銆
鍙戠敓璇ラ棶棰樼殑涓绉嶆儏鍐垫槸瀵MySQL杩涜鍗囩骇鎴栧畨瑁呭埌浜嗘柊浣嶇疆锛屼絾鏄病鏈夊閰嶇疆鏂囦欢杩涜鏇存柊浠ュ搴旀柊鐨勫畨瑁呬綅缃傛澶栬繕鍙兘鏄柊鏃ч厤缃枃浠跺啿绐侊紝褰撳崌绾MySQL鏃讹紝涓瀹氳鍒犻櫎鎴栭噸鏂板懡鍚嶆棫鐨勯厤缃枃浠躲
濡傛灉浣犳病鏈夊皢MySQL瀹夎鍒C:\Program Files\MySQL\MySQL Server 5.1鐩綍涓嬶紝鑰屾槸瀹夎鍒颁簡鍏跺畠鐩綍涓嬶紝浣犻渶瑕侀氳繃浣跨敤閰嶇疆(my.ini)鏂囦欢璁MySQL鏈嶅姟鍣ㄧ煡閬撳畨瑁呯洰褰曘my.ini鏂囦欢搴斾綅浜Windows鐩綍涓嬶紝鍏稿瀷涓C锛\WINNT鎴C锛\WINDOWS銆傚彲浠ュ湪鍛戒护鎻愮ず绗︿笅杈撳叆涓嬮潰鐨勫懡浠や粠WINDIR鐜鍙橀噺鍊间腑纭畾纭垏浣嶇疆锛
C锛\> echo %WINDIR%
鍙互閫氳繃鏂囨湰缂栬緫鍣紙渚嬪璁颁簨鏈級鏉ュ垱寤哄苟淇敼閫夐」鏂囦欢銆備緥濡傦紝濡傛灉MySQL瀹夎鍦E锛\mysql涓锛鏁版嵁鐩綍鍦D:\MySQLdata锛屼綘鍙互鍒涘缓閫夐」鏂囦欢骞惰缃[mysqld]鏉ユ寚瀹basedir鍜datadir鍙傛暟鐨勫硷細
[mysqld]
# set basedir to your installation path
basedir=E:/mysql
# set datadir to the location of your data directory
datadir=D:/MySQLdata
璇锋敞鎰忓簲浣跨敤(姝)鏂滅嚎鑰屼笉鏄弽鏂滅嚎鍦ㄩ夐」鏂囦欢涓寚瀹Windows璺緞鍚嶃傚鏋滀娇鐢ㄥ弽鏂滅嚎锛屽垯蹇呴』浣跨敤鍙屾枩绾匡細
[mysqld]
# set basedir to your installation path
basedir=C:\\Program Files\\MySQL\\MySQL Server 5.1
# set datadir to the location of your data directory
datadir=D:\\MySQLdata
濡傛灉鍦MySQL閰嶇疆鏂囦欢涓洿鏀datadir鍊硷紝鍦ㄩ噸鏂板惎鍔MySQL鏈嶅姟鍣ㄤ箣鍓嶏紝蹇呴』绉诲姩宸叉湁MySQL鏁版嵁鐩綍涓殑鍐呭銆
路 Error: Cannot create Windows service for MySql. Error: 0
路 褰撲綘娌℃湁浜嬪厛鍋滄骞跺嵏杞藉凡鏈MySQL鏈嶅姟锛屽苟涓斾娇鐢MySQL Configuration Wizard锛堥厤缃悜瀵硷級閲嶆柊瀹夎鎴栧崌绾MySQL鏃讹紝浼氶亣鍒拌闂銆傚彂鐢熺殑鍘熷洜鏄紝褰撻厤缃悜瀵艰瘯鍥惧畨瑁呮湇鍔℃椂锛屽畠鍙戠幇宸茬粡鏈変竴涓悓鍚嶇殑鏈嶅姟銆
瑙e喅璇ラ棶棰樼殑涓涓柟妗堟槸浣跨敤閰嶇疆鍚戝鏃堕夋嫨mysql涔嬪鐨勫叾瀹冩湇鍔″悕銆傝繖鏍峰彲浠ユ纭畨瑁呮柊鏈嶅姟锛屼絾淇濈暀浜嗗師鏉ョ殑鏈嶅姟銆備絾鏄繖鏍蜂笉濂斤紝鏈濂芥槸鍗告帀涓嶅啀浣跨敤鐨勬棫鏈嶅姟銆
瑕佹兂姘歌繙鍗告帀鏃х殑MySQL鏈嶅姟锛岄氳繃绠$悊鏉冮檺鐢ㄦ埛鍦ㄥ懡浠よ鎵ц涓嬮潰鐨勫懡浠わ細
C:\>sc delete mysql
[SC] DeleteService SUCCESS
濡傛灉Windows鐗堟湰涓病鏈sc宸ュ叿锛屽彲浠ヤ粠 http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/delsrv-o.asp 涓嬭浇delsrv宸ュ叿骞朵娇鐢delsrvMySQL璇硶銆
鏈妭鍒楀嚭浜嗗湪Windows涓崌绾MySQL搴旈噰鍙栫殑姝ラ銆
1. 杩涜鍗囩骇鍓嶄綘搴斿厛澶囦唤褰撳墠鐨MySQL瀹夎銆傝鍙傝5.9.1鑺傦紝鈥滄暟鎹簱澶囦唤鈥銆
2. 浠http://dev.mysql.com/downloads/涓嬭浇鏈鏂Windows鐗MySQL銆
3. 鍗囩骇MySQL鍓嶏紝蹇呴』鍋滄鏈嶅姟鍣ㄣ
濡傛灉鏈嶅姟鍣ㄥ畨瑁呬负鏈嶅姟锛屽繀椤诲湪鍛戒护鎻愮ず绗︿笅鍦ㄥ懡浠よ涓敤涓嬮潰鐨勫懡浠ゅ仠姝㈡湇鍔★細
C锛\> NET STOP MYSQL
濡傛灉MySQL鏈嶅姟鍣ㄤ笉鏄湇鍔★紝浣跨敤涓嬮潰鐨勫懡浠ゅ仠姝㈡湇鍔″櫒锛
C锛\> C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqladmin -u root shutdown
4. 褰撲粠浠ュ墠鑷崇殑4.1.5鐗堟湰鍗囩骇鍒MySQL 5.1鏃,鎴栦粠Zip鏂囦欢瀹夎鐨MySQL鍗囩骇鍒MySQL Installation Wizard锛瀹夎甯姪锛夊畨瑁呯殑MySQL鏃讹紝浣犲繀椤绘墜鍔ㄥ嵏杞藉墠闈㈠畨瑁呯殑MySQL鏈嶅姟銆
瑕佹兂鍗歌浇MySQL鏈嶅姟锛屼娇鐢ㄤ笅闈㈢殑鍛戒护锛
C锛\> C:\mysql\bin\mysqld --remove
濡傛灉浣犱笉鎯冲嵏杞藉凡鏈夌殑鏈嶅姟锛MySQL Installation Wizard锛堝畨瑁呭府鍔╋級鍒欎笉浼氭纭畨瑁呮柊鐨MySQL鏈嶅姟銆
5. 濡傛灉浣犱娇鐢MySQL Installation Wizard锛堝畨瑁呭府鍔╋級锛屾寜鐓2.3.4鑺傦紝鈥滀娇鐢∕ySQL瀹夎鍚戝鈥鐨勬弿杩版潵鍚姩甯姪銆
6. 濡傛灉鐢Zip鏂囦欢瀹夎MySQL锛屽簲鎻愬彇鏂囦欢銆備綘鍙互瑕嗙洊宸叉湁鐨MySQL瀹夎(閫氬父浣嶄簬C锛\mysql)锛屾垨灏嗗畠瀹夎鍒板叾瀹冪洰褰曪紝渚嬪 C锛\mysql4銆傚缓璁鐩栧師鏈夌殑瀹夎銆
7. 閲嶆柊鍚姩鏈嶅姟鍣ㄣ傚鏋滀綘杩愯MySQL鏈嶅姟锛屽垯浣跨敤NET START MySQL锛岃繕鍙互鐩存帴璋冪敤mysqld銆
8. 鍏充簬鍦Windows涔嬪鐨勬搷浣滅郴缁熷崌绾MySQL鐨勮缁嗕俊鎭紝璇峰弬闃2.10鑺傦紝鈥滃崌绾ySQL鈥銆
9. 濡傛灉閬囧埌閿欒锛屽弬瑙 2.3.14鑺傦紝鈥滃湪Windows鐜涓嬪MySQL瀹夎鐨勬晠闅滆瘖鏂笌鎺掗櫎鈥銆
宸茬粡璇佹槑锛Windows鐗MySQL寰堢ǔ瀹氥Windows鐗MySQL鐨勫姛鑳戒笌鐩稿簲鐨Unix鐗堢浉鍚岋紝鍙湁浠ヤ笅渚嬪锛
路 Windows 95鍜岀嚎绋
Windows 95鍒涘缓涓涓嚎绋嬫椂澶х害闇瑕200瀛楄妭鐨勪富鍐呭瓨銆MySQL鐨勬瘡涓繛鎺ラ兘浼氬垱寤轰竴涓柊绾跨▼锛屽洜姝ゅ鏋滀綘鐨勬湇鍔″櫒姝e鐞嗚澶氳繛鎺ワ紝浣犱笉搴斿綋鍦Windows 95涓繍琛mysqld銆
路 鏈夐檺鐨勭鍙f暟鐩
Windows绯荤粺鏈夊ぇ绾4,000涓鍙d緵瀹㈡埛绔繛鎺ワ紝鏌愪釜绔彛鐨勮繛鎺ュ叧闂悗锛屽湪鑳藉閲嶆柊鍒╃敤璇ョ鍙e墠锛岄渶瑕2鑷4鍒嗛挓銆傚湪瀹㈡埛绔绻佽繛鎺ュ苟浠庢湇鍔″櫒涓婃柇寮鏃讹紝鍦ㄥ彲浠ラ噸鏂颁娇鐢ㄥ叧闂殑绔彛鍓嶏紝鏈夊彲鑳界敤瀹屼簡鎵鏈夊彲鐢ㄧ殑绔彛銆傚鏋滃彂鐢熻繖绉嶆儏鍐碉紝MySQL鏈嶅姟鍣ㄤ笉浼氬搷搴旓紝鍗充娇瀹冧粛鍦ㄨ繍琛屻傝娉ㄦ剰鏈哄櫒涓婅繍琛岀殑鍏跺畠搴旂敤绋嬪簭涔熷彲浠ヤ娇鐢ㄧ鍙o紝姝ゆ椂鍙緵MySQL浣跨敤鐨勭鍙f暟瑕佸皯銆
璇︾粏淇℃伅鍙傝http://support.microsoft.com/default.aspx?scid=kb;en-us;196271 銆
路 骞惰璇
MySQL渚濋潬pread()鍜pwrite()绯荤粺璋冪敤鏉ュ悓鏃朵娇鐢INSERT鍜SELECT銆傜洰鍓嶆垜浠娇鐢ㄤ簰鏂ユ潵绔炰簤pread()鍜pwrite()銆傛垜浠皢鏉ユ兂鐢ㄨ櫄鎷熸帴鍙f浛鎹㈡枃浠剁骇鎺ュ彛锛屽洜姝よ鎯虫洿蹇紝鎴戜滑鍙互鍦NT銆2000鍜XP涓婁娇鐢readfile()/writefile()鎺ュ彛銆傜洰鍓MySQL 5.1鍙互鎵撳紑鐨勬枃浠剁殑闄愬埗鏁扮洰涓2,048,鎰忓懗鐫鍦Windows NT锛2000,XP鍜2003涓婂彲浠ヨ繍琛岀殑骞惰绾跨▼涓嶅Unix涓婂銆
路 闃诲璇
MySQL涓烘瘡涓繛鎺ヤ娇鐢ㄩ樆濉炶鍙栵紝濡傛灉鍚敤浜嗗懡鍚嶇閬撹繛鎺ワ紝鍏跺惈涔夊涓嬶細
o 杩炴帴涓嶄細鍦8灏忔椂鍚庤嚜鍔ㄦ柇寮锛岃屽湪Unix鐗MySQL涓細鍙戠敓銆
o 濡傛灉杩炴帴琚寕璧凤紝涓嶆潃鎺MySQL鍒欎笉浼氬皢鍏朵腑鏂
o mysqladmin kill涓嶄細鏉鎺夌潯鐪犱腑鐨勮繛鎺ャ
o 鍙鏈夌潯鐪犺繛鎺ワ紝mysqladmin shutdown涓嶄細涓柇銆
鎴戜滑璁″垝鍦ㄥ皢鏉ヤ慨澶嶈闂銆
路 ALTER TABLE
鎵цALTER TABLE璇彞鏃讹紝灏嗚琛ㄩ攣瀹氫笉璁╁叾瀹冪嚎绋嬩娇鐢ㄣ傚湪Windows涓紝浣犱笉鑳藉垹闄ゆ琚彟涓涓嚎绋嬩娇鐢ㄧ殑鏂囦欢銆傚湪灏嗘潵锛屾垜浠細鎵惧嚭鍔炴硶瑙e喅璇ラ棶棰樸
路 DROP TABLE
鍦Windows涓涓涓MERGE琛ㄥ簲鐢ㄧ殑琛ㄦ墽琛DROP TABLE涓嶄細瀹炵幇锛屽洜涓MERGE澶勭悊鍣ㄥ皢琛ㄤ粠MySQL涓婂眰鏄犲皠闅愯棌璧锋潵銆傜敱浜Windows涓嶅厑璁稿垹闄ゆ墦寮鐨勬枃浠讹紝蹇呴』鍦ㄥ垹闄よ〃涔嬪墠棣栧厛娓呯┖鎵鏈MERGE琛(浣跨敤FLUSH TABLES)鎴栧垹鎺MERGE琛ㄣ
路 DATA DIRECTORY and INDEX DIRECTORY
鍦Windows涓皢蹇界暐DATA DIRECTORY鍜INDEX DIRECTORY閫夐」锛屽洜涓Windows涓嶆敮鎸佺鍙疯繛鎺ャ傚湪鍏锋湁闈炲姛鑳realpath()璋冪敤鐨勭郴缁熶腑锛岃繖浜涢夐」涔熻蹇界暐銆
路 DROP DATABASE
浣犱笉鑳藉垹鎺夋琚嚎绋嬩娇鐢ㄧ殑鏁版嵁搴撱
路 浠Task Manager锛堜换鍔$鐞嗗櫒锛夋潃鎺MySQL
浣犱笉鑳戒粠Task Manager锛堜换鍔$鐞嗘眰锛夋垨浣跨敤Windows 95鐨shutdown宸ュ叿鏉ユ潃鎺MySQL銆備綘蹇呴』閫氳繃mysqladmin shutdown鍋滄瀹冦
路 澶у皬鍐欏悕
鐢变簬Windows瀵规枃浠跺悕澶у皬鍐欎笉鏁忔劅銆傚洜姝ゅ湪Windows涓MySQL鏁版嵁搴撳悕鍜岃〃鍚嶅澶у皬鍐欎篃涓嶆晱鎰熴傚敮涓鐨勯檺鍒舵槸鍦ㄥ悓涓涓鍙ヤ腑锛屽繀椤诲悓鏃朵娇鐢ㄥぇ鍐欐垨灏忓啓鎸囧畾鏁版嵁搴撳悕鍜岃〃鍚嶃傝鍙傝9.2.2鑺傦紝鈥滆瘑鍒澶у皬鍐欐晱鎰熸р銆
路 鈥\鈥欒矾寰勫悕闂撮殧绗
Windows涓殑璺緞鍚嶇敤鈥\鈥欑闂撮殧寮锛屽湪MySQL涓繕鏄浆涔夊瓧绗︺傚鏋滀綘浣跨敤LOAD DATA INFILE鎴SELECT ... INTO OUTFILE锛岀敤鈥/鈥欑浣跨敤Unix-绫绘枃浠跺悕锛
mysql> LOAD DATA INFILE 'C:/tmp/skr.txt' INTO TABLE skr;
mysql> SELECT * INTO OUTFILE 'C:/tmp/skr.txt' FROM skr;
浣犺繕鍙互浣跨敤鍙屸\鈥欑锛
mysql> LOAD DATA INFILE 'C:\\tmp\\skr.txt' INTO TABLE skr;
mysql> SELECT * INTO OUTFILE 'C:\\tmp\\skr.txt' FROM skr;
路 绠¢亾闂銆
绠¢亾涓嶈兘鍦Windows鍛戒护琛屾彁绀虹涓嬪彲闈犲湴宸ヤ綔銆傚鏋滅閬撳寘鎷瓧绗^Z/CHAR(24)锛Windows璁や负閬囧埌浜嗘枃浠舵湯灏惧苟涓柇绋嬪簭銆
杩欎富瑕佹槸鎸夌収濡備笅鎵绀轰娇鐢ㄤ簩杩涘埗鏃ュ織鐨勪富瑕侀棶棰橈細
C锛\>mysqlbinlog binary-log-name | mysql --user=root
濡傛灉浣跨敤鏃ュ織鏃跺嚭鐜伴棶棰橈紝鎬鐤戞槸鐢变簬^Z / CHAR(24)瀛楃锛屼綘鍙互浣跨敤涓嬮潰鐨勭▼搴忥細
C:\> mysqlbinlog binary-log-file --result-file=/tmp/bin.sql
C:\> mysql --user=root --execute "source /tmp/bin.sql"
鍚庨潰鐨勫懡浠よ繕鍙互鐢ㄦ潵鍙潬璇诲彇浠讳綍鍖呭惈浜岃繘鍒舵暟鎹殑SQL鏂囦欢銆
路 Access denied for user閿欒
濡傛灉浣犺瘯鍥捐繍琛MySQL瀹㈡埛绔▼搴忔潵杩炴帴鍚屼竴鏈哄櫒涓婅繍琛岀殑鏈嶅姟鍣紝浣嗘槸閬囧埌閿欒Access denied for user 'some-user'@'unknown' to database 'mysql'锛岃繖鎰忓懗鐫MySQL涓嶈兘姝g‘璇嗗埆浣犵殑涓绘満鍚嶃
瑕佽В鍐宠闂锛屼綘搴斿綋鍒涘缓涓涓悕涓\windows\hosts鍖呭惈涓嬮潰淇℃伅鐨勬枃浠讹細
127.0.0.1 localhost
杩欏効鏈変竴浜涘叕寮闂锛屾彁渚涚粰鎯宠甯姪鎴戜滑鏀硅繘Windows涓殑MySQL鐨勪汉浠細
路 澧炲姞瀹忔潵浣跨敤Windows鎻愪緵鐨勬洿蹇殑绾跨▼瀹夊叏澧/鍑忔柟娉曘
寤鸿鍦Linux涓娇鐢RPM鍖呮潵瀹夎MySQL銆MySQL RPM鐩墠宸茬粡宓屽叆鍒SuSE Linux 7.3绯荤粺涓紝浣嗘槸搴斿綋鑳藉湪澶у鏁版敮鎸rpm鍜屼娇鐢glibc鐨Linux鐗堟湰涓伐浣溿傝鎯宠幏寰RPM杞欢鍖咃紝鍙傝2.1.3鑺傦紝鈥滄庢牱鑾峰緱MySQL鈥銆
MySQL AB涓嶆彁渚涗笌鍏蜂綋骞冲彴鐩稿叧鐨RPM锛涘叿浣撳钩鍙扮浉鍏崇殑RPM鍜岄氱敤RPM涔嬮棿鐨勫尯鍒槸鍏蜂綋骞冲彴鐩稿叧RPM涓虹洰鏍囧钩鍙拌屾瀯寤猴紝涓哄姩鎬佽繛鎺ャ傝岄氱敤RPM涓Linux绾跨▼涔嬮棿鏄潤鎬佽繛鎺ャ
娉ㄩ噴锛閫氬父鐢卞叾瀹冧緵搴斿晢鎻愪緵MySQL鐨RPM鍒嗗彂鐗堛傚叾鐗瑰緛鍜屽姛鑳戒笌MySQL AB鎵鏋勫缓鐨勪笉鍚岋紝璇ユ墜鍐屼腑鐨勬寚浠や笉涓瀹氶傚悎瀹夎鍏跺畠渚涘簲鍟嗘彁渚涚殑MySQL鐨RPM鍒嗗彂鐗堛傛鏃跺簲鍜ㄨ渚涘簲鍟嗙殑璇存槑銆
濡傛灉RPM鏂囦欢鏈夐棶棰(渚嬪锛屽鏋滀綘鏀跺埌閿欒鈥Sorry, the host 'xxxx' could not be looked up鈥)锛屽弬瑙2.12.1.2鑺傦紝鈥淟inux浜岃繘鍒跺垎鍙戠増璇存槑鈥銆
鍦ㄥぇ澶氭暟鎯呭喌锛屼綘鍙渶瑕佸畨瑁MySQL-server鍜MySQL-client杞欢鍖呮潵瀹夎MySQL銆傚湪鏍囧噯瀹夎涓笉闇瑕佸叾瀹冪殑鍖呫傚鏋滀綘鎯宠杩愯鍚洿澶氬姛鑳界殑MySQL-Max鏈嶅姟鍣紝杩樺簲褰撳畨瑁MySQL-Max RPM銆傚繀椤诲厛瀹夎M MySQL-server RPM鍐嶅畨瑁呰妯″潡銆傝鍙傝5.1.2鑺傦紝鈥渕ysqld-max鎵╁睍MySQL鏈嶅姟鍣ㄢ銆
濡傛灉瀹夎MySQL杞欢鍖呮椂鍑虹幇浠庡睘閿欒(渚嬪锛屸error: removing these packages would break dependencies: libmysqlclient.so.10 is needed by ..鈥)锛屼綘杩樺簲褰撳畨瑁呭寘MySQL-shared-compat锛屽叾涓寘鎷袱涓悜鍚庡吋瀹圭殑鍏变韩搴(MySQL 4.0涓libmysqlclient.so.12锛MySQL 3.23涓libmysqlclient.so.10)銆
璁稿Linux鍒嗗彂鐗堝寘鍚簡MySQL 3.23锛岄氬父鍔ㄦ佽繛鎺ュ簲鐢ㄧ▼搴忎互鑺傜渷纭洏绌洪棿銆傚鏋滆繖浜涘叡浜簱鍦ㄥ崟鐙殑鍖呭唴(渚嬪锛MySQL-shared)锛屽彧闇瑕佸畨瑁呰繖浜涘寘骞跺崌绾MySQL鏈嶅姟鍣ㄥ拰瀹㈡埛绔蒋浠跺寘(涓洪潤鎬佽繛鎺ワ紝涓嶄緷璧栧叡浜簱)銆瀵逛簬鍖呭惈涓MySQL鏈嶅姟鍣ㄧ浉鍚岃蒋浠跺寘涓殑鍏变韩搴撶殑鍒嗗彂鐗(渚嬪锛Red Hat Linux)锛屼綘鍙互瀹夎3.23 MySQL-shared RPM锛屾垨浣跨敤MySQL-shared-compat鍖呫
鍙互浣跨敤浠ヤ笅RPM鍖咃細
路 MySQL-server-VERSION.i386.rpm
MySQL鏈嶅姟鍣ㄣ備綘闇瑕佽閫夐」锛岄櫎闈炰綘鍙兂杩炴帴杩愯鍦ㄥ彟涓鍙版満鍣ㄤ笂鐨MySQL鏈嶅姟鍣ㄣ 娉ㄩ噴锛氬湪MySQL 4.0.10涔嬪墠锛屾湇鍔″櫒RPM鏂囦欢琚О涓MySQL-VERSION.i386.rpm銆備篃灏辨槸璇达紝鍚嶇О涓笉鍚湁-server銆
路 MySQL-Max-VERSION.i386.rpm
MySQL-Max鏈嶅姟鍣ㄣ傝鏈嶅姟鍣ㄥ叿鏈夊叾瀹冨姛鑳斤紝杩欐槸MySQL-server RPM涓嶅叿澶囩殑銆備綘蹇呴』棣栧厛瀹夎MySQL-server RPM锛屽洜涓MySQL-Max RPM渚濊禆浜庡畠銆
路 MySQL-client-VERSION.i386.rpm
鏍囧噯MySQL瀹㈡埛绔▼搴忋備綘鍙兘鎬绘槸瑕佸畨瑁呰杞欢鍖呫
路 MySQL-bench-VERSION.i386.rpm
娴嬭瘯鍜屽熀鍑嗐傞渶瑕Perl鍜DBD锛氾細mysql妯″潡銆
路 MySQL-devel-VERSION.i386.rpm
搴撳拰鍖呭惈鏂囦欢锛屽鏋滀綘鎯宠缂栬瘧鍏跺畠MySQL瀹㈡埛绔紝渚嬪Perl妯″潡锛屽垯闇瑕併
路 MySQL-shared-VERSION.i386.rpm
璇ヨ蒋浠跺寘鍖呭惈鏌愪簺璇█鍜屽簲鐢ㄧ▼搴忛渶瑕佸姩鎬佽杞界殑鍏变韩搴(libmysqlclient.so*)锛屼娇鐢MySQL銆
路 MySQL-shared-compat-VERSION.i386.rpm
璇ヨ蒋浠跺寘鍖呮嫭MySQL 3.23鍜MySQL 4.0鐨勫叡浜簱銆傚鏋滀綘瀹夎浜嗗簲鐢ㄧ▼搴忓姩鎬佽繛鎺MySQL 3.23锛屼絾鏄綘鎯宠鍗囩骇鍒MySQL 4.0鑰屼笉鎯虫墦鐮村簱鐨勪粠灞炲叧绯伙紝鍒欏畨瑁呰杞欢鍖呰屼笉瑕佸畨瑁MySQL-shared銆備粠MySQL 4.0.13璧峰寘鍚瀹夎杞欢鍖呫
路 MySQL-embedded-VERSION.i386.rpm
宓屽叆寮MySQL鏈嶅姟鍣ㄥ簱(浠MySQL 4.0璧)銆
路 MySQL-VERSION.src.rpm
鍖呭惈浠ュ墠鎵鏈夎蒋浠跺寘鐨勬簮鐮併傚彲鐢ㄦ潵鍦ㄥ叾瀹冩灦鏋勪笂閲嶅缓RPM(渚嬪锛Alpha鎴SPARC)銆
瑕佹兂鐪嬪埌RPM杞欢鍖呭唴鐨勬墍鏈夋枃浠(渚嬪锛MySQL-server RPM)锛岃繍琛岋細
shell> rpm -qpl MySQL-server-VERSION.i386.rpm
瑕佹兂鎵ц鏍囧噯鏈灏忓畨瑁咃紝杩愯锛
shell> rpm -i MySQL-server-VERSION.i386.rpm
shell> rpm -i MySQL-client-VERSION.i386.rpm
瑕佹兂鍙畨瑁呭鎴风杞欢鍖咃紝杩愯锛
shell> rpm -i MySQL-client-VERSION.i386.rpm
RPM鎻愪緵鍦ㄥ畨瑁呰蒋浠跺寘鍓嶉獙璇佸叾瀹屾暣鎬у拰鐪熷疄鎬х殑鍔熻兘銆傚鏋滀綘瑕佹兂浜嗚В鍏充簬璇ュ姛鑳界殑鏇村淇℃伅锛屽弬瑙2.1.4鑺傦紝鈥滈氳繃MD5鏍¢獙鍜屾垨GnuPG楠岃瘉杞欢鍖呯殑瀹屾暣鎬鈥銆
鏈嶅姟鍣RPM灏嗘暟鎹斁鍏/var/lib/mysql鐩綍銆RPM杩樹负mysql鐢ㄦ埛鍒涘缓鐧诲綍璐︽埛(濡傛灉杩樻病鏈)锛岀敤鏉ヨ繍琛MySQL鏈嶅姟鍣紝骞跺湪/etc/init.d/鍒涘缓鐩稿簲鏉$洰锛屼互渚垮湪寮曞鏃惰嚜鍔ㄥ惎鍔ㄦ湇鍔″櫒銆(杩欐剰鍛崇潃濡傛灉浣犲凡缁忓畨瑁呭苟涓斿凡缁忔洿鏀瑰惎鍔ㄨ剼鏈紝浣犲彲鑳借澶嶅埗鑴氭湰锛屼互渚夸綘瀹夎鏂RPM鏃 涓嶄細涓㈡帀鑴氭湰)銆傚叧浜庣郴缁熷惎鍔ㄦ椂濡備綍鑷姩鍚姩MySQL鐨勮缁嗕俊鎭紝鍙傝 2.9.2.2鑺傦紝鈥滆嚜鍔ㄥ惎鍔ㄥ拰鍋滄MySQL鈥銆
濡傛灉鎯宠鍦ㄦ棫鐨勪笉鏀寔/etc/init.d(鐩存帴鎴栭氳繃绗﹀彿杩炴帴)鍒濆鍖栬剼鏈殑Linux鍒嗗彂鐗堜腑瀹夎MySQL RPM锛屼綘搴斿綋鍒涘缓涓涓寚鍚戝垵濮嬪寲鑴氭湰瀹為檯瀹夎鐨勪綅缃殑绗﹀彿杩炴帴銆備緥濡傦紝濡傛灉瀹夎浣嶇疆涓/etc/rc.d/init.d锛屽畨瑁RPM鍓嶄娇鐢ㄨ繖浜涘懡浠ゅ垱寤/etc/init.d锛屼綔涓烘寚鍚戣浣嶇疆鐨勭鍙疯繛鎺ワ細
shell> cd /etc
shell> ln -s rc.d/init.d銆
鐩墠涓昏Linux鍒嗗彂鐗堝簲褰撴敮鎸佷娇鐢/etc/init.d鐨勬柊鐩綍甯冨眬锛屽洜涓洪渶瑕LSB(Linux鏍囧噯鍩)鍏煎鎬с
濡傛灉浣犲畨瑁呯殑RPM鏂囦欢鍖呮嫭MySQL-server锛屽畨瑁呭悗MySQLd鏈嶅姟鍣ㄥ簲褰撹兘鍚姩骞惰繍琛屻備綘搴斿綋鑳戒娇鐢MySQL鍚姩銆
濡傛灉鍑虹幇闂锛屽彲浠ヤ粠浜岃繘鍒跺畨瑁呴儴鍒嗘壘鍒拌缁嗕俊鎭2.7鑺傦紝鈥滃湪鍏跺畠绫籙nix绯荤粺涓畨瑁匨ySQL鈥銆
娉ㄩ噴锛MySQL鎺堟潈琛ㄤ腑鐨勮处鎴峰紑濮嬫病鏈夊瘑鐮併傚惎鍔ㄦ湇鍔″櫒鍚庯紝搴斿綋鎸夌収2.9鑺傦紝鈥滃畨瑁呭悗鐨勮缃拰娴嬭瘯鈥涓殑璇存槑涓哄畠浠缃瘑鐮併
鍙互鍦Mac OS X 10.2.x(鈥Jaguar鈥)鍜屼互涓婄増鏈笂Mac OS X浣跨敤浜岃繘鍒跺畨瑁呰蒋浠跺寘鐨PKG鏍煎紡浠f浛浜岃繘鍒跺垎鍙戠増鏉ュ畨瑁MySQL銆傝娉ㄦ剰璇ヨ蒋浠跺寘涓嶆敮鎸佹棫鐗堟湰鐨Mac OS X(渚嬪锛10.1.x)銆
瀹夎杞欢鍖呬綅浜庣‖鐩樻槧璞(.dmg)鏂囦欢涓紝蹇呴』棣栧厛鍙屽嚮鎼滅储璧蜂腑鐨勫浘鏍囨潵瀹夎璇ユ枃浠躲傚簲褰撳畨瑁呭浘鍍忓苟鏄剧ず鍏跺唴瀹广
瑕佹兂鑾峰緱MySQL锛屽弬瑙2.1.3鑺傦紝鈥滄庢牱鑾峰緱MySQL鈥銆
娉ㄩ噴锛鍦ㄧ户缁畨瑁呭墠锛屼竴瀹氳浣跨敤MySQL绠$悊鍣ㄥ簲鐢ㄧ▼搴(鍦Mac OS X鏈嶅姟鍣ㄤ笂)鎴栭氳繃鍛戒护琛岀殑mysqladmin shutdown鍏抽棴鎵鏈夎繍琛MySQL鏈嶅姟鍣ㄥ疄渚嬨
瑕佹兂瀹夎MySQL PKG鏂囦欢锛屽弻鍑昏蒋浠跺寘鍥炬爣銆傚皢鍚姩Mac OS X瀹夎杞欢鍖呭畨瑁呭櫒锛屽皢鎸囧浣犲畬鎴MySQL瀹夎銆
Mac OS X瀹夎杞欢鍖呯殑瀹夎鍣ㄤ腑鏈変竴涓己闄凤紝浣犱細鍦ㄧ洰鏍囩洏閫夋嫨瀵硅瘽妗嗕腑鍙戠幇璇ラ敊璇秷鎭細
You cannot install this software on this disk. (null)
濡傛灉鍑虹幇璇ラ敊璇紝鍙渶瑕佺偣鍑Go Back鎸夐挳杩斿洖鍓嶉潰鐨勭獥鍙c傜劧鍚庣偣鍑Continue鍐嶆閫夋嫨鐩爣鐩橈紝姝ゆ椂搴斿綋鍙互姝g‘鍦伴夋嫨鐩爣鐩樸傛垜浠凡缁忓悜Apple鎶ュ憡浜嗚缂洪櫡锛屽畠姝e湪璋冩煡璇ラ棶棰樸
MySQL鐨Mac OS X PKG瀹夎鍒/usr/local/mysql-VERSION锛屽苟涓旇繕浼氬畨瑁呬竴涓鍙疯繛鎺ワ紝/usr/local/mysql锛屾寚鍚戞柊鐨勪綅缃傚鏋滄湁/usr/local/mysql鐩綍锛岄鍏堝皢瀹冩敼鍚嶄负/usr/local/mysql.bak銆傚畨瑁呭畬鍚庯紝瀹夎鍣ㄦ墽琛mysql_install_db鍦MySQL鏁版嵁搴撲腑鍒涘缓鎺堟潈琛ㄣ
瀹夎甯冨眬涓tar鏂囦欢浜岃繘鍒跺垎鍙戠増绫讳技锛涙墍鏈MySQL浜岃繘鍒朵唬鐮佷綅浜庣洰褰/usr/local/mysql/bin涓傞粯璁ゆ儏鍐碉紝MySQL濂楁帴瀛楁枃浠跺垱寤轰负/tmp/mysql.sock銆傝鍙傝2.1.5鑺傦紝鈥滃畨瑁呭竷灞鈥銆
MySQL瀹夎闇瑕Mac OS X鐨mysql鐢ㄦ埛璐︽埛銆傚湪Mac OS X 10.2鍙婁互涓婄増鏈腑锛岄粯璁ゆ儏鍐靛簲瀛樺湪mysql鐢ㄦ埛璐︽埛銆
濡傛灉姝h繍琛Mac OS X鏈嶅姟鍣紝闇瑕佸畨瑁MySQL銆傞殢Mac OS X鏈嶅姟鍣ㄧ増鏈畨瑁呯殑MySQL鐗堟湰濡備笅琛ㄦ墍绀猴細
Mac OS X鏈嶅姟鍣ㄧ増鏈 |
MySQL鐗堟湰 |
10.2-10.2.2 |
3.23.51 |
10.2.3-10.2.6 |
3.23.53 |
10.3 |
4.0.14 |
10.3.2 |
4.0.16 |
10.4.0 |
4.1.10a |
鏈妭鍙鐩栧畼鏂MySQL Mac OS X PKG鐗堟湰銆備竴瀹氳闃呰Apple鍏充簬MySQL瀹夎鐨勫府鍔╀俊鎭細杩愯鈥甯姪瑙嗗浘鈥濆簲鐢ㄧ▼搴忥紝閫夋嫨鈥Mac OS X鏈嶅姟鍣鈥濆府鍔╋紝鎼滅储鈥MySQL鈥濓紝闃呰鏍囬涓衡瀹夎MySQL鈥濈殑鍐呭銆
瀵逛簬Mac OS X鏈嶅姟鍣ㄤ笂宸茬粡瀹夎鐨MySQL鐗堟湰锛屽鏋滄棭浜4.0锛屽簲鐗瑰埆娉ㄦ剰搴斿綋浣跨敤mysqld_safe鑰屼笉鏄safe_mysqld鏉ュ惎鍔mysqld銆
濡傛灉浣犲墠闈㈠湪Mac OS X涓婂畨瑁呬簡浠http://www.entropy.ch涓嬭浇鐨Marc Liyanage鐨MySQL杞欢鍖咃紝浣犲彲浠ュ彧浣跨敤璇ラ〉缁欏嚭鐨勪簩杩涘埗瀹夎甯冨眬鎸夌収鏇存柊璇存槑鏉ュ畨瑁呫
濡傛灉浣犱粠Marc鐨3.23.xx 鐗堟湰鎴栦粠Mac OS X鐨MySQL鏈嶅姟鍣ㄧ増鏈崌绾у埌瀹樻柟MySQL PKG锛屼綘杩橀渶瑕佸皢宸叉湁MySQL鎺堟潈琛ㄨ浆鎹负褰撳墠鏍煎紡锛屽洜涓哄凡缁忓姞浜嗚澶氭柊鐨勫畨鍏ㄦ潈闄愩傝鍙傝2.10.2鑺傦紝鈥滃崌绾ф巿鏉冭〃鈥銆
濡傛灉浣犳兂鍦ㄧ郴缁熷惎鍔ㄨ繃绋嬩腑鑷姩鍚姩MySQL锛屼綘杩橀渶瑕佸畨瑁MySQL Startup Item銆傚湪MySQL 5.1涓,瀹冩槸Mac OS X瀹夎鐩樻槧鍍忕殑涓閮ㄥ垎锛屾槸涓涓嫭绔嬬殑瀹夎杞欢鍖呫傚彧闇瑕佸弻鍑MySQLStartupItem.鍥炬爣骞舵寜鐓ц鏄庢潵瀹夎銆
璇锋敞鎰Startup Item鍙渶瑕佸畨瑁呬竴娆★紒涓嶉渶瑕佸湪浠ュ悗姣忔鍗囩骇MySQL杞欢鍖呮椂閮藉畨瑁呭畠銆
MySQL 5.1鐨Startup Item瀹夎鍦/Library/StartupItems/MySQLCOM銆(鍦MySQL 4.1.2浠ュ墠鐨勭増鏈,瀹夎浣嶇疆涓/Library/StartupItems/MySQL锛屼絾涓Mac OS X鏈嶅姟鍣ㄥ畨瑁呯殑MySQL Startup Item鍐茬獊)銆Startup Item瀹夎鏃跺湪绯荤粺閰嶇疆鏂囦欢/etc/hostconfig涓姞鍏ュ彉閲MySQLCOM=-YES-銆傚鏋滀綘鎯宠disable鑷姩鍚姩MySQL锛屽彧闇瑕佸皢璇ュ彉閲忔洿鏀逛负MySQLCOM=-NO-銆
鍦Mac OS X鏈嶅姟鍣ㄤ笂锛岄粯璁MySQL瀹夎浣跨敤/etc/hostconfig鏂囦欢涓殑鍙橀噺MySQL銆MySQL AB Startup Item瀹夎鍣ㄥ皢鍏惰缃负MySQL=-NO-绂佺敤璇ュ彉閲忋傝繖鏍峰彲浠ラ伩鍏嶅惎鍔ㄦ椂闂翠笌MySQL AB Startup Item浣跨敤鐨MySQLCOM鍙橀噺鍐茬獊銆備絾鏄紝涓嶄細鍏抽棴杩愯鐨MySQL鏈嶅姟鍣ㄣ備綘搴斿綋鑷繁鍏抽棴銆
瀹夎瀹屽悗锛屽彲浠ュ湪缁堢绐楀彛杩愯涓嬮潰鐨勫懡浠ゆ潵鍚姩MySQL銆備綘蹇呴』鍏锋湁绠$悊鍛樻潈闄愭潵鎵ц璇ヤ换鍔°
濡傛灉浣犲凡缁忓畨瑁呯殑Startup Item锛
shell> sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
(Enter your password, if necessary)
(Press Control-D or enter "exit" to exit the shell)
濡傛灉涓嶄娇鐢Startup Item锛岃緭鍏ヤ笅闈㈢殑鍛戒护搴忓垪锛
shell> cd /usr/local/mysql
shell> sudo ./bin/mysqld_safe
(Enter your password, if necessary)
(Press Control-Z)
shell> bg
(Press Control-D or enter "exit" to exit the shell)
浣犲簲褰撹兘澶熻繛鎺MySQL鏈嶅姟鍣紝渚嬪锛岄氳繃杩愯/usr/local/mysql/bin/mysql鏉ヨ繛鎺ャ
娉ㄩ噴锛MySQL鎺堟潈琛ㄤ腑鐨勮处鎴峰紑濮嬫病鏈夊瘑鐮併傚惎鍔ㄦ湇鍔″櫒鍚庯紝搴斿綋鎸夌収2.9鑺傦紝鈥滃畨瑁呭悗鐨勮缃拰娴嬭瘯鈥涓殑璇存槑鏉ヨ缃瘑鐮併
浣犲彲浠ヤ负澶栧3婧愭枃浠惰捣涓涓埆鍚嶏紝浣垮畠鏇村鏄撹闂父鐢ㄧ殑绋嬪簭锛屼緥濡備粠鍛戒护琛岃繍琛mysql鍜mysqladmin銆tcsh璇硶涓猴細
aliasMySQL /usr/local/mysql/bin/mysql
aliasMySQLadmin /usr/local/mysql/bin/mysqladmin
瀵逛簬bash锛屼娇鐢細
aliasMySQL=/usr/local/mysql/bin/mysql
aliasMySQLadmin=/usr/local/mysql/bin/mysqladmin
鏈濂芥槸鍦PATH鐜鍙橀噺涓姞鍏/usr/local/mysql/bin銆備緥濡傦紝濡傛灉澶栧3鍛戒护鏄tcsh锛屽湪$HOME/.tcshrc鏂囦欢涓姞鍏ヤ笅闈竴琛岋細
setenv PATH ${PATH}:/usr/local/mysql/bin
濡傛灉鏍圭洰褰曚腑娌℃湁.tcshrc鏂囦欢锛屽垯鐢ㄦ枃鏈紪杈戝櫒鍒涘缓璇ユ枃浠躲
濡傛灉浣犲宸叉湁鐨勫畨瑁呰繘琛屽崌绾э紝璇锋敞鎰忓畨瑁呮柊MySQL PKG鏃朵笉浼氬嵏杞芥棫鐨勫畨瑁呯洰褰曘傞仐鎲剧殑鏄紝Mac OS X瀹夎鍣ㄥ皻鏈彁渚涘姛鑳芥潵姝g‘鍗囩骇鍓嶉潰瀹夎鐨勮蒋浠跺寘銆
瑕佹兂鍦ㄦ柊瀹夎涓娇鐢ㄥ凡鏈夌殑鏁版嵁搴擄紝浣犻渶瑕佸皢鏃ф暟鎹洰褰曚腑鐨勫唴瀹瑰鍒跺埌鏂扮殑鏁版嵁鐩綍銆傛墽琛岃鎿嶄綔鏃讹紝纭繚鍏抽棴鏂般佹棫鏈嶅姟鍣ㄣ傚皢浠ュ墠瀹夎鐨MySQL鏁版嵁搴撴枃浠舵嫹璐濊繃鏉ュ苟鎴愬姛鍚姩鏂扮殑鏈嶅姟鍣ㄥ悗锛屽簲褰撳嵏杞芥棫鐨勬枃浠朵互鑺傜渷纭洏绌洪棿銆傚苟涓旓紝杩樺簲褰撳嵏鎺変綅浜/Library/Receipts/mysql-VERSION.pkg鐨勬棫鐗堟湰Package Receipt鐩綍銆
灏MySQL瑁呭叆鍒NetWare棣栧厛鐢Novell瀹炵幇銆Novell瀹㈡埛搴斿綋婊℃剰锛NetWare 6.5涓崋缁戜簡SQL浜岃繘鍒讹紝骞跺叿鏈夎嚜鍔ㄥ晢涓氫娇鐢ㄨ鍙紝鐢ㄤ簬杩愯璇ョ増鏈NetWare鐨勬墍鏈夋湇鍔″櫒銆
NetWare鐨MySQL浣跨敤NetWare鐨Metrowerks CodeWarrior鍜屼笓鐢ㄨ法缂栬瘧鐗GNU鑷姩宸ュ叿缂栬瘧鑰屾垚銆
鍙互浠http://dev.mysql.com/downloads/鑾峰緱鏈鏂扮殑浜岃繘鍒惰蒋浠跺寘NetWare銆傝鍙傝2.1.3鑺傦紝鈥滄庢牱鑾峰緱MySQL鈥銆
涓轰簡浣MySQL椹荤暀鍦ㄤ富鏈轰笂锛NetWare鏈嶅姟鍣ㄥ繀椤绘弧瓒充互涓嬭姹傦細
路 瀹夎鐨NetWare 6.5 鎴NetWare 6.0鐨Latest Support Pack锛堟渶鏂版敮鎸佽ˉ涓侊級銆
路 绯荤粺蹇呴』婊¤冻Novell鐨勬渶浣庤姹備互杩愯鐩稿叧鐗堟湰鐨NetWare銆
路 MySQL鏁版嵁鍙婂叾浜岃繘鍒讹紝蹇呴』瀹夎鍒NSS鍗峰唴锛涗笉鏀寔浼犵粺鍗枫
瑕佹兂鍦NetWare涓嬪畨瑁MySQL锛岄伒浠庝笅闈㈢殑姝ラ锛
1. 濡傛灉浣犲鍓嶉潰鐨勫畨瑁呰繘琛屽崌绾э紝鍋滄MySQL鏈嶅姟鍣ㄣ傚簲浣跨敤涓嬮潰鐨勫懡浠や粠鏈嶅姟鍣ㄦ帶鍒跺彴瀹屾垚锛
2. SERVER: mysqladmin -u root shutdown
3. 浠庡鎴风鐧诲綍鍒扮洰鏍囨湇鍔″櫒涓婏紝璁块棶瀹夎MySQL鐨勪綅缃
4. 灏嗕簩杩涘埗杞欢鍖Zip鏂囦欢鎻愬彇鍒版湇鍔″櫒涓娿備竴瀹氳浣跨敤Zip鏂囦欢涓殑璺緞銆傜畝鍗曞湴灏嗘枃浠舵彁鍙栧埌SYS锛\鏄緢瀹夊叏鐨勩
濡傛灉浣犱粠鍓嶉潰鐨勫畨瑁呭崌绾э紝浣犲彲鑳介渶瑕佸鍒舵暟鎹洰褰(渚嬪锛SYS:MYSQL\DATA)鍜my.cnf锛堝鏋滀綘宸茬粡瀹氬埗锛夈傜劧鍚庝綘鍙互鍒犻櫎鏃х増鏈殑MySQL銆
5. 浣犲彲浠ュ皢鐩綍閲嶆柊鍛藉悕涓烘洿鍔犱竴鑷村拰鏄撲簬浣跨敤鐨勫悕绉般傚湪鏈墜鍐岀殑渚嬪瓙涓娇鐢SYS锛MYSQL鏉ユ寚鍚戝畨瑁呯洰褰曘
璇锋敞鎰忓湪NetWare涓婂畨瑁MySQL涓嶄細妫娴嬪埌鏄惁宸茬粡瀹夎浜NetWare鍙戝竷涔嬪鐨MySQL鐗堟湰銆傚洜姝わ紝濡傛灉浣犲凡缁忓湪SYS锛\MYSQL瀹夎浜嗕粠缃戠珯涓婁笅杞界殑鏈鏂MySQL鐗堟湰(渚嬪锛MySQL 4.1鎴栨洿鏂扮増鏈)锛屽湪鍗囩骇NetWare鏈嶅姟鍣ㄤ箣鍓嶏紝蹇呴』閲嶆柊鍛藉悕鏂囦欢澶癸紱鍚﹀垯锛SYS锛\MySQL涓殑鏂囦欢浼氳NetWare Support Pack涓殑鐗堟湰鎵瑕嗙洊銆
6. 鍦ㄦ湇鍔″櫒鎺у埗鍙颁腑锛屽姞鍏ュ惈鏈 MySQL NLM鐨勭洰褰曠殑鎼滅储璺緞銆備緥濡傦細
7. SERVER: SEARCH ADD SYS:MYSQL\BIN
8. 鍒濆鍖栨暟鎹洰褰曞拰鎺堟潈琛紝濡傛灉闇瑕侊紝搴斿湪鏈嶅姟鍣ㄦ帶鍒跺彴鎵цmysql_install_db銆
9. 鍦ㄦ湇鍔″櫒鎺у埗鍙颁娇鐢mysqld_safe鍚姩MySQL鏈嶅姟鍣ㄣ
10.瑕佸畬鎴愬畨瑁咃紝杩樺簲褰撳湪autoexec.ncf涓姞鍏ヤ互涓嬪懡浠ゃ備緥濡傦紝濡傛灉MySQL瀹夎鍦SYS锛MYSQL涓紝浣犳兂璁MySQL鑷姩鍚姩锛屽彲浠ュ姞鍏ヤ互涓嬭锛
11. #Starts the MySQL 5.1.x database server
12. SEARCH ADD SYS:MYSQL\BIN
13. MYSQLD_SAFE
濡傛灉MySQL杩愯鍦NetWare 6.0涓,鎴戜滑寮虹儓寤鸿浣犲湪鍛戒护琛屼腑浣跨敤--skip-external-locking閫夐」锛
#Starts the MySQL 5.1.x database server
SEARCH ADD SYS:MYSQL\BIN
MYSQLD_SAFE --skip-external-locking
杩橀渶瑕佷娇鐢CHECK TABLE鍜REPAIR TABLE鏉ユ浛浠myisamchk锛屽洜涓myisamchk浣跨敤澶栭儴閿併傚凡缁忕煡閬撳閮ㄩ攣鍦NetWare 6.0涓湁闂锛涘湪NetWare 6.5涓凡缁忚В鍐充簡璇ラ棶棰樸
NetWare涓殑mysqld_safe鎻愪緵浜嗙獥鍙d繚鐣欏姛鑳姐傚綋鍗歌浇(鍏抽棴)mysqld_safe NLM鏃讹紝榛樿鎯呭喌绐楀彛涓嶄細娑堝け銆傜浉鍙嶏紝浼氭彁绀虹敤鎴疯緭鍏ワ細
*<NLM has terminated; Press any key to close the screen>*
濡傛灉浣犳兂璁NetWare鑷姩鍏抽棴绐楀彛锛屽湪mysqld_safe涓浣跨敤--autoclose閫夐」銆備緥濡傦細
#Starts the MySQL 5.1.x database server
SEARCH ADD SYS:MYSQL\BIN
MYSQLD_SAFE --autoclose
14.褰撻娆″畨瑁呮垨浠庡墠闈㈢殑鐗堟湰鍗囩骇MySQL 5.1鐗堟椂锛屽簲涓嬭浇骞跺畨瑁呮渶鏂扮殑鐩稿簲Perl妯″潡鍜PHP鎵╁睍鍚嶏細
路 Perl for NetWare: http://forge.novell.com/modules/xfcontent/downloads.php/perl/Modules/
路 PHP for NetWare: http://forge.novell.com/modules/xfcontent/downloads.php/php/Modules/
(MySQL 4.1鐨PHP 5鎵╁睍鍚嶉傜敤浜MySQL 5.1)銆
鍦5.1.3鑺傦紝鈥渕ysqld_safe锛歁ySQL鏈嶅姟鍣ㄥ惎鍔ㄨ剼鏈涓缁嗘弿杩颁簡NetWare涓殑mysqld_safe鐨勮涓恒
濡傛灉鏈嶅姟鍣ㄤ笂宸茬粡瀹夎浜MySQL锛屼竴瀹氳妫鏌autoexec.ncf涓凡鏈夌殑MySQL鍚姩鍛戒护锛屽鏋滈渶瑕佸垯缂栬緫鎴栧垹闄よ繖浜涘懡浠ゃ
娉ㄩ噴锛MySQL鎺堟潈琛ㄤ腑鐨勫垵濮嬭处鎴锋病鏈夊瘑鐮併傚惎鍔ㄦ湇鍔″櫒鍚庯紝浣犲簲褰撲娇鐢2.9鑺傦紝鈥滃畨瑁呭悗鐨勮缃拰娴嬭瘯鈥涓殑璇存槑鏉ヨ缃瘑鐮併
鏈妭浠嬬粛鍦ㄥ悇绉嶅钩鍙颁笂瀹夎tar鍘嬬缉鏂囦欢鏍煎紡鐨MySQL浜岃繘鍒跺垎鍙戠増(鏂囦欢鏈.tar.gz 鎵╁睍鍚)銆傝缁嗙洰褰曞弬瑙2.1.2.5鑺傦紝鈥淢ySQL AB缂栬瘧鐨凪ySQL浜岃繘鍒剁増鏈銆
瑕佹兂鑾峰緱MySQL锛屽弬瑙2.1.3鑺傦紝鈥滄庢牱鑾峰緱MySQL鈥銆
MySQLtar鏂囦欢浜岃繘鍒跺垎鍙戠増鐨勬枃浠跺悕鏍煎紡涓mysql-VERSION-OS.tar.gz锛屽叾涓VERSION鏄増鏈彿(渚嬪锛5.1.2-alpha)锛OS琛ㄧず鍒嗗彂鐗堝畨瑁呯殑鎿嶄綔绯荤粺绫诲瀷(渚嬪锛pc-linux-i686)銆
闄や簡杩欎簺閫氱敤杞欢鍖咃紝鎴戜滑杩樹负鍚勫钩鍙版彁渚涗簡鍏蜂綋鐨勪簩杩涘埗瀹夎杞欢鍖呫傚叧浜庡浣曞畨瑁呯殑璇︾粏淇℃伅鍙傝2.2鑺傦紝鈥滀娇鐢ㄤ簩杩涘埗鍒嗗彂鐗堢殑鏍囧噯MySQL瀹夎鈥銆
浣犻渶瑕佷笅闈㈢殑宸ュ叿鏉ュ畨瑁MySQL tar鏂囦欢浜岃繘鍒跺垎鍙戠増锛
路 GNU gunzip瑙e帇缂╁垎鍙戠増銆
路 涓涓傚綋鐨tar瑙e寘鍒嗗彂鐗堛 GNU tar宸茬煡鍙互銆備竴浜涙搷浣滅郴缁熶腑鍚湁棰勫畨瑁呯殑tar锛屽凡鐭ユ湁闂銆備緥濡傦紝宸茬煡Mac OS X tar鍜Sun tar瀵逛簬闀挎枃浠跺悕鏈夐棶棰樸傚湪Mac OS X涓紝浣犲彲浠ヤ娇鐢ㄩ瀹夎鐨gnutar绋嬪簭銆傚湪鍏跺畠绯荤粺涓嫢tar涓嶅畬鍠勶紝浣犲簲褰撻鍏堝畨瑁GNU tar銆
濡傛灉浣犻亣鍒伴棶棰橈紝鍦ㄦ妸闂瀵勫埌MySQL閭欢鐩綍鏃讹紝璇蜂竴瀹氫娇鐢mysqlbug锛屽氨绠楅棶棰樹笉鏄竴涓己闄凤紝mysqlbug涔熶細鏀堕泦绯荤粺淇℃伅锛屽皢鏈夊姪浜庡叾瀹冧汉瑙e喅浣犵殑闂銆備笉浣跨敤mysqlbug锛屼綘灏嗗噺灏戝緱鍒颁綘闂鐨勪竴涓В鍐虫柟妗堢殑鍙兘鎬э紒鍦ㄤ綘瑙e寘鍒嗗彂鐗堝悗锛屼綘浼鍦ㄢbin鈥鐩綍涓嬫壘鍒mysqlbug銆傝鍙傝1.7.1.3鑺傦紝鈥滃浣曢氭姤缂洪櫡鍜岄棶棰樷銆
蹇呴』鎵ц浠ヤ究瀹夎骞朵娇鐢MySQL浜岃繘鍒跺垎鍙戠増鐨勫熀鏈懡浠ゆ槸锛
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
娉ㄩ噴锛璇ヨ繃绋嬫湭璁剧疆MySQL璐︽埛鐨勫瘑鐮併傚畬鎴愪笅闈㈢殑杩囩▼鍚庯紝缁х画鎵ц鎯2.9鑺傦紝鈥滃畨瑁呭悗鐨勮缃拰娴嬭瘯鈥銆
涓嬮潰涓哄畨瑁呬簩杩涘埗鍒嗗彂鐗堢殑鏇磋缁嗙殑鎻忚堪锛
1. 涓mysqld澧炲姞涓涓櫥褰曠敤鎴峰拰缁勶細
2. shell> groupadd mysql
3. shell> useradd -g mysql mysql
杩欎簺鍛戒护灏嗗鍔MySQL缁勫拰MySQL鐢ㄦ埛銆備笉鍚岀増鏈殑Unix涓紝useradd鍜groupadd鐨勮娉曞彲鑳戒細绋嶆湁涓嶅悓銆傝繕鍙互绉颁负adduser鍜addgroup銆
浣犲彲鑳戒細灏嗚繖浜涚敤鎴峰拰缁勫懡鍚嶄负mysql涔嬪鐨勫悕绉般傚鏋滄槸杩欐牱锛屽湪涓嬮潰鐨勬楠や腑鏇挎崲涓虹浉搴旂殑鍚嶇О銆
4. 鎸戦変竴涓綘鎯宠В寮鍒嗗彂鍖呯殑鐩綍锛岃繘鍏ヨ鐩綍銆傚湪涓嬮潰鐨勪緥瀛愪腑锛屾垜浠皢鍒嗗彂瑙e寘鍦ㄢ/usr/local鈥濅笅锛堝洜姝わ紝涓嬪垪璇存槑鍋囪浣犳湁鏉冮檺鍦ㄢ/usr/local鈥濅腑鍒涘缓鏂囦欢鍜岀洰褰曪紝濡傛灉璇ョ洰褰曡淇濇姢锛屼綘闇瑕佷互root瀹炴柦瀹夎锛銆
5. shell> cd /usr/local
6. 浠2.1.3鑺傦紝鈥滄庢牱鑾峰緱MySQL鈥涓垪鍑虹殑绔欑偣涔嬩竴鑾峰緱涓涓垎鍙戞枃浠躲傚浜庝竴涓粰瀹氱殑鐗堟湰锛屾墍鏈夊钩鍙扮殑浜岃繘鍒跺垎鍙戠増鍧囦粠鐩稿悓鐨MySQL婧愮爜鍒嗗彂鐗堟瀯寤恒
7. 瑙e寘鍒嗗彂鐗堬紝灏嗗垱寤哄畨瑁呯洰褰曘傜劧鍚庣敓鎴愬埌璇ョ洰褰曠殑涓涓鍙烽摼鎺ワ細
8. shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
9. shell> ln -s full-path-to-mysql-VERSION-OS mysql
tar鍛戒护鍒涘缓mysql-VERSION-OS鐩綍銆ln鍛戒护鐢熸垚鍒拌鐩綍鐨勪竴涓鍙烽摼鎺ャ傝繖璁╀綘鏇村鏄撳湴鎶婂畨瑁呯洰褰曟寚瀹氫负/usr/local/mysql銆
浣跨敤GNU tar锛屽垯涓嶅啀闇瑕gunzip銆傚彲浠ョ敤涓嬮潰鐨勫懡浠ゆ浛鎹㈢涓琛屾潵瑙e寘鍜屾彁鍙栧垎鍙戠増锛
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
10.杩涘叆瀹夎鐩綍锛
11. shell> cd mysql
浣犱細鍦mysql鐩綍涓嬪彂鐜板嚑涓枃浠跺拰瀛愮洰褰曪紝瀵瑰畨瑁呯洰鐨勬渶閲嶈鐨勬槸鈥bin鈥濆拰鈥scripts鈥濆瓙鐩綍銆
路 bin
杩欎釜鐩綍鍖呭惈瀹㈡埛绔▼搴忓拰鏈嶅姟鍣紝浣犲簲璇ユ妸杩欎釜鐩綍鐨勫畬鏁磋矾寰勫姞鍒PATH鐜鍙橀噺锛屼互渚shell鑳芥纭殑鎵惧埌MySQL绋嬪簭銆傝鍙傝闄勫綍F锛鐜鍙橀噺銆
路 scripts
杩欎釜鐩綍鍖呭惈mysql_install_db鑴氭湰锛岀敤鏉ュ垵濮嬪寲mysql鏁版嵁搴撶殑 鎺堟潈琛紝鍏朵腑璐瓨浜嗘湇鍔″櫒璁块棶鍏佽銆
12.濡傛灉杩樻病鏈夊畨瑁MySQL锛屽繀椤诲垱寤MySQL鎺堟潈琛細
13. shell> scripts/mysql_install_db --user=mysql
濡傛灉浣犵敤root杩愯鍛戒护锛屽簲褰撲娇鐢--user閫夐」銆傞夐」鐨勫煎簲涓庝綘鍦ㄧ涓姝ヤ负杩愯鏈嶅姟鍣ㄦ墍鍒涘缓鐨勭櫥褰曡处鎴风浉鍚屻傚鏋滀綘鐢ㄨ鐢ㄦ埛鐧诲綍鏉ヨ繍琛屽懡浠わ紝鍙互鐪佺暐--user閫夐」銆
鍒涘缓鎴栧崌绾ф巿鏉冭〃鍚庯紝闇瑕佹墜鍔ㄩ噸鏂板惎鍔ㄦ湇鍔″櫒銆
14.灏嗙▼搴忎簩杩涘埗鐨勬墍鏈夋潈鏀逛负root锛鏁版嵁鐩綍鐨勬墍鏈夋潈鏀逛负杩愯mysqld 鐨勭敤鎴枫傚鏋滀綅浜庡畨瑁呯洰褰(/usr/local/mysql)涓嬶紝鍛戒护搴斾负锛
15. shell> chown -R root .
16. shell> chown -R mysql data
17. shell> chgrp -R mysql .
绗竴涓懡浠ゅ皢鏂囦欢鐨勬墍鏈夊睘鎬ф敼涓root鐢ㄦ埛銆傜浜屼釜鍛戒护灏嗘暟鎹洰褰曠殑鎵鏈夊睘鎬ф敼涓mysql鐢ㄦ埛銆傜涓変釜鍛戒护灏嗙粍灞炴ф敼涓mysql缁勩
18.濡傛灉浣犲枩娆㈠湪寮曞鏈哄櫒鏃惰嚜鍔ㄥ惎鍔MySQL锛屽彲浠ユ嫹璐support-files/mysql.server鏂囦欢鍒扮郴缁熸湁鍚姩鏂囦欢鐨勫湴鏂广傛洿澶氱殑淇℃伅鍙互鍦support-files/mysql.server鑴氭湰涓拰2.9.2.2鑺傦紝鈥滆嚜鍔ㄥ惎鍔ㄥ拰鍋滄MySQL鈥涓壘鍒般
19.濡傛灉瀹夎浜DBI鍜DBD::mysql Perl妯″潡锛屽彲浠ヤ娇鐢bin/mysql_setpermission鑴氭湰澧炲姞鏂拌处鎴枫傚叧浜庤鏄庯紝鍙傝 2.13鑺傦紝鈥淧erl瀹夎娉ㄦ剰浜嬮」鈥銆
20.濡傛灉浣犳兂浣跨敤mysqlaccess鑰屽湪鏌愪釜闈炴爣鍑嗙殑鍦扮偣鏈MySQL鍒嗗彂鐗堬紝浣犲繀椤绘敼鍙樺湴鐐癸紝鍦ㄩ偅鍎mysqlaccess鏈熸湜鎵惧埌mysql瀹㈡埛绔傜紪杈戔bin/mysqlaccess鈥濊剼鏈紝澶х害鍦ㄧ18琛岋紝瀵绘壘绫讳技涓嬮潰鐨勮锛
21. $MYSQL = '/usr/local/bin/mysql'; # path to mysql executable
鏀瑰彉璺緞浠ュ弽鏄犲嚭mysql瀹為檯瀛樺偍鍦ㄤ綘绯荤粺涓婄殑鍦扮偣銆傚鏋滀笉杩欐牱鍋氾紝褰撹繍琛mysqlaccess鏃讹紝浣犲皢閬囧埌涓涓broken pipe鐨勯敊璇
鍦ㄦ墍鏈変笢瑗胯瑙e寘骞朵笖瀹夎浠ュ悗锛屼綘搴旇鍒濆鍖栧苟涓旀祴璇曚綘鐨勫垎鍙戠増銆
鍙互鐢ㄤ笅鍒楀懡浠ゅ惎鍔MySQL鏈嶅姟鍣細
shell> bin/mysqld_safe --user=mysql &
鍏充簬mysqld_safe鐨勮缁嗕俊鎭弬瑙5.1.3鑺傦紝鈥渕ysqld_safe锛歁ySQL鏈嶅姟鍣ㄥ惎鍔ㄨ剼鏈銆
娉ㄩ噴锛MySQL鎺堟潈琛ㄤ腑鐨勮处鎴峰紑濮嬫病鏈夊瘑鐮併傚惎鍔ㄦ湇鍔″櫒鍚庯紝搴斿綋浣跨敤2.9鑺傦紝鈥滃畨瑁呭悗鐨勮缃拰娴嬭瘯鈥涓殑璇存槑鏉ヨ缃瘑鐮併
瀹夎婧愮爜涔嬪墠锛岄鍏堟鏌ユ垜浠殑浜岃繘鍒舵槸鍚﹂傚悎浣犵殑骞冲彴锛屾槸鍚﹀彲浠ュ伐浣溿傛垜浠仛浜嗗ぇ閲忕殑宸ヤ綔纭繚鎴戜滑鐨勪簩杩涘埗鐢ㄦ渶鍚堥傜殑閫夐」鏉ユ瀯寤恒
瑕佽幏寰MySQLa 婧愮爜鍒嗗彂鐗堬紝鍙傝2.1.3鑺傦紝鈥滄庢牱鑾峰緱MySQL鈥銆
MySQL婧愮爜鍒嗗彂鐗堜负tar鍘嬬缉鏂囦欢锛屾枃浠跺悕鏍煎紡涓mysql-VERSION.tar.gz锛屽叾涓 VERSION鏄増鏈彿锛屼緥濡5.1.2-alpha銆
浣犻渶瑕佷笅鍒楀伐鍏锋瀯閫犲苟瀹夎MySQL婧愮爜锛
路 GNU gunzip瑙e帇缂╄鍒嗗彂鐗堛
路 涓涓傚綋鐨tar瑙e寘鍒嗗彂鐗堛GNU tar宸茬煡鍙互銆備竴浜涙搷浣滅郴缁熶腑鍚湁棰勫畨瑁呯殑tar锛屽凡鐭ユ湁闂銆備緥濡傦紝宸茬煡Mac OS X tar鍜Sun tar瀵逛簬闀挎枃浠跺悕鏈夐棶棰樸傚湪Mac OS X涓紝浣犲彲浠ヤ娇鐢ㄩ瀹夎鐨gnutar绋嬪簭銆傚湪鍏跺畠绯荤粺涓嫢tar涓嶅畬鍠勶紝浣犲簲褰撻鍏堝畨瑁GNU tar銆
路 涓涓兘宸ヤ綔鐨ANSI C++缂栬瘧鍣ㄣgcc> = 2.95.2銆egcs> = 1.0.2鎴egcs 2.91.66銆SGI C++鍜SunPro C++鏄竴浜涘凡鐭ヨ兘宸ヤ綔鐨勭紪璇戝櫒銆傚綋浣跨敤gcc鏃讹紝涓嶉渶瑕libg++銆gcc2.7.x鏈変竴涓己闄凤紝浣垮緱瀹冨彲鑳戒笉鑳界紪璇戜竴浜涘畬鍏ㄥ悎娉曠殑C++鏂囦欢锛屼緥濡傗sql/sql_base.cc鈥濄傚鏋滀綘浠呮湁gcc2.7.x锛屼綘蹇呴』鍗囩骇gcc鎵嶈兘缂栬瘧MySQL銆傚凡鐭gcc 2.8.1鍦ㄦ煇浜涘钩鍙颁笂鏈変竴浜涢棶棰橈紝鍥犳濡傛灉骞冲彴涓婃湁鏂扮殑缂栬瘧鍣紝鍒欎笉瑕佷娇鐢gcc 2.8.1銆
缂栬瘧MySQL 3.23.x鏃讹紝寤鸿浣跨敤gcc 2.95.2鎴栨洿鏂扮増銆
路 涓涓紭绉鐨make绋嬪簭銆傛绘槸鎺ㄨ崘GNU make涓旀湁鏃跺繀椤讳娇鐢ㄣ傚鏋滀綘鏈夐棶棰锛鎴戜滑鎺ㄨ崘璇曚竴璇GNU make3.75鎴栨洿鏂扮増銆
濡傛灉浣犱娇鐢ㄧ殑gcc鐗堟湰瓒冲鏂帮紝鍙互璇嗗埆-fno-exceptions閫夐」锛屽垯浣跨敤璇ラ夐」闈炲父閲嶈銆傚惁鍒欙紝浣犵紪璇戜簩杩涘埗鏃跺嚭鐜伴棶棰樸傛垜浠缓璁綘鍚屾椂浣跨敤-felide-constructors鍜-fno-rtti閫夐」銆傚綋鏈夌枒闂椂锛屾墽琛屼笅闈㈡搷浣滐細
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors \
-fno-exceptions -fno-rtti" ./configure \
--prefix=/usr/local/mysql --enable-assembler \
--with-mysqld-ldflags=-all-static
鍦ㄥぇ澶氭暟绯荤粺涓紝鍙互寰楀埌蹇熴佺ǔ瀹氱殑浜岃繘鍒躲
濡傛灉浣犻亣鍒伴棶棰橈紝鍦ㄦ妸闂閭瘎鍒MySQL閭欢鐩綍鏃讹紝璇锋绘槸浣跨敤mysqlbug锛屽氨绠楅棶棰樹笉鏄竴涓己闄凤紝mysqlbug鏀堕泦绯荤粺淇℃伅锛屽皢鏈夊姪浜庡叾瀹冧汉瑙e喅浣犵殑闂銆備笉浣跨敤mysqlbug锛屼綘灏嗗噺灏戝緱鍒伴棶棰樼殑瑙e喅鏂规鐨勫彲鑳芥э紒鍦ㄨВ鍖呭垎鍙戠増鍚庯紝浣犱細鍦ㄢbin鈥鐩綍涓嬫壘鍒mysqlbug銆傝鍙傝1.7.1.3鑺傦紝鈥滃浣曢氭姤缂洪櫡鍜岄棶棰樷銆
浣犲繀椤绘墽琛岀殑瀹夎MySQL婧愮爜鍒嗗彂鐗堢殑鍩烘湰鍛戒护鏄細
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
濡傛灉浠庝竴涓簮鐮RPM寮濮嬶紝閭d箞鎵ц濡備笅鍛戒护锛
shell> rpmbuild --rebuild --clean MySQL-VERSION.src.rpm
杩欐牱浣犲埗浣滀竴涓彲浠ュ畨瑁呯殑浜岃繘鍒RPM銆傚浜庢棫鐗堟湰鐨RPM锛屼綘鍙兘闇瑕佹浛鎹㈢敤rpm鏇挎崲鍛戒护rpmbuild銆
娉ㄩ噴锛璇ヨ繃绋嬩笉涓轰换浣MySQL璐︽埛璁剧疆瀵嗙爜銆傚畬鎴愪笅闈㈢殑杩囩▼鍚庯紝鏍规嵁2.9鑺傦紝鈥滃畨瑁呭悗鐨勮缃拰娴嬭瘯鈥杩涜瀹夎鍚庣殑璁剧疆鍜屾祴璇曘
浠ヤ笅鏄畨瑁MySQL婧愮爜鍒嗗彂鐗堢殑鏇磋缁嗙殑鎻忚堪锛
1. 涓mysqld澧炲姞涓涓櫥褰曠敤鎴峰拰缁勶細
2. shell> groupadd mysql
3. shell> useradd -g mysql mysql
杩欎簺鍛戒护灏嗗鍔MySQL缁勫拰 MySQL鐢ㄦ埛銆備笉鍚岀増鏈殑Unix涓紝useradd 鍜groupadd鐨勮娉曞彲鑳戒細绋嶆湁涓嶅悓銆傝繕鍙互绉颁负adduser鍜addgroup銆
浣犲彲鑳戒細灏嗚繖浜涚敤鎴峰拰缁勫懡鍚嶄负mysql涔嬪鐨勫悕绉般傚鏋滄槸杩欐牱锛屽湪涓嬮潰鐨勬楠や腑鏇挎崲涓虹浉搴旂殑鍚嶇О銆
4. 鎸戦変竴涓綘鎯宠В寮鍒嗗彂鍖呯殑鐩綍锛岃繘鍏ヨ鐩綍銆
5. 浠2.1.3鑺傦紝鈥滄庢牱鑾峰緱MySQL鈥涓垪鍑虹殑绔欑偣涔嬩竴鑾峰緱涓涓垎鍙戞枃浠躲
6. 鍦ㄥ綋鍓嶇洰褰曚笅瑙e寘鍒嗗彂鐗堬細
7. shell> gunzip < /path/to/mysql-VERSION.tar.gz | tar xvf -
璇ュ懡浠ゅ垱寤mysql-VERSION 鐩綍銆
浣跨敤GNU tar锛屽垯涓嶅啀闇瑕gunzip銆備綘鍙互鐢ㄤ笅闈㈢殑鍛戒护鏉ヨВ鍖呭拰鎻愬彇鍒嗗彂锛
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
8. 杩涘叆瑙e寘鍒嗗彂鐗堢殑椤剁骇鐩綍锛
9. shell> cd mysql-VERSION
璇锋敞鎰忕洰鍓嶅繀椤讳粠椤剁骇鐩綍閰嶇疆鍜屾瀯寤MySQL銆備綘涓嶈兘鍦ㄥ叾瀹冪洰褰曚腑鏋勫缓銆
10.閰嶇疆鍙戝竷鐗堝苟涓旂紪璇戯細
11. shell> ./configure --prefix=/usr/local/mysql
12. shell> make
褰撲綘杩愯configure鏃讹紝浣犲彲鑳芥兂瑕佹寚瀹氫竴浜涢夐」锛岃繍琛./configure --help寰楀埌涓涓夐」鍒楄〃銆2.8.2鑺傦紝鈥滃吀鍨嬮厤缃夐」鈥璁ㄨ涓浜涘緢鏈夌敤鐨勯夐」銆
濡傛灉configure澶辫触锛屼綘灏嗗悜MySQL閭欢鐩綍鍙戦佸寘鍚綘璁や负鑳藉府浣犺В鍐宠闂鐨勫寘鍚config.log鈥濅腑鎵鏈夎鐨勯偖浠讹紝涔熻鍖呮嫭configure鐨勬渶鍚庡嚑琛岃緭鍑恒傜敤mysqlbug鑴氭湰閭瘎閿欒鎶ュ憡銆傝鍙傝1.7.1.3鑺傦紝鈥滃浣曢氭姤缂洪櫡鍜岄棶棰樷銆
濡傛灉缂栬瘧澶辫触锛屽弬瑙2.8.4鑺傦紝鈥滃鐞哅ySQL缂栬瘧闂鈥瀵绘眰甯姪銆
13.瀹夎鍒嗗彂鐗堬細
14. shell> make install
濡傛灉浣犳兂瑕佽缃竴涓夐」鏂囦欢锛屼娇鐢support-files鐩綍涓殑涓涓綔涓烘ā鏉裤備緥濡傦細
shell> cp support-files/my-medium.cnf /etc/my.cnf
鍙兘浣犻渶瑕佺敤root鐢ㄦ埛杩愯杩欎簺鍛戒护銆
濡傛灉鎯宠閰嶇疆涓烘敮鎸InnoDB琛紝搴斿綋缂栬緫/etc/my.cnf鏂囦欢锛屽幓鎺innodb_...寮濮嬮夐」琛屽墠闈㈢殑#绗︼紝骞跺皢閫夐」鍊兼敼涓轰綘鎯宠鐨勩傝鍙傝4.3.2鑺傦紝鈥滀娇鐢ㄩ夐」鏂囦欢鈥鍜15.2.3鑺傦紝鈥淚nnoDB閰嶇疆鈥銆
15.杩涘叆瀹夎鐩綍锛
16. shell> cd /usr/local/mysql
17.濡傛灉杩樻病鏈夊畨瑁呯殑MySQL锛屽繀椤诲垱寤MySQL鎺堟潈琛細
18. shell> bin/mysql_install_db --user=mysql
濡傛灉鐢root杩愯鍛戒护锛屽簲褰撲娇鐢--user閫夐」銆傞夐」鐨勫煎簲涓庝綘鍦ㄧ涓姝ヤ负杩愯鏈嶅姟鍣ㄦ墍鍒涘缓鐨勭櫥褰曡处鎴风浉鍚屻傚鏋滅敤璇ョ敤鎴风櫥褰曟潵杩愯鍛戒护锛屽彲浠ョ渷鐣--user閫夐」銆
鐢mysql_install_db鍒涘缓MySQL鎺堟潈琛ㄥ悗锛岄渶瑕佹墜鍔ㄩ噸鏂板惎鍔ㄦ湇鍔″櫒
19.灏嗙▼搴忎簩杩涘埗鐨勬墍鏈夋潈鏀逛负root锛鏁版嵁鐩綍鐨勬墍鏈夋潈鏀逛负浣犺繍琛mysqld鐨勭敤鎴枫傚鏋滀綅浜庡畨瑁呯洰褰(/usr/local/mysql)涓嬶紝鍛戒护搴斾负锛
20. shell> chown -R root .
21. shell> chown -R mysql var
22. shell> chgrp -R mysql .
绗竴涓懡浠ゅ皢鏂囦欢鐨勬墍鏈夊睘鎬ф敼涓root鐢ㄦ埛銆傜浜屼釜鍛戒护灏嗘暟鎹洰褰曠殑鎵鏈夊睘鎬ф敼涓mysql鐢ㄦ埛銆傜涓変釜鍛戒护灏嗙粍灞炴ф敼涓mysql缁勩
23.濡傛灉浣犲枩娆㈠湪寮曞鏈哄櫒鏃惰嚜鍔ㄥ惎鍔MySQL锛屼綘鍙互鎷疯礉support-files/mysql.server鏂囦欢鍒颁綘绯荤粺鏈夊惎鍔ㄦ枃浠剁殑鍦版柟銆傛洿澶氱殑淇℃伅鍙互鍦support-files/mysql.server鑴氭湰涓拰2.9.2.2鑺傦紝鈥滆嚜鍔ㄥ惎鍔ㄥ拰鍋滄MySQL鈥涓壘鍒般
24.濡傛灉瀹夎浜DBI鍜DBD::mysql Perl妯″潡锛屽彲浠ヤ娇鐢bin/mysql_setpermission鑴氭湰澧炲姞鏂拌处鎴枫傚叧浜庤鏄庯紝鍙傝2.13鑺傦紝鈥淧erl瀹夎娉ㄦ剰浜嬮」鈥銆
鍦ㄦ墍鏈変笢瑗胯瀹夎浠ュ悗锛屼綘搴斿綋浣跨敤璇ュ懡浠ゅ垵濮嬪寲骞朵笖娴嬭瘯浣犵殑鍒嗗彂鐗堬細
shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &
濡傛灉杩欎釜鍛戒护鎻愮ずmysqld daemon ended骞堕┈涓婂け璐ワ紝閭d箞浣犺兘鍦ㄦ暟鎹洰褰曚腑鐨勬枃浠垛hostname'.err鈥濇壘鍒颁竴浜涗俊鎭
鍏充簬mysqld_safe鐨勮缁嗕俊鎭弬瑙5.1.3鑺傦紝鈥渕ysqld_safe锛歁ySQL鏈嶅姟鍣ㄥ惎鍔ㄨ剼鏈銆
娉ㄩ噴锛MySQL鎺堟潈琛ㄤ腑鐨勮处鎴峰紑濮嬫病鏈夊瘑鐮併傚惎鍔ㄦ湇鍔″櫒鍚庯紝浣犲簲褰撲娇鐢2.9鑺傦紝鈥滃畨瑁呭悗鐨勮缃拰娴嬭瘯鈥涓殑璇存槑鏉ヨ缃瘑鐮併
configure鑴氭湰缁欎綘涓涓緢澶х殑鎺у埗鏉冩潵鎺у埗濡備綍閰嶇疆MySQL婧愮爜鍒嗗彂鐗堛備竴鑸娇鐢configure鍛戒护琛岀殑閫夐」鏉ヨ繘琛屻備綘涔熷彲浠ョ敤鏌愪簺鐜鍙橀噺浣滅敤浜configure銆傝鍙傝闄勫綍F锛鐜鍙橀噺銆傝鏌ョ湅configure鏀寔鐨勯夋嫨鍒楄〃锛屽彲浠ヨ繍琛屽懡浠わ細
shell> ./configure --help
濡傛灉浣犳病鏈C++缂栬瘧鍣紝鍒欎笉鑳界紪璇mysql(鏈変竴涓鎴风绋嬪簭闇瑕C++)銆傚湪杩欑鎯呭喌涓嬶紝浣犲彲浠ュ幓鎺configure閲岄潰娴嬭瘯C++缂栬瘧鍣ㄧ殑浠g爜锛岀劧鍚庤繍琛屽甫鏈 --without-server閫夐」鐨./configure銆傜紪璇戞楠ゆ灏嗕粛鐒跺皾璇曟瀯閫mysql锛屼絾鏄綘鍙互蹇界暐浠讳綍鍏充簬鈥mysql.cc鈥濈殑璀﹀憡銆傦紙濡傛灉make鍋滄锛岃瘯璇make -k鍛婅瘔瀹冨嵆浣垮嚭閿欑户缁墿涓嬬殑鏋勯犳楠わ級銆
路 濡傛灉浣犳兂瑕佹瀯寤哄祵鍏ュ紡MySQL搴 (libmysqld.a),浣犲簲褰撲娇鐢--with-embedded-server閫夐」銆
绗竴涓懡浠ゆ敼鍙樺畨瑁呭墠缂浠ヤ究灏嗘墍鏈夊唴瀹瑰畨瑁呭埌鈥/usr/local/mysql鈥濅笅闈㈣岄潪 榛樿鐨勨/usr/local鈥濄傜浜屼釜鍛戒护淇濈暀榛樿瀹夎鍓嶇紑锛屼絾鏄鐩栦簡鏁版嵁搴撶洰褰曢粯璁ょ洰褰(閫氬父鏄/usr/local/var鈥)骞朵笖鎶婂畠鏀逛负/usr/local/mysql/data銆傜紪璇戝畬MySQL鍚庯紝鍙互閫氳繃閫夐」鏂囦欢鏇存敼杩欎簺閫夐」銆傝鍙傝4.3.2鑺傦紝鈥滀娇鐢ㄩ夐」鏂囦欢鈥銆
娉ㄦ剰缁欏嚭鐨勬枃浠跺悕蹇呴』鏄竴涓粷瀵硅矾寰勩備綘杩樺彲浠ュ湪浠ュ悗浣跨敤MySQL閫夐」鏂囦欢鏇存敼mysql.sock鐨勪綅缃傝鍙傝A.4.5鑺傦紝鈥滃浣曚繚鎶ゆ垨鏇存敼MySQL濂楁帴瀛楁枃浠/tmp/mysql.sock鈥銆
路 shell>./configure --with-client-ldflags=-all-static\
路 --with-mysqld-ldflags=-all-static
褰撲綘浣跨敤gcc浣滀负C++缂栬瘧鍣ㄧ敤鏃讹紝瀹冨皢涓嶈瘯鍥鹃摼鎺libg++鎴libstdc++銆傚嵆浣夸綘瀹夎浜嗚繖浜涘簱锛岃繖鏍蜂篃寰堝ソ锛屽洜涓鸿繃鍘讳娇鐢MySQL鏃讹紝瀹冧滑鐨勯儴鍒嗙増鏈細鍑虹幇涓浜涘鎬殑闂銆
涓嬮潰鍒楀嚭浜嗕竴浜涚粡甯镐娇鐢ㄧ殑缂栬瘧鍣ㄥ拰鐜鍙橀噺璁惧畾鍊笺
o gcc 2.7.2锛
o CC=gcc CXX=gcc CXXFLAGS="-O3 -felide-constructors"
o egcs 1.0.3a锛
o CC=gcc CXX=gcc CXXFLAGS="-O3 -felide-constructors \
o -fno-exceptions -fno-rtti"
o gcc 2.95.2锛
o CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro \
o -felide-constructors -fno-exceptions -fno-rtti"
o pgcc 2.90.29 鎴栨洿鏂扮増锛
o CFLAGS="-O3 -mpentiumpro -mstack-align-double" CXX=gcc \
o CXXFLAGS="-O3 -mpentiumpro -mstack-align-double \
o -felide-constructors -fno- exceptions -fno-rtti"
鍦ㄥぇ澶氭暟鎯呭喌锛屽湪configure琛屼娇鐢ㄥ墠闈㈠垪鍑虹殑閫夐」骞跺姞鍏ヤ笅闈㈢殑閫夐」锛屽彲浠ュ緱鍒板悎鐞嗙殑浼樺寲鐨MySQL浜岃繘鍒讹細
--prefix=/usr/local/mysql --enable-assembler \
--with-mysqld-ldflags=-all-static
鎹㈠彞璇濊锛屽浜庢墍鏈夋渶杩戠殑gcc鐗堬紝鏁翠釜configure琛屽簲涓猴細
CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro \
-felide-constructors -fno- exceptions -fno-rtti" ./ configure \
--prefix=/usr/local/mysql --enable-assembler \
--with-mysqld-ldflags=-all-static
鎴戜滑鍦MySQL缃戝潃http://www.mysql.com/鎻愪緵鐨勪簩杩涘埗鍧囧凡缁忕紪璇戣繃骞惰繘琛屼簡浼樺寲锛屽浜庡ぇ澶氭暟鐢ㄦ埛搴斿綋姣旇緝瀹屽杽銆傝鍙傝2.1.2.5鑺傦紝鈥淢ySQL AB缂栬瘧鐨凪ySQL浜岃繘鍒剁増鏈銆傚叾涓湁涓浜涢厤缃瀹氬硷紝鍙互閫夌敤鏉ユ瀯寤烘洿蹇殑浜岃繘鍒讹紝浣嗘槸鍙傜敤楂樼骇鐢ㄦ埛銆傝鍙傝7.5.4鑺傦紝鈥滅紪璇戝拰閾炬帴鎬庢牱褰卞搷MySQL鐨勯熷害鈥銆
濡傛灉鏋勯犲け璐ュ苟涓斾骇鐢熸湁鍏崇紪璇戝櫒鎴栭摼鎺ュ櫒鐨勯敊璇紝涓嶈兘鍒涘缓鍏变韩搴撯libmysqlclient.so.#鈥(鈥#鈥濇槸涓涓増鏈彿), 浣犲彲浠ラ氳繃涓configure鎸囧畾--disable-shared閫夐」鏉ヨВ鍐虫闂銆傚湪杩欑鎯呭喌涓嬶紝configure灏嗕笉鏋勯犱竴涓叡浜libmysqlclient.so.#搴撱
CHARSET鍙互鏄big5銆cp1251銆cp1257銆czech銆danish銆dec8銆dos銆euc_kr銆gb2312銆gbk銆german1銆hebrew銆hp8銆hungarian銆koi8_ru銆koi8_ukr銆latin1銆latin2銆sjis銆swe7銆tis620銆ujis銆usa7鎴win1251ukr銆傝鍙傝5.10.1鑺傦紝鈥滄暟鎹拰鎺掑簭鐢ㄥ瓧绗﹂泦鈥銆
鍙互鎸囧畾榛樿鏍″瑙勫垯銆MySQL榛樿浣跨敤latin1_swedish_ci鏍″瑙勫垯銆傝鎯虫洿鏀癸紝浣跨敤--with-collation閫夐」锛
shell> ./configure --with-collation=COLLATION
瑕佹兂鏇存敼瀛楃闆嗗拰鏍″瑙勫垯锛岃鍚屾椂浣跨敤--with-charset鍜--with-collation閫夐」銆 鏍″瑙勫垯蹇呴』鏄瓧绗﹂泦鐨勫悎娉曟牎瀵硅鍒欍(浣跨敤SHOW COLLATION璇彞鏉ョ‘瀹氭瘡涓瓧绗﹂泦浣跨敤鍝釜鏍″瑙勫垯)銆
濡傛灉鎯冲湪鏈嶅姟鍣ㄥ拰瀹㈡埛绔箣闂村彉鎹㈠瓧绗︼紝浣犲簲璇ョ湅涓涓SET OPTION CHARACTER SET鍛戒护銆傝鍙傝13.5.3鑺傦紝鈥淪ET璇硶鈥銆
璀﹀憡锛濡傛灉浣犲湪鍒涘缓浜嗕换浣曟暟鎹簱琛ㄤ箣鍚庢敼鍙樺瓧绗﹂泦锛屼綘灏嗗繀椤诲姣忎釜琛ㄨ繍琛myisamchk -r -q --set-character-set=charset锛屽惁鍒欑储寮曞彲鑳戒笉姝g‘鍦版帓搴忋傦紙濡傛灉瀹夎浜MySQL锛屽垱寤轰竴浜涜〃锛岀劧鍚庨噸鏂伴厤缃MySQL浣跨敤涓涓笉鍚岀殑瀛楃闆嗗苟涓旈噸鏂板畨瑁呭畠锛岃繖鏃跺氨鍙兘鍙戠敓杩欑鎯呭喌銆傦級
閫氳繃configure閫夐」--with-extra-charsets=LIST锛屼綘鍙互瀹氫箟鍦ㄦ湇鍔″櫒涓啀瀹氫箟鍝簺瀛楃闆嗐LIST 鎸囦笅闈换浣曚竴椤癸細
o 绌烘牸闂撮殧鐨勪竴绯诲垪瀛楃闆嗗悕
o complex -锛屼互鍖呮嫭涓嶈兘鍔ㄦ佽杞界殑鎵鏈夊瓧绗﹂泦
o all 鈥擄紝浠ュ皢鎵鏈夊瓧绗﹂泦鍖呮嫭杩涗簩杩涘埗
杩欏鑷村寘鍚竴涓畨鍏ㄧ殑鍐呭瓨鍒嗛厤鍣紝鑳藉彂鐜颁竴浜涢敊璇拰骞舵彁渚涘叧浜庢鍦ㄥ彂鐢熺殑浜嬫儏鐨勮緭鍑恒傝鍙傝E.1鑺傦紝鈥滆皟璇昅ySQL鏈嶅姟鍣ㄢ銆
路 濡傛灉瀹㈡埛绔▼搴忎娇鐢ㄧ嚎绋嬶紝杩樺繀椤讳娇鐢--enable-thread-safe-client閰嶇疆閫夐」鏉ョ紪璇戠嚎绋嬪畨鍏ㄧ増鐨MySQL瀹㈡埛绔簱銆傚皢鍒涘缓涓涓libmysqlclient_r搴擄紝鍙互鐢ㄦ潵杩炴帴搴旂敤绋嬪簭绾跨▼銆傝鍙傝25.2.15鑺傦紝鈥滃浣曠敓鎴愮嚎绋嬪紡瀹㈡埛绔銆
路 鍙互浣跨敤--with-big-tables閫夐」鏋勫缓鏀寔澶ф暟鎹簱琛ㄧ殑MySQL銆
璇ラ夐」浣垮彉閲忕敤鏉ュ皢琛ㄨ鏁颁繚瀛樺埌unsigned long long涓屼笉鏄unsigned long銆傜粨鏋滄槸鍏佽琛ㄦ湁澶х害1.844E+19 ((232)2)琛岃屼笉鏄232 (~4.295E+09) 琛屻傚湪浠ュ墠锛岃瀹屾垚璇ュ姛鑳藉繀椤绘墜鍔ㄥ皢-DBIG_TABLES浼犻掔粰缂栬瘧鍣ㄣ
灞炰簬鐗瑰畾绯荤粺鐨勯夐」鍙湪鏈珷鐗瑰畾绯荤粺鐨勫皬鑺傞噷鎵惧埌銆傝鍙傝2.12鑺傦紝鈥滃叿浣撴搷浣滅郴缁熺浉鍏崇殑娉ㄦ剰浜嬮」鈥娉ㄦ剰锛氬鏋滀綘鎯冲府鍔╂垜浠祴璇曟柊浠g爜锛屽簲褰撻槄璇绘湰鑺傘傚鏋滀綘鍙兂鍦ㄧ郴缁熶笂瀹夎骞惰繍琛MySQL锛屽簲褰撲娇鐢ㄦ爣鍑嗗彂甯冨垎鍙戠増(浜岃繘鍒舵垨婧愮爜鍒嗗彂鐗)銆
瑕佹兂鑾峰緱鎴戜滑鐨勬渶鏂板紑鍙戞簮鐮佹爲锛屽簲浣跨敤璇存槑锛
1. 浠http://www.bitmover.com/bk-client.shar涓嬭浇BitKeeper鍏嶈垂瀹㈡埛绔
2. 鍦Unix涓婂畨瑁呭厤璐瑰鎴风锛
3. shell> sh bk-client.shar
4. shell> cd bk_client-1.1
5. shell> make all
6. shell> PATH=$PWD:$PATH
鍦Windows涓婄殑瀹夎鏂规硶锛
路 浠http://cygwin.com涓嬭浇骞跺畨瑁Cygwin銆
路 纭繚gcc鍜make宸茬粡瀹夎鍒Cygwin銆傚彲浠ョ敤which gcc鍜 which make鍛戒护杩涜娴嬭瘯銆傚鏋滀换浣曚竴涓病鏈夊畨瑁咃紝杩愯 Cygwin瀹夎鍖呯鐞嗗櫒锛岄夋嫨gcc銆make骞瀹夎銆
路 鍦Cygwin涓紝杩愯锛
路 shell> sh bk-client.shar
路 shell> cd bk_client-1.1
鐒跺悗缂栬緫Makefile骞跺皢琛s $(CC) $(CFLAGS) -o sfio -lz sfio.c鏇存敼涓猴細
$(CC) $(CFLAGS) -o sfio sfio.c -lz
鐜板湪杩愯make鍛戒护骞惰缃矾寰勶細
shell> make all
shell> PATH=$PWD:$PATH
7. 瀹夎BitKeeper鍏嶈垂瀹㈡埛绔悗锛岄鍏堣繘鍏ュ伐浣滅洰褰曪紝鐒跺悗浣跨敤浠ヤ笅鍛戒护鍦ㄦ湰鍦板鍒MySQL 5.1锛
8. shell> sfioball -r+ bk://mysql.bkbits.net/mysql-5.1 mysql-5.1
涓鑸儏鍐碉紝浣犱笉闇瑕佽嚜宸辨瀯寤烘枃妗o紝鍥犱负鎴戜滑宸茬粡鍦http://dev.mysql.com/doc/鎻愪緵浜嗚澶氭牸寮忋傛垜浠瘡澶╂洿鏂颁綘鍙互涓嬭浇鐨勬牸寮(HTML銆PDF绛)锛屽洜姝や綘娌℃湁蹇呰浠MySQLdoc鏍戜腑鐨DocBook XML鍩烘湰鏍煎紡鏉ュ垱寤恒傚鏋滀綘鎯宠澶嶅埗鏂囨。搴擄紝浣跨敤涓嬮潰鐨勫懡浠わ細
shell> sfioball -r+ bk://mysql.bkbits.net/mysqldoc mysqldoc
鍦ㄥ墠闈㈢殑渚嬪瓙涓紝鍦ㄥ綋鍓嶇洰褰曠殑MySQL-5.1/瀛愮洰褰曚腑璁剧疆婧愮爜鏍戙
濡傛灉浣犱綅浜庨槻鐏鍚庨潰锛屽彧鑳藉垵濮嬪寲HTTP杩炴帴锛岃繕鍙互閫氳繃HTTP浣跨敤BitKeeper銆
濡傛灉闇瑕佷娇鐢ㄤ唬鐞嗘湇鍔″櫒锛岃缃幆澧冨彉閲http_proxy鎸囧悜浠g悊锛
shell> export http_proxy="http://your.proxy.server:8080/"
褰撳鍒跺簱鏃剁敤http://鏇挎崲bk锛//銆備緥濡傦細
shell> sfioball -r+ http://mysql.bkbits.net/mysql-5.1 mysql-5.1
涓嬭浇婧愮爜鏍戝彲鑳介渶瑕佷竴娈垫椂闂达紝鍙栧喅浜庤繛鎺ラ熷害銆傝鑰愬績绛夊緟銆
9. 瑕佹兂鏇存柊鏈湴MySQL 5.1搴撳鍒讹紝浣跨敤鍛戒护锛
10. shell> update bk://mysql.bkbits.net/mysql-5.1
11.浣犻渶瑕GNU make銆autoconf 2.58 (鎴栨洿鏂扮増)銆automake 1.8銆libtool 1.5鍜m4鏉ヨ繍琛屽悗闈㈢殑鍛戒护銆傚敖绠¤澶氭搷浣滅郴缁熷畨瑁呬簡make锛屽緢鍙兘缂栬瘧澶辫触锛屽嚭鐜拌澶氬鎬殑缂洪櫡娑堟伅銆傚洜姝わ紝寮虹儓寤鸿浣犱娇鐢GNU make(鏈夋椂鍚嶄负gmake)銆
骞歌繍鐨勬槸锛屽ぇ閲忕殑鎿嶄綔绯荤粺棰勮浜GNU宸ュ叿閾炬垨鎻愪緵浜嗗彲瀹夎杞欢鍖呫備綘鍙互闅忔椂浠庝笅闈㈢殑鍦板潃涓嬭浇锛
路 http://www.gnu.org/software/autoconf/
路 http://www.gnu.org/software/automake/
路 http://www.gnu.org/software/libtool/
路 http://www.gnu.org/software/m4/
路 http://www.gnu.org/software/make/
瑕佹兂閰嶇疆MySQL 5.1,浣犺繕闇瑕GNU bison 1.75鎴栨洿鏂扮増銆傛棫鐗堟湰鐨bison浼氭姤鍛婇敊璇細
sql_yacc.yy:#####: fatal error: maximum table size (32767) exceeded
娉ㄩ噴锛氬疄闄呬笂骞舵病鏈夎秴鍑烘渶澶ц〃绌洪棿锛涜繖鏄敱鏃х増鏈殑bison鐨缂洪櫡閫犳垚鐨勮闂銆
涓嬮潰鐨勪緥瀛愭樉绀轰簡閰嶇疆婧愮爜鏍戦渶瑕佺殑鍏稿瀷鍛戒护銆傜涓涓cd鍛戒护灏嗕綅缃敼涓烘爲鐨勯《绾х洰褰曪紱鐢ㄧ浉搴旂洰褰曞悕鏇挎崲MySQL-5.1銆
shell> cd mysql-5.1
shell> bk -r edit
shell> aclocal; autoheader
shell> libtoolize --automake --force
shell> automake --force --add-missing; autoconf
shell> (cd innobase; aclocal; autoheader; autoconf; automake)
shell> (cd bdb/dist; sh s_all)
shell> ./configure # Add your favorite options here
shell> make
瀵逛簬涓嬮潰鐨勫懡浠わ紝鍙互浣跨敤BUILD/autorun.sh浣滀负蹇嵎鏂瑰紡锛
shell> aclocal; autoheader
shell> libtoolize --automake --force
shell> automake --force --add-missing; autoconf
shell> (cd innobase; aclocal; autoheader; autoconf; automake)
shell> (cd bdb/dist; sh s_all)
浣跨敤灏嗙洰褰曟敼涓innobase鍜bdb/dist鐩綍鐨勫懡浠よ鏉ラ厤缃InnoDB鍜 Berkeley DB (BDB)鍌ㄥ瓨寮曟搸銆傚鏋滀綘涓嶉渶瑕InnoDB鎴BDB鏀寔锛屼綘鍙互鐪佺暐杩欎簺鍛戒护琛屻
濡傛灉鍦ㄨ闃舵浣犻亣鍒颁竴浜涘鎬殑閿欒锛岃纭浣犳槸鍚﹀凡缁忓畨瑁呬簡 libtool銆
鏍囧噯閰嶇疆鑴氭湰浣嶄簬BUILD/瀛愮洰褰曘備綘浼氬彂鐜颁娇鐢BUILD/compile-pentium-debug鑴氭湰姣斾娇鐢ㄥ墠闈㈢殑澶栧3鍛戒护瑕佹柟渚垮緱澶氥傝鎯冲湪涓嶅悓鐨勬灦鏋勪笂缂栬瘧锛屽彲浠ヤ慨鏀硅剼鏈紝鍗冲幓鎺Pentium鐩稿叧鏍囧織銆
12.鏋勫缓瀹屾垚鍚庯紝杩愯make install銆傚湪浜у搧鏈哄櫒涓婅繍琛屾椂搴旀敞鎰忥紱璇ュ懡浠や細瑕嗙洊浣犳浣跨敤鐨勭増鏈傚鏋滀綘瀹夎浜嗗彟涓涓MySQL锛屾垜浠缓璁綘浣跨敤 涓庝綘鐨勪骇鍝佹湇鍔″櫒涓婁笉鍚岀殑--prefix銆--with-tcp-port鍜--unix-socket-path閫夐」鍊兼潵杩愯./configure銆
13.寮哄埗杩愯鏂板畨瑁呭拰灏濊瘯浼氱牬鍧忔柊鍔熻兘銆傚簲鍏堣繍琛make test銆傝鍙傝27.1.2鑺傦紝鈥淢ySQL娴嬭瘯濂椾欢鈥銆
14.濡傛灉浣犲凡缁忚繘鍏make闃舵鑰屽垎鍙戠増涓嶇紪璇戯紝璇锋姤鍛婄粰鎴戜滑鐨http://bugs.mysql.com/涓殑缂洪櫡鏁版嵁搴撱傚鏋滀綘宸茬粡瀹夎浜GNU宸ュ叿鐨勬渶鏂扮増鏈紝濡傛灉瑙嗗浘澶勭悊閰嶇疆鏂囦欢鏃跺嚭閿欙紝璇锋姤鍛婄粰鎴戜滑銆備絾鏄紝濡傛灉浣犳墽琛aclocal骞朵笖閬囧埌command not found error鎴栫被浼奸棶棰橈紝涓嶈鎶ュ憡缁欐垜浠傝屾槸搴旂‘淇濆畨瑁呬簡鎵鏈夊繀瑕佺殑宸ュ叿锛屽苟涓PATH鍙橀噺璁剧疆姝g‘锛屼繚璇佸澹冲懡浠ゅ彲浠ユ壘鍒板畠浠
15.澶嶅埗瀹屽簱(sfioball)鑾峰緱婧愮爜鏍戝悗锛屼綘搴斿綋瀹氭湡鏇存柊搴(update)銆
16.浣犲彲浠ユ鏌ユ爲鐨勬洿鏀瑰彶锛屾祻瑙堟簮鐮佹爲涓殑BK/ ChangeLog鏂囦欢骞舵煡鐪ChangeSet鎻忚堪鎵惧埌鎵鏈変笉鍚岀偣銆傝鎯虫鏌ョ壒娈婄殑鏇存敼闆嗭紝蹇呴』浣跨敤sfioball鍛戒护鎻愬彇婧愮爜鏍戠殑涓ゆ涓嶅悓鐨勪慨璁紝鐒跺悗浣跨敤澶栭儴diff鍛戒护鏉ユ瘮杈冦傚鏋滀綘鐪嬪埌鏈夌枒闂殑濂囨殑涓嶅悓涔嬪鎴栦唬鐮侊紝涓瀹氳鍚MySQL internals閭欢鍒楄〃鍙戦侀偖浠躲傝鍙傝1.7.1.1鑺傦紝鈥淭he MySQL閭欢鍒楄〃鈥銆傚苟涓旓紝濡傛灉浣犳湁鏇村ソ鐨勬濇兂锛岃鍚戜笂杩板湴鍧鍙戦侀偖浠躲
17.BitKeeper鍏嶈垂瀹㈡埛绔瑁呬簡婧愮爜銆傚厤璐瑰鎴风鍙敤鐨勫敮涓鏂囨。鏄簮鐮佹湰韬
浣犺繕鍙互鍦ㄧ嚎娴忚鏇存敼闆嗐佹敞閲婂拰婧愮爜銆傝鎯虫祻瑙MySQL 5.1鐨勭浉鍏充俊鎭紝璇峰埌http://mysql.bkbits.net:8080/mysql-5.1銆
鎵鏈MySQL绋嬪簭鍦Solaris鎴Linux涓婁娇鐢gcc缂栬瘧骞朵笖娌℃湁浠讳綍璀﹀憡銆傚湪鍏跺畠绯荤粺涓婏紝鐢变簬绯荤粺鍖呭惈鏂囦欢鐨勫樊鍒彲鑳戒細鍙戠敓璀﹀憡銆傚浜庝娇鐢MIT-pthreads鏃跺彂鐢熺殑璀﹀憡銆傝鍙傝2.8.5鑺傦紝鈥淢IT-pthreads娉ㄦ剰浜嬮」鈥銆傚叾瀹冮棶棰橈紝妫鏌ヤ笅闈㈢殑琛ㄣ
璁稿闂鐨勮В鍐虫柟妗堟秹鍙婇噸鏂伴厤缃傚鏋滀綘纭疄闇瑕侀噸鏂伴厤缃紝娉ㄦ剰涓嬪垪浜嬮」锛
涓轰簡闃叉浣跨敤鏃х殑閰嶇疆淇℃伅鎴栫洰鏍囨枃浠讹紝閲嶆柊杩愯configure鍓嶈繍琛岃繖浜涘懡浠わ細
shell> rm config.cache
shell> make clean
鍙﹀锛屼綘鍙互杩愯make distclean銆
涓嬭〃鎻忚堪浜嗕竴浜涙渶甯稿彂鐢熺殑缂栬瘧MySQL鐨勯棶棰橈細
路 Internal compiler error: program cc1plus got fatal signal 11
路 Out of virtual memory
路 Virtual memory exhausted
璇ラ棶棰樻槸gcc瑕佹眰澶ч噺鐨勫唴瀛樼紪璇戝甫鏈夊祵鍏ュ嚱鏁(inline function)鐨勨sql_yacc.cc鈥濄傝瘯璇曚互--with-low-memory閫夐」杩愯configure锛
shell> ./configure -- with-low-memory
濡傛灉浣犳鍦ㄤ娇鐢gcc锛岃閫夐」浣垮緱灏-fno-inline鍔犲埌缂栬瘧琛岋紝濡傛灉浣犳浣跨敤鍏跺畠鐨勭紪璇戝櫒锛屽垯鍔犲叆-O0銆備綘搴旇璇曚竴璇--with-low-memory閫夐」锛屽嵆浣夸綘鏈夌壒鍒鐨勫瓨鍌ㄥ櫒鍜屼氦鎹㈢┖闂达紝鑰屼綘璁や负涓嶅彲鑳借繍琛屽緱婧㈠嚭銆傝繖涓棶棰樼敋鑷充細鍦ㄥ緢鎱锋叏鐨勭‖浠堕厤缃殑绯荤粺涓婂嚭鐜帮紝閫氬父鐢--with-low-memory閫夐」淇瀹冦
路 configure: error: installation or configuration problem:
路 C++ compiler cannot create executables.
涔熷彲鑳藉湪缂栬瘧鏈熼棿鐪嬪埌g++銆libg++鎴libstdc++鐩稿叧鐨勯棶棰樸
杩欎簺闂鐨勪竴涓師鍥犳槸浣犲彲鑳芥病鏈g++锛屾垨鍙兘鏈g++浣嗘棤libg++鎴libstdc++銆傜湅涓涓嬧config.log鈥濇枃浠躲傚畠搴旇鍖呭惈c++缂栬瘧鍣ㄤ笉鑳藉伐浣滅殑鍑嗙‘鍘熷洜锛佷负浜嗚В鍐宠繖浜涢棶棰橈紝鍙互浣跨敤gcc浣滀负C++缂栬瘧鍣ㄣ傝瘯璇曡缃幆澧冨彉閲CXX涓"gcc -O3"銆備緥濡傦細
shell> CXX="gcc -O3" ./configure
鍙互宸ヤ綔锛屽洜涓gcc璞g++涓鏍风紪璇C++婧愮爜锛屼絾 榛樿鍦板畠涓嶉摼鎺libg++鎴libstdc++銆
瑙e喅杩欎簺闂鐨勫叾瀹冩柟娉曞綋鐒舵槸瀹夎g++銆libg++鍜libstdc++銆傜劧鑰岋紝鎴戜滑寤鸿涓嶈鍦MySQL涓娇鐢libg++鎴libstdc++锛鍥犱负鍙細澧炲姞mysqld浜岃繘鍒剁┖闂磋屼笉浼氬甫鏉ヤ换浣曞ソ澶勩傞儴鍒嗙増鏈殑搴撳湪杩囧幓鏇剧粡缁欑敤鎴峰甫鏉ヤ竴浜涘鎬殑闂銆
路 濡傛灉浣犵殑缂栬瘧浠ヤ笅闈换浣曢敊璇屽け璐ワ紝蹇呴』鍗囩骇make鐗堟湰鍒GNUmake锛
路 making all in mit-pthreads
路 make: Fatal error in reader: Makefile, line 18:
路 Badly formed macro assignment
鎴栵細
make: file `Makefile' line 18: Must be a separator (:
鎴栵細
pthread.h: No such file or directory
宸茬煡Solaris鍜FreeBSD鐨make绋嬪簭鏈夐棶棰樸
宸茬煡GNU make 3.75鑳藉伐浣溿
路 濡傛灉浣犳兂瑕佸畾涔C鎴C++缂栬瘧鍣ㄦ墍浣跨敤鐨勬爣蹇楋紝鎶婃爣蹇楀姞鍒CFLAGS鍜CXXFLAGS鐜鍙橀噺涓嵆鍙備篃鍙互浣跨敤CC鍜CXX鏉ユ寚瀹氱紪璇戝櫒鍚嶅瓧銆備緥濡傦細
路 shell> CC=gcc
路 shell> CFLAGS=-O3
路 shell> CXX=gcc
路 shell> CXXFLAGS=-O3
路 shell> export CC CFLAGS CXX CXXFLAGS
瀵逛簬宸茬粡鐭ラ亾鍦ㄤ笉鍚岀郴缁熶笂鏈夌敤鐨勬爣蹇楀畾涔夊垪琛紝鍙傝2.1.2.5鑺傦紝鈥淢ySQL AB缂栬瘧鐨凪ySQL浜岃繘鍒剁増鏈銆
路 濡傛灉浣犻亣鍒拌薄濡備笅鐨勪竴鏉¢敊璇秷鎭紝鍒欓渶瑕佸崌绾gcc缂栬瘧鍣細
路 client/libmysql.c:273: parse error before `__attribute__'
gcc2.8.1宸茬煡鍙互宸ヤ綔锛屼絾鏄垜浠帹鑽愪娇鐢gcc 2.95.2鎴egcs 1.0.3a銆
路 濡傛灉缂栬瘧mysqld鏃舵樉绀轰緥濡備笅闈㈢殑閭d簺閿欒, configure娌℃湁姝g‘鍦版娴嬩紶鍒accept()銆getsockname()鎴getpeername()鏈鍚庡弬鏁扮殑绫诲瀷锛
路 cxx: Error: mysqld.cc, line 645: In this statement, the referenced
路 type of the pointer value ''length'' is ''unsigned long'',
路 which is not compatible with ''int''.
路 new_sock = accept(sock, (struct sockaddr *)&cAddr, &length);
涓轰簡淇瀹冿紝缂栬緫鈥config.h鈥濇枃浠(瀹冪敱configure鐢熸垚)銆傚鎵捐繖浜涜锛
/* Define as the base type of the last arg to accept */
#define SOCKET_SIZE_TYPE XXX
路 "sql_yacc.yy", line xxx fatal: default action causes potential...
杩欐槸涓涓yacc鐗堟湰涓嶅畬鍠勭殑杩硅薄銆備綘鍙兘闇瑕佸畨瑁bison锛GNU鐨yacc)骞朵娇鐢ㄥ畠銆
路 鍦Debian Linux 3.0涓, 濡傛灉浣犵紪璇戠殑MySQL 5.1瑕佹敮鎸Berkeley DB锛岄渶瑕佸畨瑁gawk浠f浛榛樿鐨mawk銆
路 濡傛灉浣犻渶瑕佽皟璇mysqld鎴MySQL瀹㈡埛绔紝杩愯configure锛屼娇鐢--with-debug閫夐」锛岀劧鍚庨噸鏂扮紪璇戝苟涓斿皢瀹㈡埛绔▼搴忛摼鎺ュ埌鏂扮殑瀹㈡埛绔簱銆傝鍙傝E.2鑺傦紝鈥滆皟璇昅ySQL瀹㈡埛绔銆
路 濡傛灉浣犲湪Linux(渚嬪锛SuSE Linux 8.1鎴Red Hat Linux 7.3)涓嬮亣鍒扮被浼间笅闈㈢殑缂栬瘧閿欒锛
路 libmysql.c:1329: warning: passing arg 5 of `gethostbyname_r' from
路 incompatible pointer type
路 libmysql.c:1329: too few arguments to function `gethostbyname_r'
路 libmysql.c:1329: warning: assignment makes pointer from integer
路 without a cast
路 make[2]: *** [libmysql.lo] Error 1
榛樿鎯呭喌锛configure鑴氭湰璇曞浘浣跨敤g++ GNU C++缂栬瘧鍣ㄦ潵纭畾姝g‘鐨勫弬鏁般傚鏋滄湭瀹夎g++锛灏嗕細浜х敓閿欒鐨勭粨鏋溿傛湁涓ょ鏂规硶鍙互瑙e喅璇ラ棶棰橈細
o 纭繚瀹夎浜GNU C++ g++銆傚湪鏌愪簺Linux鍒嗗彂鐗堜笂锛岄渶瑕佸畨瑁呯殑杞欢鍖呭彨鍋gpp锛涘湪鍏跺畠鍒嗗彂鐗堜笂鍚嶄负gcc-c++銆
o 浣跨敤gcc浣滀负C++ 缂栬瘧鍣紝灏CXX鐜鍙橀噺璁剧疆涓gcc锛
o export CXX="gcc"
璇锋敞鎰忎箣鍚庨渶瑕佸啀娆¤繍琛configure銆
杩欒妭鎻忚堪浣跨敤MIT-pthreads鏃舵墍娑夊強鐨勪竴浜涢棶棰樸
鍦Linux涓婏紝搴旇涓嶄娇鐢MIT-pthreads鑰屾槸瀹夎LinuxThreads锛佸弬瑙2.12.1鑺傦紝鈥淟inux娉ㄦ剰浜嬮」鈥銆
濡傛灉浣犵殑绯荤粺涓嶆彁渚涘師鐢熺殑绾跨▼鏀寔锛屽皢闇瑕佷娇鐢MIT-pthreads鍖呮瀯閫MySQL銆傝繖鍖呮嫭澶у鏁FreeBSD绯荤粺銆SunOS 4.x銆Solaris 2.4鍜屾洿鏃╃増鏈強鍏跺畠锛屽弬瑙2.1.1鑺傦紝鈥淢ySQL鏀寔鐨勬搷浣滅郴缁熲銆
MIT-pthreads涓嶆槸MySQL 5.1婧愮爜鍒嗗彂鐗堢殑涓閮ㄥ垎銆傚鏋滀綘闇瑕佽瀹夎鍖咃紝闇瑕佸崟鐙粠http://www.mysql.com/Downloads/Contrib/pthreads-1_60_beta6-mysql.tar.gz涓嬭浇銆
涓嬭浇鍚庯紝灏嗘簮鏂囦欢鎻愬彇鍒MySQL婧愮爜鐩綍鐨勯《绾х洰褰曘傚皢鍒涘缓鏂扮殑mit-pthreads瀛愮洰褰曘
褰撲娇鐢MIT-pthreads鏃讹紝涓嶆敮鎸佸湪涓涓潪婧愮爜鐩綍鏋勯狅紝鍥犱负鎴戜滑鎯宠浣挎垜浠浠g爜鐨勬敼鍙樺噺鍒版渶灏忋
路 鍐冲畾鏄惁浣跨敤MIT-pthreads鐨勬鏌ヤ粎鍦ㄥ鐞嗘湇鍔″櫒浠g爜鐨勯厤缃繃绋嬫湡闂村彂鐢熴傚鏋滃凡缁忕敤--without-server閰嶇疆浜嗗垎鍙戠増骞跺彧鏋勯犲鎴风浠g爜锛屽鎴风灏嗕笉鐭ラ亾MIT-pthreads鏄惁姝e湪琚娇鐢ㄥ苟涓旀槸鍚︿娇鐢 榛樿鐨Unix濂楁帴瀛楄繛鎺ャ傚洜涓哄湪鏌愪簺骞冲彴涓Unix濂楁帴瀛楁枃浠朵笉鑳藉湪MIT-pthreads涓嬮潰宸ヤ綔锛岃繖鎰忓懗鐫褰撲綘杩愯瀹㈡埛绔▼搴忔椂锛屼綘闇瑕佷娇鐢-h鎴--host銆
路 褰撲娇鐢MIT-pthreads缂栬瘧MySQL鏃讹紝鍥犱负鎬ц兘鍘熷洜锛岀郴缁熼攣瀹 榛樿涓虹姝娇鐢ㄣ備綘鍙互鐢--external-locking閫夐」鍛婅瘔鏈嶅姟鍣ㄤ娇鐢ㄧ郴缁熼攣瀹氥傚彧鏄湪鐩稿悓鏁版嵁鏂囦欢涓婅繍琛屼袱涓MySQL鏈嶅姟鍣ㄦ椂閲囬渶瑕侊紝鍥犳涓嶆帹鑽愩
瑙e喅瀹冪殑鏂规硶鏄潃姝mysqld鏈嶅姟鍣ㄥ苟涓旈噸鍚畠銆傝繖鍙湁褰撴垜浠己杩湇鍔″櫒鍋滄骞堕┈涓婅繘琛岄噸鍚椂鍦ㄥ彂鐢熴
涓嬮潰鐨勮鏄庢弿杩颁簡濡備綍鍦Windows涓嬩粠5.1鐗堟簮鐮佹瀯寤MySQL浜岃繘鍒躲傝鏄庣敤浜庝粠鍖呭惈鏈鏂板紑鍙戞簮鐮佺殑鏍囧噯婧愮爜鍒嗗彂鐗堟垨浠BitKeeper鏍戞潵鏋勫缓浜岃繘鍒躲
娉ㄩ噴锛鏈枃妗d腑鐨勮鏄庝弗鏍奸檺浜庡湪Windows涓嬩粠鏈鏂版簮鐮佸垎鍙戠増鎴栦粠BitKeeper鏍戞潵娴嬭瘯MySQL鐨勭敤鎴枫備綔涓轰骇鍝佷娇鐢ㄦ椂锛MySQL AB涓嶅缓璁娇鐢ㄤ綘鑷繁浠庢簮鐮佹瀯寤虹殑MySQL鏈嶅姟鍣ㄣ備竴鑸儏鍐碉紝鏈濂戒娇鐢MySQL AB棰勭紪璇戠殑瀵规ц兘杩涜浼樺寲鐨勯傜敤Windows鐨MySQL浜岃繘鍒跺垎鍙戠増銆傚畨瑁呬簩杩涘埗鍒嗗彂鐗堢殑璇存槑鍙傝2.3鑺傦紝鈥滃湪Windows涓婂畨瑁匨ySQL鈥銆
瑕佹兂鍦Windows涓粠婧愮爜鏋勫缓MySQL锛Windows绯荤粺涓簲鏈変笅闈㈢殑缂栬瘧鍣ㄥ拰璧勬簮锛
路 Visual Studio 2003缂栬瘧鍣ㄧ郴缁(VC++ 7.0)銆
路 3鍒5GB鐨勭‖鐩樼┖闂淬
路 Windows 2000鎴栨洿楂樼増鏈
纭垏鐨勭郴缁熼渶姹傝锛http://msdn.microsoft.com/vstudio/productinfo/sysreqs/default.aspx
杩橀渶瑕侀傜敤Windows鐨MySQL婧愮爜鍒嗗彂鐗堛傛湁涓ょ鏂规硶鍙互鑾峰緱MySQL 5.1 婧愮爜鍒嗗彂鐗堬細
1. 鑾峰緱MySQL AB鎵撳寘鐨勬簮鐮佸垎鍙戠増杞欢鍖呫傞鎵撳寘鐨勬簮鐮佸垎鍙戠増鍙粠 http://dev.mysql.com/downloads/鑾峰緱銆
2. 浣犲彲浠ョ敤鏈鏂BitKeeper寮鍙戞簮鐮佹爲鏋勫缓婧愮爜鍒嗗彂鐗堛傚鏋滀綘璁″垝鏋勫缓锛屽繀椤诲湪Unix绯荤粺涓垱寤哄畨瑁呰蒋浠跺寘锛屽苟灏嗗畠杞Щ鍒Windows绯荤粺銆(杩欐牱鎿嶄綔鐨勭悊鐢辨槸閮ㄥ垎閰嶇疆鍜屾瀯寤烘楠ら渶瑕佸彧鑳藉湪Unix涓伐浣滅殑宸ュ叿锛銆侭itKeeper鏂规硶闇瑕侊細
路 杩愯Unix鎴栫被浼Unix鐨勭郴缁燂紝渚嬪Linux銆
路 璇ョ郴缁熶笂瀹夎鐨BitKeeper 3.0銆傚叧浜庡浣曚笅杞藉拰瀹夎BitKeeper鐨勮鏄庡弬瑙2.8.3鑺傦紝鈥滀粠寮鍙戞簮鐮佹爲瀹夎鈥銆
濡傛灉浣犱娇鐢Windows婧愮爜鍒嗗彂鐗堬紝浣犲彲浠ョ洿鎺ヨ烦鍒2.8.6.1鑺傦紝鈥滀娇鐢╒C++鏋勫缓MySQL鈥銆傝鎯充粠BitKeeper鏍戞瀯寤猴紝缁х画2.8.6.2鑺傦紝鈥滀粠鏈鏂扮殑寮鍙戞簮鐮佸垱寤篧indows婧愮爜瀹夎鍖呪銆
濡傛灉浣犲彂鐜版煇浜涚粍浠朵笉鑳芥寜棰勬枡鐨勫伐浣滐紝鎴栬呬綘鏈夊ソ鐨勫缓璁彲浠ユ敼杩涚洰鍓嶇殑鍦Windows涓殑鏋勫缓杩囩▼锛岃鍚win32閭欢鍒楄〃鍙戦佹秷鎭傝鍙傝1.7.1.1鑺傦紝鈥淭he MySQL閭欢鍒楄〃鈥銆
娉ㄩ噴锛MySQL 4.1鍜屼互涓婄増鏈殑VC++宸ヤ綔鍖烘枃浠朵笌Microsoft Visual Studio 2003鐗堟湰鍏煎锛MySQL AB浜哄憳宸茬粡鍦ㄦ瘡涓増鏈箣鍓嶈繘琛屼簡娴嬭瘯銆
鎸夌収浠ヤ笅姝ラ鏋勫缓MySQL锛
1. 鍒涘缓宸ヤ綔鐩綍(渚嬪锛C锛\ workdir)銆
2. 浣跨敤WinZip鎴栧叾瀹冨彲浠ヨ鍙.zip鏂囦欢鐨Windows宸ュ叿灏嗘簮鐮佸垎鍙戠増瑙e帇缂╁埌涓婅堪鐩綍銆
3. 鍚姩Visual Studio銆
4. 浠 鑿滃崟锛岄夋嫨 銆
5. 鎵撳紑宸ヤ綔鐩綍涓殑MySQL.dsw宸ヤ綔鍖恒
6. 浠 鑿滃崟锛岄夋嫨 鑿滃崟銆
7. 鐐瑰嚮绐楀彛閫夋嫨 骞剁偣鍑 銆
8. 鎸F7寮濮嬫瀯寤鸿皟璇曟湇鍔″櫒銆佸簱鍜屽鎴风搴旂敤绋嬪簭銆
9. 鎸夊悓鏍锋柟娉曠紪璇戝彂甯冪増鏈
10.绋嬪簭鍜屽簱鐨勮皟璇曠増鏈綅浜client_debug鍜lib_debug鐩綍銆傜▼搴忓拰搴撶殑鍙戝竷鐗堟湰浣嶄簬client_release鍜lib_release鐩綍銆傝娉ㄦ剰濡傛灉浣犳兂瑕佹瀯寤鸿皟璇曠増鏈拰鍙戝竷鐗堟湰锛屽彲浠ヤ粠 鑿滃崟閫夋嫨 閫夐」銆
11.娴嬭瘯鏈嶅姟鍣ㄣ備娇鐢ㄥ墠闈㈢殑璇存槑鏋勫缓鏈嶅姟鍣ㄦ椂锛岄粯璁MySQL鍩烘湰鐩綍鍜屾暟鎹洰褰曚綅浜C:\mysql鍜C:\mysql\data銆傚鏋滀綘鎯宠浣跨敤婧愮爜鏍戞牴鐩綍鍜屾暟鎹洰褰曚綔涓哄熀鏈洰褰曞拰鏁版嵁鐩綍鏉ユ祴璇曟湇鍔″櫒锛岄渶瑕佸憡璇夋湇鍔″櫒鍏惰矾寰勫悕銆傚彲浠ュ湪鍛戒护琛岀敤--basedir鍜--datadir閫夐」鏉ュ畬鎴愶紝鎴栧皢鐩稿簲閫夐」鏀惧叆閫夐」鏂囦欢(鍦Windows鐩綍鎴C锛\my.cnf涓殑my.ini鏂囦欢)銆傚鏋滄兂瑕佷娇鐢ㄧ殑鏁版嵁鐩綍鍦ㄥ叾瀹冨湴鏂癸紝鍙互鎸囧畾鍏惰矾寰勫悕銆
12.鏍规嵁浣犳兂瑕佷娇鐢ㄧ殑鏈嶅姟鍣紝浠client_release鎴client_debug鐩綍鍚姩鏈嶅姟鍣ㄣ傚父鐢ㄦ湇鍔″櫒鍚姩璇存槑瑙2.3鑺傦紝鈥滃湪Windows涓婂畨瑁匨ySQL鈥銆傚鏋滄兂瑕佷娇鐢ㄥ叾瀹冨熀鏈洰褰曟垨鏁版嵁鐩綍锛岄渶瑕佺浉搴斿湴鏇存敼鎸囦护銆
13.褰撴湇鍔″櫒鏍规嵁浣犵殑閰嶇疆鐙珛杩愯鎴栦綔涓烘湇鍔℃椂锛屽皾璇曚粠client_release鎴client_debug鐩綍涓殑MySQL浜や簰寮忓懡浠よ瀹炵敤宸ュ叿杩炴帴瀹冦
濡傛灉鏋勫缓鐨勭▼搴忓伐浣滄甯革紝鍋滄鏈嶅姟鍣ㄣ傛寜鐓т互涓嬫楠ゅ畨瑁MySQL锛
1. 鍒涘缓瀹夎MySQL鐨勭洰褰曘備緥濡傦紝瑕佸畨瑁呭埌C锛\mysql锛屼娇鐢ㄥ懡浠わ細
2. C:\> mkdir C:\mysql
3. C:\> mkdir C:\mysql\bin
4. C:\> mkdir C:\mysql\data
5. C:\> mkdir C:\mysql\share
6. C:\> mkdir C:\mysql\scripts
濡傛灉鎯宠缂栬瘧鍏跺畠瀹㈡埛绔▼搴忓苟杩炴帴鍒MySQL锛屼綘杩橀渶瑕佸垱寤哄嚑涓洰褰曪細
C锛\> mkdir C锛\mysql\include
C锛\> mkdir C锛\mysql\lib
C锛\> mkdir C锛\mysql\lib\debug
C锛\> mkdir C锛\mysql\lib\opt
濡傛灉鎯宠瀵MySQL杩涜鍩哄噯妫鏌ワ紝鍒涘缓鐩綍锛
C锛\> mkdir C锛\mysql\sql-bench
鍩哄噯妫鏌ラ渶瑕Perl鏀寔銆傝鍙傝2.13鑺傦紝鈥淧erl瀹夎娉ㄦ剰浜嬮」鈥銆
7. 灏嗕笅闈㈢殑鐩綍浠workdir鐩綍澶嶅埗鍒C锛\mysql鐩綍锛
8. C:\> cd \workdir
9. C:\workdir> copy client_release\*.exe C:\mysql\bin
10. C:\workdir> copy client_debug\mysqld.exe C:\mysql\bin\mysqld-debug.exe
11. C:\workdir> xcopy scripts\*.* C:\mysql\scripts /E
12. C:\workdir> xcopy share\*.* C:\mysql\share /E
濡傛灉鎯宠缂栬瘧鍏跺畠瀹㈡埛绔▼搴忓苟杩炴帴鍒MySQL锛岃繕搴斿綋澶嶅埗鍑犱釜搴撳拰澶存枃浠讹細
C:\workdir> copy lib_debug\mysqlclient.lib C:\mysql\lib\debug
C:\workdir> copy lib_debug\libmysql.* C:\mysql\lib\debug
C:\workdir> copy lib_debug\zlib.* C:\mysql\lib\debug
C:\workdir> copy lib_release\mysqlclient.lib C:\mysql\lib\opt
C:\workdir> copy lib_release\libmysql.* C:\mysql\lib\opt
C:\workdir> copy lib_release\zlib.* C:\mysql\lib\opt
C:\workdir> copy include\*.h C:\mysql\include
C:\workdir> copy libmysql\libmysql.def C:\mysql\include
濡傛灉浣犳兂瑕佸MySQL杩涜鍩哄噯娴嬭瘯锛屼綘杩樺簲褰擄細
C:\workdir> xcopy sql-bench\*.* C:\mysql\bench /E
鎸夌収浜岃繘鍒Windows鍒嗗彂鐗堢浉鍚岀殑鏂规硶璁剧疆骞跺惎鍔ㄦ湇鍔″櫒銆傝鍙傝2.3鑺傦紝鈥滃湪Windows涓婂畨瑁匨ySQL鈥銆
瑕佹兂浠庡綋鍓嶇殑BitKeeper婧愮爜鏍戝垱寤Windows婧愮爜瀹夎鍖咃紝浣跨敤涓嬮潰鐨勮鏄庛傝娉ㄦ剰蹇呴』鍦ㄨ繍琛Unix鎴栫被Unix鎿嶄綔绯荤粺鐨勭郴缁熶笂鎵ц璇ヨ繃绋嬨備緥濡傦紝宸茬煡璇ヨ繃绋嬪湪Linux涓婂伐浣滃緱寰堝ソ銆
1. 澶嶅埗MySQL 5.1鐨BitKeeper婧愮爜鏍戙傚叧浜庡浣曞鍒舵簮鐮佹爲鐨勮缁嗕俊鎭紝鐩稿叧璇存槑鍙傝2.8.3鑺傦紝鈥滀粠寮鍙戞簮鐮佹爲瀹夎鈥銆
2. 閰嶇疆鍜屾瀯寤哄垎鍙戠増锛屽緱鍒板彲宸ヤ綔鐨勬湇鍔″櫒浜岃繘鍒躲傚疄鐜扮殑涓涓柟娉曟槸鍦ㄦ簮鐮佹爲椤剁骇鐩綍杩愯涓嬮潰鐨勫懡浠わ細
3. shell> ./BUILD/compile-pentium-max
4. 纭繚鏋勫缓杩囩▼鎴愬姛瀹屾垚鍚庯紝浠庢簮鐮佹爲椤剁骇鐩綍杩愯涓嬮潰鐨勫疄鐢ㄥ伐鍏疯剼鏈細
5. shell> ./scripts/make_win_src_distribution
璇ヨ剼鏈垱寤哄湪Windows 绯荤粺涓娇鐢ㄧ殑婧愮爜瀹夎鍖呫傚彲浠ユ牴鎹綘鐨勯渶姹備负鑴氭湰鎻愪緵涓嶅悓鐨勯夐」銆傚畠鎺ュ彈涓嬮潰鐨勯夐」锛
路 --help
鏄剧ず甯姪娑堟伅銆
路 --debug
鎵撳嵃鍏充簬鑴氭湰鎿嶄綔鐨勪俊鎭紝涓嶅垱寤哄寘銆
路 --tmp
鎸囧畾涓存椂浣嶇疆銆
路 --suffix
瀹夎杞欢鍖呭悗缂鍚嶃
路 --dirname
澶嶅埗鏂囦欢鐨勭洰褰曞悕(濯掍粙涔嬮棿)銆
路 --silent
涓嶆墦鍗版澶勭悊鏂囦欢鐨勮缁嗗垪琛ㄣ
路 --tar
鍒涘缓tar.gz瀹夎杞欢鍖呰屼笉鏄.zip瀹夎杞欢鍖呫
榛樿鎯呭喌锛make_win_src_distribution鍒涘缓Zip-鏍煎紡鐨勬枃浠讹紝鏂囦欢鍚嶄负mysql-VERSION-win-src.zip锛屽叾涓VERSION浠h〃MySQL婧愮爜鏍戠殑鐗堟湰銆
6. 灏嗗垱寤虹殑Windows婧愮爜瀹夎鍖呭鍒舵垨涓婅浇鍒Windows鏈哄櫒涓娿傝鎯崇紪璇戯紝浣跨敤2.8.6.1鑺傦紝鈥滀娇鐢╒C++鏋勫缓MySQL鈥涓殑璇存槑銆
瀹夎瀹MySQL鍚庯紝鏈変竴浜涢棶棰樹綘搴斿綋澶勭悊銆備緥濡傦紝鍦Unix涓紝浣犲簲褰撳垵濮嬪寲鏁版嵁鐩綍骞跺垱寤MySQL鎺堟潈琛ㄣ傚浜庢墍鏈夊钩鍙帮紝涓涓噸瑕佸畨鍏ㄩ棶棰樻槸 鎺堟潈琛ㄤ腑鐨勫垵濮嬭处鎴锋病鏈夊瘑鐮併備綘搴斿綋鎸囧畾瀵嗙爜浠ラ槻姝㈡湭鎺堟潈璁块棶MySQL鏈嶅姟鍣ㄣ備綘鍙互鍒涘缓鏃跺尯琛ㄤ互璇嗗埆鍛藉悕鐨勬椂鍖恒(鐩墠锛屽彧鍦Unix涓婅浜嗚繖浜涜〃銆備笉涔呭皢鍦Windows涓В鍐宠闂锛銆
涓嬮潰绔犺妭鍖呮嫭閫傜敤Windows绯荤粺鍜Unix绯荤粺鐨勫畨瑁呭悗鐨勮繃绋嬨傚彟涓鑺傦紝2.9.2.3鑺傦紝鈥滃惎鍔∕ySQL鏈嶅姟鍣ㄤ互鍙婂叾鏁呴殰璇婃柇鍜屾帓闄も锛岄傜敤鎵鏈夊钩鍙帮紱瀹冩弿杩颁簡鍚姩鏈嶅姟鍣ㄦ椂閬囧埌闂鏃跺浣曡В鍐炽2.9.3鑺傦紝鈥滀娇鍒濆MySQL璐︽埛瀹夊叏鈥涔熼傜敤鎵鏈夊钩鍙般備綘搴斿綋鎸夌収璇存槑纭繚浣犲凡缁忔纭湴涓轰綘鐨MySQL璐︽埛鎸囧畾瀵嗙爜鏉ヤ繚鎶ゅ叾瀹夊叏銆
濡傛灉浣犲噯澶囧垱寤哄叾瀹冪敤鎴疯处鎴凤紝浣犲彲浠ュ湪5.7鑺傦紝鈥淢ySQL璁块棶鏉冮檺绯荤粺鈥鍜5.8鑺傦紝鈥淢ySQL鐢ㄦ埛璐︽埛绠$悊鈥鎵惧埌鍏充簬MySQL璁块棶鎺у埗绯荤粺鍜岃处鎴风鐞嗙殑淇℃伅銆
鍦Windows涓紝涓嶉渶瑕佸垱寤烘暟鎹洰褰曞拰鎺堟潈琛ㄣMySQL Windows鍒嗗彂鐗堝寘鎷湪鏁版嵁鐩綍涓嬬殑MySQL鏁版嵁搴撲腑鐨勪竴濂楅鍒濆鍖栫殑璐︽埛鐨 鎺堟潈琛ㄣ備笉瑕佽繍琛Unix涓娇鐢ㄧ殑mysql_install_db鑴氭湰銆備絾鏄紝濡傛灉浣犳病鏈変娇鐢Windows Installation Wizard锛堝畨瑁呭府鍔╋級鏉ュ畨瑁MySQL锛屽簲褰撲负璐︽埛鎸囧畾瀵嗙爜銆傝鍙傝2.3.4.1鑺傦紝鈥滃墠瑷鈥銆傚湪2.9.3鑺傦紝鈥滀娇鍒濆MySQL璐︽埛瀹夊叏鈥銆
璁剧疆瀵嗙爜鍓嶏紝浣犲彲鑳芥兂瑕佽繍琛屼竴浜涘鎴风绋嬪簭鏉ョ‘淇濅綘鑳藉杩炴帴鏈嶅姟鍣紝骞朵笖鎿嶄綔姝g‘銆傜‘淇濇湇鍔″櫒鍦ㄨ繍琛(鍙傝2.3.10鑺傦紝鈥滈娆″惎鍔ㄦ湇鍔″櫒鈥)锛岀劧鍚庡彂鍑轰笅闈㈢殑鍛戒护鏉ラ獙璇佷綘鍙互浠庢湇鍔″櫒鑾峰彇淇℃伅銆傝緭鍑哄簲褰撶被浼间簬锛
C:\> C:\mysql\bin\mysqlshow
+-----------+
| Databases |
+-----------+
| mysql |
| test |
+-----------+
C:\> C:\mysql\bin\mysqlshow mysql
Database: mysql
+--------------+
| Tables |
+--------------+
| columns_priv |
| db |
| func |
| host |
| tables_priv |
| user |
+--------------+
C:\> C:\mysql\bin\mysql -e "SELECT Host,Db,User FROM db" mysql
+------+-------+------+
| host | db | user |
+------+-------+------+
| % | test% | |
+------+-------+------+
濡傛灉浣犳杩愯鏀寔鏈嶅姟鐨Windows鐗堟湰锛屼綘鎯宠MySQL鏈嶅姟鍣ㄥ湪Windows鍚姩鏃惰嚜鍔ㄨ繍琛岋紝鍙傝2.3.12鑺傦紝鈥滀互Windows鏈嶅姟鏂瑰紡鍚姩MySQL鈥銆
鍦Unix涓婂畨瑁MySQL鍚庯紝闇瑕佸垵濮嬪寲 鎺堟潈琛ㄣ佸惎鍔ㄦ湇鍔″櫒锛屽苟纭繚鏈嶅姟鍣ㄥ伐浣滄甯搞備綘杩樿璁╂湇鍔″櫒闅忕郴缁熺殑鍚姩鍜屽仠姝㈣嚜鍔ㄥ惎鍔ㄥ拰鍋滄銆傚簲褰撲负鎺堟潈琛ㄤ腑鐨勮处鎴锋寚瀹氬瘑鐮併
鍦Unix涓紝鐢mysql_install_db璁剧疆 鎺堟潈琛ㄣ傚湪鏌愪簺瀹夎涓紝璇ョ▼搴忚嚜鍔ㄨ繍琛岋細
路 濡傛灉浣犱娇鐢RPM鍒嗗彂鐗堝湪Linux涓婂畨瑁MySQL锛屾湇鍔″櫒RPM杩愯mysql_install_db銆
路 濡傛灉浣犱娇鐢PKG鍒嗗彂鐗堝湪Mac OS X涓婂畨瑁MySQL锛屽畨瑁呭櫒杩愯mysql_install_db銆
鍚﹀垯锛屼綘闇瑕佽嚜宸辫繍琛mysql_install_db銆
涓嬮潰鐨勮繃绋嬫弿杩颁簡濡備綍鍒濆鍖栨巿鏉冭〃 (濡傛灉杩樻病鏈夊垵濮嬪寲)骞跺惎鍔ㄦ湇鍔″櫒銆傝繕鎺ㄨ崘浜嗕竴浜涗綘鍙互鐢ㄦ潵娴嬭瘯鏈嶅姟鍣ㄦ槸鍚﹀彲浠ヨ闂互鍙婃槸鍚﹀伐浣滄纭殑鍛戒护銆傚叧浜庤嚜鍔ㄥ惎鍔ㄥ拰鍋滄鏈嶅姟鍣ㄧ殑淇℃伅锛屽弬瑙2.9.2.2鑺傦紝鈥滆嚜鍔ㄥ惎鍔ㄥ拰鍋滄MySQL鈥銆
浣犲畬鎴愯繃绋嬪苟璁╂湇鍔″櫒杩愯鍚庯紝浣犲簲褰撲负mysql_install_db鍒涘缓鐨勮处鎴锋寚瀹氬瘑鐮併2.9.3鑺傦紝鈥滀娇鍒濆MySQL璐︽埛瀹夊叏鈥涓垪鍑轰簡鐩稿叧璇存槑銆
鍦ㄦ湰鑺傜殑渚嬪瓙涓紝鏈嶅姟鍣ㄧ敤MySQL鐧诲綍璐︽埛鐨勭敤鎴ID杩愯銆傚亣瀹氬瓨鍦ㄨ繖鏍风殑璐︽埛銆傚鏋滀笉瀛樺湪锛岃涔堝垱寤鸿处鎴凤紝鎴栫敤鍏跺畠宸叉湁鐨勭敤鏉ヨ繍琛屾湇鍔″櫒鐨勭櫥褰曡处鎴锋潵鏇夸唬銆
1. 杩涘叆MySQL鐨勯《绾у畨瑁呯洰褰曪紝姝ゅ涓BASEDIR锛
2. shell> cd BASEDIR
BASEDIR鍙兘涓/usr/local/mysql 鎴/usr/local銆備互涓嬫楠ゅ亣瀹氫綘浣嶄簬璇ョ洰褰曘
3. 鏍规嵁闇瑕侊紝杩愯mysql_install_db 绋嬪簭璁剧疆鍚湁纭畾濡備綍璁╃敤鎴疯繛鎺ユ湇鍔″櫒鐨勬潈闄愮殑鍒濆MySQL鎺堟潈琛ㄣ傚鏋滀綘浣跨敤鐨勫垎鍙戠増绫诲瀷涓嶈兘杩愯绋嬪簭锛屼綘闇瑕佹墽琛岃姝ラ銆
鍏稿瀷锛屽彧鏈夐娆″畨瑁MySQL鏃讹紝鎵嶉渶瑕佽繍琛mysql_install_db锛屽洜姝ゅ鏋滀綘鍗囩骇宸叉湁鐨勫畨瑁呬綘鍙互璺宠繃璇ユ楠わ紝浣mysql_install_db涓嶄細瑕嗙洊宸叉湁鐨 鎺堟潈琛紝鍥犳鍙互鍦ㄤ换浣曠幆澧冧笅瀹夊叏杩愯銆
瑕佹兂鍒濆鍖栨巿鏉冭〃锛屾牴鎹mysql_install_db鏄綅浜bin杩樻槸scripts鐩綍涓嬶紝浣跨敤涓嬮潰鐨勪竴涓懡浠わ細
shell> bin/mysql_install_db --user=mysql
shell> scripts/mysql_install_db --user=mysql
mysql_install_db鑴氭湰鍒涘缓鏁版嵁鐩綍銆佹嫢鏈夋墍鏈夋暟鎹簱鏉冮檺鐨mysql鏁版嵁搴撳拰鍙互鐢ㄦ潵娴嬭瘯MySQL鐨test鏁版嵁搴撱傝剼鏈负root璐︽埛鍜屽尶鍚嶇敤鎴疯处鎴峰垱寤 鎺堟潈琛ㄦ潯鐩傝处鎴蜂竴寮濮嬫病鏈夊瘑鐮併2.9.3鑺傦紝鈥滀娇鍒濆MySQL璐︽埛瀹夊叏鈥涓弿杩颁簡鍒濆鏉冮檺銆傜畝鍗曡锛岃繖浜涙潈闄愬厑璁MySQL root鐢ㄦ埛鎵ц浠讳綍鎿嶄綔锛屽厑璁镐换浣曚汉浣跨敤test鍚嶅垱寤烘垨浣跨敤鏁版嵁搴撴垨鐢test_鍚姩銆
涓瀹氳纭繚鐢mysql鐧诲綍璐︽埛鎷ユ湁鏁版嵁搴撶洰褰曞拰鏂囦欢锛屼互渚垮湪浠ュ悗杩愯鏃 鏈嶅姟鍣ㄥ叿鏈夎銆佸啓璁块棶鏉冮檺銆備负姝わ紝濡傛灉浣犵敤root鐢ㄦ埛杩愯mysql_install_db锛屽簲褰撲娇鐢--user閫夐」銆傚惁鍒欙紝褰撲互mysql鐧诲綍鏃讹紝搴斿綋鎵ц鑴氭湰锛屼綘鍙互鐪佺暐鍛戒护涓殑--user閫夐」銆
mysql_install_db鍦mysql鏁版嵁搴撲腑鍒涘缓鍑犱釜琛紝鍖呮嫭user銆db銆host銆 tables_priv銆columns_priv鍜func浠ュ強鍏跺畠銆5.7鑺傦紝鈥淢ySQL璁块棶鏉冮檺绯荤粺鈥涓湁瀹屾暣鐨勫垪琛ㄥ拰鎻忚堪銆
濡傛灉浣犱笉鎯宠test鏁版嵁搴擄紝鍚姩鏈嶅姟鍣ㄥ悗锛屽彲浠ョ敤mysqladmin -u root drop test鍗告帀銆
濡傛灉鏈mysql_install_db鐩稿叧闂锛屽弬瑙2.9.2.1鑺傦紝鈥滀笌杩愯mysql_install_db鏈夊叧鐨勯棶棰鈥銆
鏈変竴浜涢夋嫨杩愯mysql_install_db鑴氭湰,姝eMySQL鍒嗗彂鐗堜腑鎵鎻愪緵鐨勶細
路 濡傛灉鎯宠鍒濆鏉冮檺涓庢爣鍑嗛粯璁ゅ间笉鍚岋紝浣犲彲浠ュ湪杩愯鍓嶄慨鏀mysql_install_db銆傜劧鑰岋紝鏈濂芥槸鍦ㄨ缃 鎺堟潈琛ㄥ悗浣跨敤GRANT鍜REVOKE鏉ユ洿鏀规潈闄愩傛崲鍙ヨ瘽璇达紝浣犲彲浠ヨ繍琛mysql_install_db锛岀劧鍚庨氳繃MySQL root鐢ㄦ埛浣跨敤mysql -u rootMySQL鏉ヨ繛鎺ユ湇鍔″櫒锛屼互渚垮彂鍑GRANT鍜REVOKE鍛戒护銆
濡傛灉浣犳兂瑕佸湪鍑犱釜鏈哄櫒涓婄敤鐩稿悓鐨勬潈闄愬畨瑁MySQL锛屽彲浠ュ皢GRANT鍜REVOKE璇彞鏀惧叆涓涓枃浠朵腑锛屼互鑴氭湰鏂瑰紡鎵ц鏂囦欢锛岃繍琛mysql_install_db涔嬪悗浣跨敤mysql銆備緥濡傦細
shell> bin/ mysql_install_db --user=mysql
shell> bin/mysql -u root < your_script_file
杩欐牱锛屼綘灏卞彲浠ラ伩鍏嶅湪姣忓彴鏈哄櫒涓婃墜鍔ㄥ彂鍑哄懡浠ゃ
路 瀹屽叏鍙互閲嶆柊鍒涘缓鎺堟潈琛ㄣ傚鏋滀綘鍒氬垰鐭ラ亾濡備綍浣跨敤GRANT鍜REVOKE锛骞朵笖杩愯mysql_install_db 涔嬪悗杩涜浜嗚澶氫慨鏀癸紝鎯宠鍏抽棴琛ㄩ噸鏂板惎鍔紝浣犲彲鑳芥兂瑕佽繖鏍锋搷浣溿
瑕佹兂閲嶆柊鍒涘缓鎺堟潈琛紝浠庡惈鏈MySQL鏁版嵁搴撶殑鐩綍涓Щ璧版墍鏈 .frm銆.MYI鍜 .MYD鏂囦欢銆(杩欐槸鏁版嵁鐩綍涓嬮潰鐨mysql鐩綍锛屽綋浣犺繍琛mysqld --help 鏃讹紝鍒椾负datadir鍊)銆傜劧鍚庡啀娆¤繍琛mysql_install_db 鑴氭湰銆
路 鍙互浣跨敤--skip-grant-tables閫夐」鎵嬪姩鍚姩mysqld锛屽苟浣跨敤mysql鑷繁澧炲姞鏉冮檺淇℃伅锛
路 shell> bin/mysqld_safe --user=mysql --skip-grant-tables &
路 shell> bin/mysql mysql
鎵嬪姩浠mysql鎵цmysql_install_db涓殑SQL鍛戒护銆傜‘淇濆悗闈㈤挜杩愯mysqladmin flush-privileges鎴mysqladmin reload锛岃鏈嶅姟鍣ㄩ噸杞芥巿鏉冭〃銆
璇锋敞鎰忎笉浣跨敤mysql_install_db锛屼笉浠呴渶瑕佹墜鍔ㄥ畨瑁呮巿鏉冭〃锛岃繕闇瑕佸厛鍒涘缓銆
4. 鍚姩MySQL鏈嶅姟鍣細
5. shell> bin/mysqld_safe --user=mysql &
涓瀹氳璁MySQL鏈嶅姟鍣ㄤ娇鐢ㄩ潪鏉冮檺(non-root) 鐧诲綍璐︽埛杩愯銆備负姝わ紝濡傛灉浣犱互绯荤粺root杩愯mysql_safe锛屽簲褰撲娇鐢--user閫夐」銆傚惁鍒欙紝浣犲簲褰撶敤mysql鐧诲綍鍒扮郴缁熸潵鎵ц鑴氭湰锛岃繖鏍峰彲浠ョ渷鐣ュ懡浠や腑鐨--user閫夐」銆
A.3.2鑺傦紝鈥滃浣曚互鏅氱敤鎴疯韩浠借繍琛孧ySQL鈥涓粰鍑轰簡闈炵壒鏉冪敤鎴疯繍琛MySQL鐨勮鏄庛
濡傛灉鍦ㄦ墽琛岃姝ュ墠浣犲繕璁颁簡鍒涘缓鎺堟潈琛紝褰撲綘鍚姩鏈嶅姟鍣ㄦ椂锛屽湪閿欒鏃ュ織鏂囦欢涓皢鍑虹幇涓嬮潰鐨勬秷鎭細
mysqld: Can't find file: 'host.frm'
濡傛灉鍚姩鏈嶅姟鍣ㄦ椂閬囧埌鍏跺畠闂锛屾煡闃2.9.2.3鑺傦紝鈥滃惎鍔∕ySQL鏈嶅姟鍣ㄤ互鍙婂叾鏁呴殰璇婃柇鍜屾帓闄も銆
6. 浣跨敤mysqladmin楠岃瘉鏈嶅姟鍣ㄥ湪杩愯涓備互涓嬪懡浠ゆ彁渚涗簡绠鍗曠殑娴嬭瘯锛屽彲妫鏌ユ湇鍔″櫒鏄惁宸茬粡鍚姩骞惰兘鍝嶅簲杩炴帴锛
7. shell> bin/mysqladmin version
8. shell> bin/mysqladmin variables
mysqladmin version鐨勮緭鍑烘牴鎹钩鍙板拰MySQL鐗堟湰鐨勪笉鍚岃岀◢鏈夊彉鍖栵紝浣嗘槸搴斿綋绫讳技浜庯細
shell> bin/mysqladmin version
mysqladmin Ver 8.41 Distrib 5.1.2-alpha, for pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Server version 5.1.2-alpha-Max
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 14 days 5 hours 5 min 21 sec
Threads: 1 Questions: 366 Slow queries: 0
Opens: 0 Flush tables: 1 Open tables: 19
Queries per second avg: 0.000
瑕佹兂鐪嬭繕鍙互鎬庢牱浣跨敤mysqladmin锛岀敤-- help閫夐」璋冪敤瀹冦
9. 楠岃瘉鍙互鍏抽棴鏈嶅姟鍣細
10. shell> bin/mysqladmin -u root shutdown
11.楠岃瘉鏄惁鍙互閲嶅惎鏈嶅姟鍣ㄣ傚彲浠ョ洿鎺ヤ娇鐢mysqld_safe鎴栬皟鐢mysqld銆備緥濡傦細
12. shell> bin/mysqld_safe --user=mysql --log &
濡傛灉mysqld_safe澶辫触锛屽弬瑙2.9.2.3鑺傦紝鈥滃惎鍔∕ySQL鏈嶅姟鍣ㄤ互鍙婂叾鏁呴殰璇婃柇鍜屾帓闄も銆
13.杩涜涓浜涚畝鍗曠殑娴嬭瘯锛岄獙璇佷綘鍙互浠庢湇鍔″櫒鏌ヨ淇℃伅銆傝緭鍑哄簲褰撶被浼间簬锛
14. shell> bin/mysqlshow
15. +-----------+
16. | Databases |
17. +-----------+
18. | mysql |
19. | test |
20. +-----------+
21.
22. shell> bin/mysqlshow mysql
23. Database: mysql
24. +---------------------------+
25. | Tables |
26. +---------------------------+
27. | columns_priv |
28. | db |
29. | func |
30. | help_category |
31. | help_keyword |
32. | help_relation |
33. | help_topic |
34. | host |
35. | proc |
36. | procs_priv |
37. | tables_priv |
38. | time_zone |
39. | time_zone_leap_second |
40. | time_zone_name |
41. | time_zone_transition |
42. | time_zone_transition_type |
43. | user |
44. +---------------------------+
45.
46. shell> bin/mysql -e "SELECT Host,Db,User FROM db" mysql
47. +------+--------+------+
48. | host | db | user |
49. +------+--------+------+
50. | % | test | |
51. | % | test_% | |
52. +------+--------+------+
53.鍦sql-bench鐩綍(鍦MySQL瀹夎鐩綍涓)涓湁涓涓熀鍑嗗浠讹紝鍙互鐢ㄦ潵姣旇緝MySQL鍦ㄤ笉鍚屽钩鍙颁笂鐨勬墽琛屾儏鍐点傚熀鍑嗗浠跺湪Perl涓紪鍐欍傚畠浣跨敤Perl DBI妯″潡鏉ヤ负鍚勭鏁版嵁搴撴彁渚涗竴涓笌鏁版嵁搴撴棤鍏崇殑鎺ュ彛锛屽苟涓旇繕闇瑕佸叾瀹Perl妯″潡鏉ヨ繍琛屽熀鍑嗗浠躲傚繀椤诲畨瑁呬互涓嬫ā鍧楋細
54. DBI
55. DBD::mysql
56. Data::Dumper
57. Data::ShowTable
鍙互浠CPAN(http://www.cpan.org/)鑾峰緱杩欎簺妯″潡銆傝鍙傝2.13.1鑺傦紝鈥滃湪Unix涓畨瑁匬erl鈥銆
sql-bench/Results鐩綍鍖呭惈浜嗗湪涓嶅悓鏁版嵁搴撳拰骞冲彴涓婄殑鍚勭杩愯缁撴灉銆傝鎯宠繘琛屾祴璇曪紝鎵ц鍛戒护锛
shell> cd sql-bench
shell> perl run-all-tests
濡傛灉娌℃湁sql-bench鐩綍锛屼綘鍙兘浣跨敤RPM鏂囦欢瀹夎浜MySQL锛屾病鏈変娇鐢ㄦ簮鐮RPM銆(婧愮爜RPM鍖呮嫭sql-bench benchmark鐩綍锛銆 姝ゆ椂锛屽繀椤诲厛瀹夎鍩哄噯濂椾欢鍚庢墠鑳戒娇鐢ㄣ傛湁涓涓崟鐙殑mysql-bench-VERSION-i386.rpm鍩哄噯RPM鏂囦欢锛屽叾涓寘鍚簡鍩哄噯浠g爜鍜屾暟鎹
濡傛灉浣犳湁婧愮爜鍒嗗彂鐗堬紝鍏tests瀛愮洰褰曚腑涔熸湁涓浜涙祴璇曞彲渚涜繍琛屻備緥濡傦紝瑕佽繍琛auto_increment.tst锛屼粠婧愮爜鍒嗗彂鐗堢殑椤剁骇鐩綍鎵ц璇ュ懡浠わ細
shell> mysql -vvf test < ./tests/auto_increment.tst
鏈熸湜鐨勭粨鏋滆鏄剧ず鍦鈥 ./tests/auto_increment.res鈥鏂囦欢涓
58.鑷虫锛屼綘搴斿綋鍙互杩愯鏈嶅姟鍣ㄤ簡銆傜劧鑰岋紝鍒濆MySQL璐︽埛鍧囨病鏈夊瘑鐮侊紝鍥犳搴斿綋浣跨敤2.9.3鑺傦紝鈥滀娇鍒濆MySQL璐︽埛瀹夊叏鈥涓殑璇存槑鏉ユ寚瀹氬瘑鐮併
MySQL 5.1瀹夎杩囩▼鍦MySQL鏁版嵁搴撲腑鍒涘缓鏃跺尯琛ㄣ備絾鏄紝蹇呴』鎵嬪姩瑁呰浇琛ㄣ傜浉鍏宠鏄庡弬瑙5.10.8鑺傦紝鈥淢ySQL鏈嶅姟鍣ㄦ椂鍖烘敮鎸佲銆
mysql_install_db 鑴氭湰鐨勭洰鐨勬槸鐢熸垚鏂扮殑MySQL鎺堟潈琛ㄣ傚畠涓嶈鐩栧凡鏈夌殑MySQL鎺堟潈琛紝骞朵笖瀹冧笉褰卞搷浠讳綍鍏跺畠鏁版嵁銆
濡傛灉浣犳兂瑕侀噸鏂板垱寤烘巿鏉冭〃锛岄鍏堝仠姝mysqld鏈嶅姟鍣紙濡傛灉瀹冩杩愯锛夈傜劧鍚庨噸鏂板懡鍚嶆暟鎹洰褰曚笅鐨MySQL鐩綍骞朵繚瀛橈紝鐒跺悗杩愯mysql_install_db銆備緥濡傦細
shell> mv mysql-data-directory/mysql mysql-data-directory/mysql-old
shell> mysql_install_db --user=mysql
鏈妭鍒楀嚭浜嗚繍琛mysql_install_db鏃朵綘鍙兘閬囧埌鐨勯棶棰橈細
路 mysql_install_db fails to install the grant tables
浣犱細鍙戠幇mysql_install_db涓嶈兘瀹夎 鎺堟潈琛紝鏄剧ず涓嬮潰鐨勬秷鎭悗缁堟锛
Starting mysqld daemon with databases from XXXXXX
mysqld ended
鍦ㄨ繖绉嶆儏鍐典笅锛屼綘搴旇寰堝皬蹇冨湴妫楠屾棩蹇楁枃浠讹紒鏃ュ織鏂囦欢搴旇浣嶄簬鐩綍鈥XXXXXX鈥锛岀敤閿欒娑堟伅鍛藉悕锛屽苟涓斿簲璇ユ寚鍑轰负浠涔mysqld娌″惎鍔ㄣ傚鏋滀綘涓嶇悊瑙e彂鐢熺殑浜嬫儏锛岄偖瀵勪竴浠介敊璇姤鍛婏紝鍖呭惈鏃ュ織鏂囦欢锛佸弬瑙1.7.1.3鑺傦紝鈥滃浣曢氭姤缂洪櫡鍜岄棶棰樷銆
路 宸茬粡鏈変竴涓amysqld杩涚▼鍦ㄨ繍琛
琛ㄧず鏈嶅姟鍣ㄥ湪杩愯锛岃繖绉嶆儏鍐典笅鍙兘宸茬粡鍒涘缓浜嗘巿鏉冭〃銆傚鏋滃姝わ紝鍒欎笉鍐嶉渶瑕佽繍琛mysql_install_db锛屽洜涓哄彧闇瑕佽繍琛屼竴娆(褰撲綘棣栨瀹夎MySQL鏃)銆
路 褰撲竴涓湇鍔″櫒姝h繍琛屾椂锛屽畨瑁呯浜屼釜鏈嶅姟鍣ㄤ笉宸ヤ綔
杩欏彧鏈夊湪褰撲綘宸茬粡鏈夊凡瀛樺湪鐨MySQL瀹夎浣嗘槸鎯宠鎶婃柊瀹夎鏀惧湪涓涓笉鍚岀殑鍦版柟鏃舵墠浼氬彂鐢熴備緥濡傦紝浣犲彲鑳藉凡缁忔湁浜嗕竴涓骇鍝佸畨瑁咃紝浣嗕负浜嗘祴璇曟兂瑕佸悓鏃惰繍琛2涓畨瑁呫傞氬父褰撲綘璇曠潃杩愯绗簩涓湇鍔″櫒鏃讹紝鍙戠敓鐨勯棶棰樻槸瀹冭瘯鍥惧拰绗竴涓娇鐢ㄥ悓鏍风殑濂楁帴瀛楀拰绔彛銆傚湪杩欑鎯呭喌涓嬶紝浣犲皢閬囧埌閿欒娑堟伅锛
Can't start server: Bind on TCP/IP port:
Address already in use
Can't start server: Bind on unix socket...
鍏充簬璁剧疆澶氫釜鏈嶅姟鍣ㄧ殑璇存槑锛屽弬瑙5.12鑺傦紝鈥滃湪鍚屼竴鍙版満鍣ㄤ笂杩愯澶氫釜MySQL鏈嶅姟鍣ㄢ銆
路 浣犳病鏈鈥 /tmp 鈥鐨勫啓鏉冮檺
濡傛灉浣犳病鏈夊啓鏉冮檺鍦ㄩ粯璁や綅缃(鍦鈥/tmp鈥閲)鍒涘缓涓涓Unix濂楁帴瀛楁枃浠讹紝鎴栨病鏈鍦ㄢ/tmp鈥鍒涘缓涓存椂鏂囦欢鐨勮鍙紝鍦ㄨ繍琛mysql_install_db鎴mysqld鏈嶅姟鍣鏃讹紝浣犲皢閬囧埌涓涓敊璇
浣犲彲浠ュ湪寮濮mysql_install_db鎴mysqld涔嬪墠鎵ц浠ヤ笅鍛戒护鎸囧畾涓涓笉鍚岀殑Unix濂楁帴瀛楁枃浠朵綅缃拰涓存椂鐩綍锛
shell> TMPDIR=/some_tmp_dir/
shell> MYSQL_UNIX_PORT=/some_tmp_dir/mysql.sock
shell> export TMPDIR MYSQL_UNIX_PORT
some_tmp_dir搴旇鏄綘鏈夊啓璁稿彲鐨勬煇涓洰褰曠殑鍏ㄨ矾寰勩
鐒跺悗锛屼綘搴斿綋鑳藉鐢ㄨ繖浜涘懡浠よ繍琛mysql_install_db骞跺惎鍔ㄦ湇鍔″櫒锛
shell> bin/mysql_install_db --user=mysql
shell> bin/mysqld_safe --user=mysql &
濡傛灉mysql_install_db浣嶄簬scripts鐩綍涓嬶紝棣栧厛淇敼鍛戒护scripts/mysql_install_db銆
鍙傝A.4.5鑺傦紝鈥滃浣曚繚鎶ゆ垨鏇存敼MySQL濂楁帴瀛楁枃浠/tmp/mysql.sock鈥銆傝鍙傝闄勫綍F锛鐜鍙橀噺銆
閫氬父浣犲彲浠ョ敤浠ヤ笅鏂规硶鍚姩mysqld鏈嶅姟鍣細
路 鐩存帴璋冪敤mysqld銆傝鏂规硶閫傚悎浠讳綍骞冲彴銆
路 浣滀负Windows鏈嶅姟杩愯MySQL鏈嶅姟鍣ㄣ傚彲浠ュ湪鏀寔鏈嶅姟鐨Windows鐗堟湰(渚嬪 NT銆2000銆XP鍜2003)涓婂疄鐜般傚彲浠ュ皢鏈嶅姟璁剧疆涓哄湪Windows 鍚姩鏃惰嚜鍔ㄥ惎鍔ㄦ湇鍔″櫒锛屾垨鏍规嵁闇瑕佸惎鍔ㄧ殑鎵嬪姩鏈嶅姟銆傜浉鍏宠鏄庡弬瑙2.3.12鑺傦紝鈥滀互Windows鏈嶅姟鏂瑰紡鍚姩MySQL鈥銆
路 璋冪敤mysqld_safe锛屽彲浠ヤ负mysqld纭畾姝g‘鐨勯夐」鐒跺悗浣跨敤杩欎簺閫夐」鏉ヨ繍琛屻傝鑴氭湰閫傜敤浜庡熀浜BSD Unix鐨勭郴缁熴傝鍙傝5.1.3鑺傦紝鈥渕ysqld_safe锛歁ySQL鏈嶅姟鍣ㄥ惎鍔ㄨ剼鏈銆
路 璋冪敤mysql.server銆傝鑴氭湰涓昏鐢ㄤ簬浣跨敤绯荤粺V-style杩愯鐩綍鐨勭郴缁熺殑鍚姩鍜屽叧闂紝瀹冮氬父瀹夎鍒mysql涓嬨mysql.server鑴氭湰璋冪敤mysqld_safe鏉ュ惎鍔ㄦ湇鍔″櫒銆傝鍙傝5.1.4鑺傦紝鈥渕ysql.server锛歁ySQL鏈嶅姟鍣ㄥ惎鍔ㄨ剼鏈銆
路 浣犲彲浠ュ湪Mac OS X涓婂畨瑁呬竴涓崟鐙殑MySQL Startup Item瀹夎鍖呮潵浣跨郴缁熷惎鍔ㄦ椂鑷姩鍚姩MySQL銆Startup Item璋冪敤mysql.server鏉ュ惎鍔ㄦ湇鍔″櫒銆傝缁嗕粙缁嶅弬瑙 2.5鑺傦紝鈥滃湪Mac OS X涓婂畨瑁匨ySQL鈥銆
mysql.server鍜mysqld_safe鑴氭湰鍜Mac OS X Startup Item鍙互鐢ㄦ潵鎵嬪姩鍚姩鏈嶅姟鍣紝鎴栬嚜鍔ㄥ惎鍔ㄧ郴缁熴mysql.server鍜Startup Item杩樺彲浠ョ敤鏉ュ仠姝㈡湇鍔″櫒銆
mysql.server鑴氭湰鍙互琚敤鏉ュ惎鍔ㄦ垨鍋滄鏈嶅姟鍣紝閫氳繃鐢start鎴stop鍙傛暟璋冪敤瀹冿細
shell> mysql.server start
shell> mysql.server stop
鍦mysql.server鍚姩鏈嶅姟鍣ㄤ箣鍓嶏紝瀹冩妸鐩綍鏀瑰彉鍒MySQL瀹夎鐩綍锛岀劧鍚庤皟鐢safe_mysqld銆傚鏋滀綘鎯宠浣滀负涓浜涚壒瀹氱殑鐢ㄦ埛杩愯鏈嶅姟鍣紝鍦/etc/my.cnf閫夐」鏂囦欢鐨[mysqld]缁勫鍔犵浉搴user閫夐」锛屽鏈妭鍚庨潰鎵绀恒(濡傛灉浣犳湁鍦ㄤ竴涓潪鏍囧噯鐨勫湴鐐瑰畨瑁呯殑浜岃繘鍒跺垎鍙戠増锛屼綘鍙兘闇瑕佺紪杈mysql.server銆備慨鏀瑰畠锛岃繍琛safe_mysqld鍓嶏紝cd鍒版纭殑鐩綍銆傛敞鎰忓鏋滀綘淇敼mysql.server锛岄偅涔堟煇涓椂鍊欏崌绾MySQL鏃讹紝浣犵殑淇敼鐗堟湰灏嗚瑕嗙洊锛屽洜姝や綘搴旇鍋氫竴涓綘鍙噸鏂板畨瑁呯殑缂栬緫杩囩殑鐗堟湰鐨勬嫹璐濓級銆
mysql.server stop閫氳繃鍚戞湇鍔″櫒鍙戝嚭涓涓俊鍙峰仠姝㈠畠銆備綘鍙墜鍔ㄦ墽琛mysqladmin shutdown鍏抽棴鏈嶅姟鍣ㄣ
瑕佹兂鍦ㄦ湇鍔″櫒涓婅嚜鍔ㄥ惎鍔ㄥ拰鍋滄MySQL锛屽簲鍦鈥/etc/rc * 鏂囦欢涓傚綋鐨勫湴鏂瑰鍔犲惎鍔ㄣ佸仠姝㈠懡浠ゃ
濡傛灉浣犱娇鐢Linux鏈嶅姟鍣RPM瀹夎杞欢鍖(MySQL-server-VERSION.rpm)锛mysql.server鑴氭湰瀹夎鍦/etc/init.d鐩綍涓紝鍚嶄负MySQL銆備綘涓嶉渶瑕佹墜鍔ㄥ畨瑁呭畠銆傚叧浜Linux RPM杞欢鍖呯殑璇︾粏淇℃伅鍙傝2.4鑺傦紝鈥滃湪Linux涓嬪畨瑁匨ySQL鈥銆
涓浜涗緵搴斿晢鎻愪緵鐨RPM杞欢鍖呭畨瑁呯殑鍚姩鑴氭湰鍚嶅瓧涓嶅悓锛屼緥濡mysqld銆
濡傛灉浠庝笉鑷姩瀹夎mysql.server鐨勬簮鐮佸垎鍙戠増鎴栦簩杩涘埗鍒嗗彂鐗堟牸寮忔潵瀹夎MySQL锛屽彲浠ユ墜鍔ㄥ畨瑁呭畠銆傚彲浠ュ湪MySQL瀹夎鐩綍涓嬫垨MySQL 婧愮爜鏍戠殑support-files鐩綍涓壘鍒拌剼鏈
瑕佹兂鎵嬪姩瀹夎mysql.server锛岀敤鍚嶇Оmysql灏嗗畠澶嶅埗鍒/etc/init.d鐩綍锛岀劧鍚庡皢瀹冨彉涓哄彲鎵ц鏂囦欢銆傚彧闇瑕佸皢浣嶇疆鏇存敼涓mysql.serveris鎵鍦ㄥ苟鎵ц杩欎簺鍛戒护鐨勭浉搴旂洰褰曪細
shell> cp mysql.server /etc/init.d/mysql
shell> chmod +x /etc/init.d/mysql
鏃х殑Red Hat绯荤粺浣跨敤/etc/rc.d/init.d鐩綍锛屼笉浣跨敤/etc/init.d銆傜浉搴斿湴璋冭妭鍓嶉潰鐨勫懡浠ゃ備篃鍙互棣栧厛鍒涘缓鎸囧悜/etc/rc.d/init.d鐨勭鍙疯繛鎺/etc/init.d锛
shell> cd /etc
shell> ln -s rc.d/init.d .
瀹夎鑴氭湰鍚庯紝鐢ㄦ潵婵娲诲畠浠ヤ究鍦ㄧ郴缁熷惎鍔ㄦ椂杩愯鎵闇瑕佺殑鍛戒护鍙栧喅浜庝綘鐨勬搷浣滅郴缁熴傚湪Linux涓紝浣犲彲浠ヤ娇鐢chkconfig锛
shell> chkconfig --addMySQL
鍦ㄤ竴浜Linux绯荤粺涓紝杩橀渶瑕佷笅闈㈢殑鍛戒护鏉ュ畬鍏ㄦ縺娲MySQL鑴氭湰锛
shell> chkconfig --level 345MySQL on
鍦FreeBSD涓紝鍚姩鑴氭湰閫氬父搴斿綋浣嶄簬/usr/local/etc/rc.d/銆傛墜鍐岀殑rc(8)椤靛唴璇存槑鍙湁璇ョ洰褰曡剼鏈殑鍩烘湰鍚嶅尮閰*.sh shell鏂囦欢鍚嶆ā寮忥紝鑴氭湰鎵嶄細鎵ц銆傜洰褰曞唴鐨勫叾瀹冩枃浠舵垨鐩綍灏嗚蹇界暐鎺夈傛崲鍙ヨ瘽璇达紝鍦FreeBSD涓紝搴斿綋灏mysql.server鑴氭湰瀹夎涓 /usr/local/etc/rc.d/mysql.server.sh浠ヤ究鑷姩鍚姩銆
鍓嶉潰璁剧疆鐨勫彟涓绉嶆儏鍐垫槸锛屼竴浜涙搷浣滅郴缁熷惎鍔ㄦ椂涔熶娇鐢/etc/rc.local鎴/etc/init.d/boot.local 鏉ュ惎鍔ㄥ叾瀹冩湇鍔°傝鎯充娇鐢ㄨ鏂规硶鍚姩MySQL锛屼綘鍙互鍦ㄧ浉搴斿惎鍔ㄦ枃浠跺悗闈㈣拷鍔犱竴鏉″懡浠わ細
/bin/sh -c 'cd /usr/local/mysql; ./bin/mysqld_safe --user=mysql &'
瀵逛簬鍏跺畠绯荤粺锛屾煡闃呮搷浣滅郴缁熺殑鏂囨。鏉ユ煡鐪嬪畨瑁呭惎鍔ㄨ剼鏈殑鏂规硶銆
浣犱篃鍙互鍦ㄤ竴涓叏灞鈥/etc/my.cnf鈥鏂囦欢涓鍔mysql.server鐨勯夐」銆備竴涓吀鍨鐨勨/etc/my.cnf鈥鏂囦欢鍙兘鐪嬭捣鏉ュ儚杩欐牱锛
[mysqld]
datadir=/usr/local/mysql/var
socket=/var/tmp/mysql.sock
port=3306
user=mysql
[mysql.server]
basedir=/usr/local/mysql
mysql.server鑴氭湰浣跨敤涓嬪垪鍙橀噺锛basedir銆datadir鍜pid-file銆傚畾涔夊悗锛屽繀椤诲皢瀹冧滑鏀惧埌閫夐」鏂囦欢涓紝涓嶈兘鏀惧埌鍛戒护琛屻mysql.server鍙瘑鍒start鍜stop鍛戒护琛屽弬鏁般
涓嬮潰鐨勮〃鏄剧ず浜嗘湇鍔″櫒鍜屾瘡涓惎鍔ㄨ剼鏈粠閫夐」鏂囦欢璇诲彇鍝釜閫夐」缁勶細
鑴氭湰 |
閫夐」缁 |
mysqld |
[mysqld], [server], [mysqld-major-version] |
mysql.server |
[mysqld], [mysql.server], [server] |
mysqld_safe |
[mysqld], [server], [mysqld_safe] |
[mysqld-major-version]鎰忓懗鐫鍚嶄负[mysqld-5.0]鐨缁锛[mysqld-5.1]鐢ㄤ簬鐗堟湰涓5.0.x銆5.1.x绛夌殑鏈嶅姟鍣ㄣ傝鐗规у彲浠ョ敤鏉ユ寚瀹氬彧琚粰瀹氬彂甯冪郴鍒楃殑鏈嶅姟鍣ㄨ鍙栫殑閫夐」銆
涓轰簡鍚戝悗鍏煎锛mysql.server杩樿鍙[mysql_server]缁勶紝mysqld_safe杩樿鍙[safe_mysqld]缁勩傜劧鑰岋紝褰撲娇鐢MySQL 5.1鏃讹紝浣犲簲褰撴洿鏂伴夐」鏂囦欢锛屼娇鐢[mysql.server]鍜[mysqld_safe]缁勩
濡傛灉鍚姩鏈嶅姟鍣ㄦ椂鏈夐棶棰橈紝鍙互灏濊瘯锛
路 鎸囧畾浣犱娇鐢ㄧ殑鍌ㄥ瓨寮曟搸闇瑕佺殑浠讳綍鐗规畩閫夐」銆
路 纭繚鏈嶅姟鍣ㄧ煡閬撲粠鍝噷鎵惧埌鏁版嵁鐩綍銆
路 纭繚鏈嶅姟鍣ㄥ彲浠ヤ娇鐢ㄦ暟鎹洰褰曘傛暟鎹洰褰曞拰鍐呭鐨勬墍鏈夋潈鍜屽厑璁稿繀椤昏缃垚鏈嶅姟鍣ㄥ彲浠ヨ闂拰淇敼瀹冧滑銆
路 妫鏌ラ敊璇棩蹇楁煡鐪嬫湇鍔″櫒涓轰綍涓嶅惎鍔ㄣ
路 楠岃瘉鏈嶅姟鍣ㄦ兂瑕佷娇鐢ㄧ殑缃戠粶鎺ュ彛鍙敤銆
涓浜涘偍瀛樺紩鎿庢湁涓浜涢夐」鍙互鎺у埗鍏惰涓恒備綘鍙互鍒涘缓涓涓my.cnf鏂囦欢骞朵负璁″垝浣跨敤鐨勫紩鎿庤缃惎鍔ㄩ夐」銆傚鏋滀綘灏嗚浣跨敤鏀寔浜嬪姟澶勭悊琛 (InnoDB锛BDB)鐨勫偍瀛樺紩鎿庯紝搴旂‘淇濆惎鍔ㄦ湇鍔″櫒涔嬪墠鎸夌収浣犵殑鏈熸湜瀵瑰畠浠繘琛屼簡閰嶇疆锛
路 濡傛灉浣犳浣跨敤InnoDB琛紝鍙傞槄InnoDB-specific鍚姩閫夐」銆傚鏋滀綘鏈寚瀹氶夐」锛InnoDB浣跨敤榛樿鍊间綔涓洪厤缃夐」銆傝鍙傝15.2.3鑺傦紝鈥淚nnoDB閰嶇疆鈥銆
路 濡傛灉浣犳浣跨敤BDB (Berkeley DB)琛紝浣犲簲褰撶啛鎮変笉鍚岀殑BDB-specific鍚姩閫夐」銆傝鍙傝15.5.3鑺傦紝鈥淏DB鍚姩閫夐」鈥銆
褰mysqld鏈嶅姟鍣ㄥ惎鍔ㄦ椂锛屽畠杩涘叆鏁版嵁鐩綍銆傚湪杩欓噷瀹冨彲浠ユ壘鍒版暟鎹簱骞跺啓鍏ユ棩蹇楁枃浠躲傚湪Unix涓紝鏈嶅姟鍣ㄨ繕鍦ㄦ暟鎹洰褰曚腑鍐pid(杩囩▼ ID)鏂囦欢銆
褰撶紪璇戞湇鍔″櫒鏃剁‘瀹氭暟鎹洰褰曘傝繖鏄湇鍔″櫒榛樿瀵绘壘鏁版嵁鐩綍鐨勪綅缃傚鏋滄暟鎹洰褰曚綅浜庣郴缁熶腑鐨勫叾瀹冧綅缃紝鏈嶅姟鍣ㄤ笉鑳芥纭伐浣溿傜敤--verbose鍜--help閫夐」璋冪敤mysqld浣犲彲浠ユ壘鍑洪粯璁よ矾寰勮瀹氬笺
濡傛灉榛樿鍊间笌浣犵殑绯荤粺涓殑MySQL瀹夎甯冨眬涓嶅尮閰嶏紝浣犲彲浠ュ湪鍛戒护琛屼腑涓mysqld 鎴mysqld_safe鎸囧畾閫夐」鏉ヨ鐩栧畠浠備綘杩樺彲浠ュ湪閫夐」鏂囦欢涓垪鍑洪夐」銆
瑕佹兂鏄庢樉鎸囧畾鏁版嵁鐩綍鐨勪綅缃紝浣跨敤--datadir閫夐」銆備竴鑸儏鍐典笅锛屼綘鍙互鍛婅瘔mysqld鍩烘湰鐩綍鐨勪綅缃紝MySQL瀹夎鍦ㄨ鐩綍涓嬶紝骞朵笖瀹冨湪璇ョ洰褰曚腑瀵绘壘鏁版嵁鐩綍銆備綘鍙互浣跨敤--basedir閫夐」鏉ュ疄鐜般
瑕佹兂妫鏌ユ寚瀹氳矾寰勯夐」鐨勭粨鏋滐紝鐢--verbose鍜--help閫夐」璋冪敤mysqld銆備緥濡傦紝濡傛灉浣犺繘鍏mysqld鐨勫畨瑁呯洰褰曪紝鐒跺悗杩愯涓嬮潰鐨勫懡浠わ紝瀹冩樉绀哄惎鍔ㄦ湇鍔″櫒鐨勭粨鏋滐紝鍩烘湰鐩綍涓/usr/local锛
shell> ./mysqld --basedir=/usr/local --verbose --help
浣犲彲浠ユ寚瀹氬叾瀹冮夐」锛屼緥濡--datadir锛屼絾鏄娉ㄦ剰--verbose鍜--help蹇呴』涓烘渶鍚庣殑閫夐」銆
涓鏃︿綘纭畾浜嗕綘鎯宠鐨勮矾寰勮瀹氬硷紝鐢--verbose鍜-- help鍚姩鏈嶅姟鍣ㄣ
濡傛灉mysqld姝e湪杩愯锛屾墽琛屼笅鍒楀懡浠や綘鍙互鎵惧嚭瀹冩墍浣跨敤鐨勮矾寰勮瀹氬硷細
shell> mysqladmin variables
鎴栵細
shell> mysqladmin -h host_name variables
host_name鏄MySQL鏈嶅姟鍣ㄤ富鏈虹殑鍚嶇О銆
濡傛灉鍚姩mysqld鏃堕亣鍒Errcode 13(鎰忓懗鐫Permission denied)锛岃繖鎰忓懗鐫鏁版嵁鐩綍鎴栧叾鍐呭鐨勮闂潈闄愪笉鍏佽鏈嶅姟鍣ㄨ闂傛鏃讹紝浣犻渶瑕佹洿鏀规墍璋冪敤鏂囦欢鍜岀洰褰曠殑鏉冮檺锛屼娇鏈嶅姟鍣ㄦ湁鏉冧娇鐢ㄥ畠浠備綘杩樺彲浠ョ敤root鍚姩鏈嶅姟鍣紝浣嗘槸杩欐牱浼氶犳垚瀹夊叏闂锛屽簲褰撻伩鍏嶃
鍦Unix涓紝杩涘叆鏁版嵁鐩綍锛屾鏌ユ暟鎹洰褰曞拰鍏跺唴瀹圭殑鎵鏈夋潈锛岀‘淇濇湇鍔″櫒鍙互璁块棶銆備緥濡傦紝濡傛灉鏁版嵁鐩綍鏄/usr/local/mysql/var锛屼娇鐢ㄥ懡浠わ細
shell> ls -la /usr/local/mysql/var
濡傛灉鏁版嵁鐩綍鎴栧叾鏂囦欢鎴栧瓙鐩綍涓嶅睘浜庝綘杩愯鏈嶅姟鍣ㄤ娇鐢ㄧ殑璐︽埛锛屽皢鎵鏈夋潈鏀逛负璇ヨ处鎴凤細
shell> chown 鈥R mySQL /usr/local/mysql/var
shell> chgrp 鈥R mySQL /usr/local/mysql/var
濡傛灉鏈嶅姟鍣ㄤ笉鑳芥纭惎鍔紝妫鏌ラ敊璇棩蹇楁枃浠讹紝鐪嬬湅鏄惁鍙互鎵惧埌鍘熷洜銆傛棩蹇楁枃浠朵綅浜庢暟鎹洰褰(鍦Windows涓竴鑸负C:\Program Files\MySQL\MySQL Server 5.1\data锛Unix浜岃繘鍒跺垎鍙戠増涓/usr/local/mysql/data锛Unix婧愮爜鍒嗗彂鐗堜负/usr/local/var)銆傛煡鎵炬暟鎹洰褰曚腑鐨host_name.err鍜host_name.log鏂囦欢锛屽叾涓host_name鏄綘鐨勬湇鍔″櫒涓绘満鍚嶃傜劧鍚庢鏌ユ枃浠剁殑鏈鍚庡嚑琛屻傚湪Unix涓紝鍙互浣跨敤tail鏉ユ樉绀猴細
shell> tail host_name.err
shell> tail host_name.log
閿欒鏃ュ織鍖呭惈鎸囩ず鏈嶅姟鍣ㄤ笉鑳藉惎鍔ㄧ殑淇℃伅銆備緥濡傦紝浣犲彲浠ョ湅瑙佹棩蹇椾腑锛
000729 14:50:10 bdb: Recovery function for LSN 1 27595 failed
000729 14:50:10 bdb: warning: ./test/t1.db: No such file or directory
000729 14:50:10 Can't init databases
杩欐剰鍛崇潃浣犳病鏈夌敤--bdb-no-recover閫夐」鍚姩mysqld锛Berkeley DB鎭㈠鏁版嵁搴撴椂鍙戠幇鍏舵棩蹇楁枃浠舵湁涓浜涢棶棰樸傝鎯崇户缁紝浣犲簲褰撳皢鏃х殑Berkeley DB 鏃ュ織鏂囦欢浠庢暟鎹簱鐩綍绉诲埌鍏跺畠鍦版柟锛屼互鍚庝綘鍙互鍦ㄩ偅鍎挎鏌ュ畠浠BDB鏃ュ織鏂囦欢浠log.0000000001寮澶达紝鎸夐『搴忓懡鍚嶃
濡傛灉浣犺繍琛屾敮鎸BDB 琛ㄧ殑mysqld,mysqld鍚姩鏃跺唴鏍稿穿婧冿紝璇ュ彲鑳芥槸鐢变簬BDB 鎭㈠鏃ュ織鐨勯棶棰樸傛鏃讹紝浣犲彲浠ュ皾璇曠敤--bdb-no-recover鍚姩mysqld銆傚鏋滄湁甯姪锛屼綘搴斿綋浠庢暟鎹洰褰曠Щ璧版墍鏈BDB鏃ュ織鏂囦欢骞跺皾璇曚笉鐢--bdb-no-recover閫夐」閲嶆柊鍚姩mysqld銆
濡傛灉鍑虹幇涓嬮潰鐨勯敊璇紝璇存槑鍏跺畠绋嬪簭(涔熻鏄彟涓涓mysqld鏈嶅姟鍣)姝d娇鐢mysqld姝h瘯鍥句娇鐢ㄧ殑TCP/IP绔彛鎴Unix 濂楁帴瀛楁枃浠讹細
Can't start server: Bind on TCP/IP port: Address already in use
Can't start server: Bind 鍦Unix涓 socket...
浣跨敤ps鏉ョ‘瀹氭槸鍚﹀彟鏈変竴涓mysqld鏈嶅姟鍣ㄦ鍦ㄨ繍琛屻傚鏋滃姝わ紝鍏抽棴鏈嶅姟鍣ㄩ噸鏂板惎鍔mysqld銆(濡傛灉鍙︿竴涓湇鍔″櫒姝h繍琛岋紝浣犵殑纭兂瑕佽繍琛屽涓湇鍔″櫒锛屼綘鍙互鍦5.12鑺傦紝鈥滃湪鍚屼竴鍙版満鍣ㄤ笂杩愯澶氫釜MySQL鏈嶅姟鍣ㄢ涓彂鐜扮浉鍏充俊鎭)銆
濡傛灉娌℃湁鍏跺畠鏈嶅姟鍣ㄥ湪杩愯锛屽皾璇曟墽琛屽懡浠 telnet your-host-name tcp-ip-port-number銆(榛樿MySQL绔彛鍙锋槸3306锛銆鐒跺悗鎸変袱娆Enter锛堝洖杞︼級閿傚鏋滃嚭鐜telnet: Unable to connect to remote host: Connection refused閿欒娑堟伅锛屽叾瀹冪▼搴忔浣跨敤mysqld璇曞浘浣跨敤鐨 TCP/IP绔彛銆備綘闇瑕佽窡韪繖鏄摢涓▼搴忓苟绂佺敤瀹冿紝鎴栬mysqld鐢--port閫夐」甯у惉鍏跺畠绔彛銆傛鏃讹紝褰撻氳繃TCP/IP鍗忚杩炴帴鏈嶅姟鍣ㄦ椂锛屼綘杩橀渶瑕佷负瀹㈡埛绔▼搴忔寚瀹氱鍙e彿銆
绔彛涓嶈兘璁块棶鐨勫彟涓涓師鍥犲彲鑳芥槸闃茬伀澧欐杩愯锛岄樆鎸′簡涓庡畠鐨勮繛鎺ャ傚鏋滃姝わ紝淇敼闃茬伀澧欒缃厑璁稿璇ョ鍙g殑璁块棶銆
濡傛灉鏈嶅姟鍣ㄥ凡缁忓惎鍔ㄤ絾鏄綘涓嶈兘涓庡畠杩炴帴锛屼綘搴斿綋纭繚鍦/etc/hosts涓湁涓嬮潰鎵绀烘潯鐩細
127.0.0.1 localhost
璇ラ棶棰樺彧鍙戠敓鍦ㄦ病鏈夊伐浣滅嚎绋嬪簱锛屽苟涓MySQL蹇呴』閰嶇疆涓轰娇鐢MIT-pthreads鐨勭郴缁熴
濡傛灉浣犱笉鑳藉惎鍔mysqld锛屼綘鍙互浣跨敤--debug閫夐」灏濊瘯缂栧啓涓涓窡韪枃浠舵潵鎵惧埌闂銆傝鍙傝E.1.2鑺傦紝鈥滃垱寤鸿窡韪枃浠垛銆
鍏充簬鍦Windows瀹夎涓帓閿欑殑璇︾粏淇℃伅锛屽弬瑙2.3.14鑺傦紝鈥滃湪Windows鐜涓嬪MySQL瀹夎鐨勬晠闅滆瘖鏂笌鎺掗櫎鈥銆
MySQL瀹夎杩囩▼鍖呮嫭璁剧疆鍚湁鎺堟潈琛ㄧ殑MySQL鏁版嵁搴擄細
路 Windows鍒嗗彂鐗堝寘鍚鍒濆鍖栫殑鎺堟潈琛紝鍙互鑷姩瀹夎銆
路 鍦Unix涓紝鐢mysql_install_db绋嬪簭鏉ュ畨瑁 鎺堟潈琛ㄣ傚彲浠ラ氳繃涓浜涘畨瑁呮柟娉曟潵杩愯璇ョ▼搴忋傚惁鍒欎綘闇瑕佹墜鍔ㄦ墽琛屻傝缁嗕俊鎭弬瑙2.9.2鑺傦紝鈥淯nix涓嬪畨瑁呭悗鐨勮繃绋嬧銆
鎺堟潈琛ㄥ畾涔変簡鍒濆MySQL鐢ㄦ埛璐︽埛鍜岃闂潈闄愩傛寜鐓т互涓嬫楠ゅ杩欎簺璐︽埛杩涜璁剧疆锛
路 鐢ㄧ敤鎴root 鍒涘缓涓や釜璐︽埛銆傝繖浜涜处鎴蜂负瓒呯敤鎴疯处鎴凤紝鍙互鎵ц浠讳綍鎿嶄綔銆傚垵濮root璐︽埛鐨勫瘑鐮佷负绌猴紝鍥犳浠讳綍浜哄彲浠ョ敤root璐︽埛涓嶇敤浠讳綍瀵嗙爜鏉ヨ繛鎺MySQL鏈嶅姟鍣紝骞跺叿鏈夋墍鏈夋潈闄愩
o 鍦Windows涓紝涓涓root璐︽埛鐢ㄦ潵浠庢湰鏈鸿繛鎺MySQL鏈嶅姟鍣紝鍙︿竴涓厑璁镐粠浠讳綍涓绘満杩炴帴銆
o 鍦Unix涓紝涓や釜root璐︽埛鍧囩敤浜庝粠鏈満杩炴帴銆蹇呴』浠庢湰鏈鸿繘琛岃繛鎺ワ紝涓涓处鎴蜂富鏈哄悕搴旀寚瀹氫负localhost锛屽彟涓涓处鎴蜂负瀹為檯鐨勪富鏈哄悕鎴IP鍙枫
路 鍒涘缓浜嗕袱涓尶鍚嶇敤鎴疯处鎴凤紝姣忎釜璐︽埛鐨勭敤鎴峰悕鍧囦负绌恒傚尶鍚嶈处鎴锋病鏈夊瘑鐮侊紝鍥犳浠讳綍浜哄彲浠ヤ娇鐢ㄥ尶鍚嶈处鎴锋潵杩炴帴MySQL鏈嶅姟鍣ㄣ
o 鍦Windows涓紝涓涓尶鍚嶈处鎴风敤鏉ヤ粠鏈満杩涜杩炴帴銆傚畠鍏锋湁鎵鏈夋潈闄愶紝鍚root 璐︽埛涓鏍枫傚彟涓涓彲浠ヤ粠浠讳綍涓绘満涓婅繛鎺ワ紝鍏锋湁test鏁版嵁搴撴垨鍏跺畠浠test寮濮嬬殑鏁版嵁搴撶殑鎵鏈夋潈闄愩
o 鍦Unix涓紝涓や釜鍖垮悕璐︽埛鍧囩敤浜庝粠鏈満杩炴帴銆蹇呴』浠庢湰鏈鸿繘琛岃繛鎺ワ紝涓涓处鎴蜂富鏈哄悕搴旀寚瀹氫负localhost锛屽彟涓涓处鎴蜂负瀹為檯鐨勪富鏈哄悕鎴IP鍙銆備袱涓处鎴峰叿鏈test鏁版嵁搴撴垨鍏跺畠浠test寮濮嬬殑鏁版嵁搴撶殑鎵鏈夋潈闄愩
濡傚墠闈㈡墍杩帮紝鎵鏈夊垵濮嬭处鎴峰潎娌℃湁瀵嗙爜銆傝繖鎰忓懗鐫鍦ㄤ綘鎵ц涓嬭堪鎿嶄綔鍓嶏紝MySQL瀹夎鏈彈淇濇姢锛
路 濡傛灉浣犳兂瑕侀槻姝㈠鎴风涓嶄娇鐢ㄥ瘑鐮佺敤鍖垮悕鐢ㄦ埛鏉ヨ繛鎺ワ紝浣犲簲褰撲负鍖垮悕璐︽埛鎸囧畾瀵嗙爜鎴栧垹鎺夊尶鍚嶈处鎴枫
路 浣犲簲褰撲负MySQL root璐︽埛鎸囧畾瀵嗙爜銆
涓嬮潰鐨勮鏄庢弿杩颁簡濡備綍涓哄垵濮MySQL璐︽埛璁剧疆瀵嗙爜锛屽厛涓哄尶鍚嶈处鎴疯缃劧鍚庝负root璐︽埛璁剧疆銆傚湪渚嬪瓙涓敤瀹為檯瀵嗙爜鏇挎崲鈥newpwd鈥濄傝鏄庤繕鍖呮嫭濡傛灉浣犱笉鎯崇敤鍖垮悕璐︽埛璁块棶锛屽浣曞垹鎺夊尶鍚嶈处鎴枫
浣犲彲鑳芥兂瑕佸湪浠ュ悗璁剧疆瀵嗙爜锛屽洜姝や笉闇瑕佸湪杩涗竴姝ョ殑璁剧疆鎴栨祴璇曚腑鎸囧畾瀵嗙爜銆備絾鏄紝涓瀹氳鍦ㄥ疄闄呯敓浜т綔涓氥佷娇鐢ㄥ畨瑁呭墠璁剧疆濂藉瘑鐮併
瑕佹兂涓哄尶鍚嶈处鎴锋寚瀹氬瘑鐮侊紝鍙互浣跨敤SET PASSWORD鎴UPDATE銆傚湪涓ょ鎯呭喌涓紝涓瀹氳浣跨敤PASSWORD()鍑芥暟涓哄瘑鐮佸姞瀵嗐
鍦Windows涓娇鐢PASSWORD鐨勬柟娉曪細
shell> mysql -u root
mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR ''@'%' = PASSWORD('newpwd');
鍦Unix涓娇鐢PASSWORD鐨勬柟娉曪細
shell> mysql -u root
mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR ''@'host_name' = PASSWORD('newpwd');
鐢ㄦ湇鍔″櫒涓绘満鍚嶆浛鎹㈢浜屼釜SET PASSWORD璇彞涓殑host_name銆傝繖鏄寚瀹氱殑user琛ㄤ腑鐨root non-localhost璁板綍鐨Host鍒楀悕銆傚鏋滀綘涓嶇煡閬撴槸鍝釜涓绘満鍚嶏紝鍦SET PASSWORD涔嬪墠鎵ц涓嬮潰鐨勮鍙ワ細
mysql> SELECT Host, User FROM mysql.user;
鏌ユ壘鍦User鍒楁湁root鍜屽湪Host鍒楁病鏈localhost鐨勮褰曘傜劧鍚庡湪绗簩涓SET PASSWORD璇彞涓娇鐢ㄨHost鍊笺
涓哄尶鍚嶈处鎴锋寚瀹氬瘑鐮佺殑鍙︿竴绉嶆柟娉曟槸浣跨敤UPDATE鐩存帴淇敼鐢ㄦ埛琛ㄣ傜敤root杩炴帴鏈嶅姟鍣紝杩愯UPDATE璇彞涓虹浉搴user琛ㄨ褰曠殑Password鍒楁寚瀹氫竴涓笺傚湪Windows鍜Unix涓殑杩囩▼鏄浉鍚岀殑銆備笅闈㈢殑UPDATE璇彞鍚屾椂涓轰袱涓尶鍚嶈处鎴锋寚瀹氬瘑鐮侊細
shell> mysql -u root
mysql> UPDATE mysql.user SET Password = PASSWORD('newpwd')
-> WHERE User = '';
mysql> FLUSH PRIVILEGES;
鍦user琛ㄤ腑鐩存帴浣跨敤UPDATE鏇存柊瀵嗙爜鍚庯紝蹇呴』璁╂湇鍔″櫒鐢FLUSH PRIVILEGES閲嶆柊璇绘巿鏉冭〃銆傚惁鍒欙紝閲嶆柊鍚姩鏈嶅姟鍣ㄥ墠锛屼笉浼氫娇鐢ㄦ洿鏀广
濡傛灉浣犲畞鎰垮垹闄ゅ尶鍚嶈处鎴凤紝鎿嶄綔鏂规硶鏄細
shell> mysql -u root
mysql> DELETE FROM mysql.user WHERE User = '';
mysql> FLUSH PRIVILEGES;
鍙互鍦Windows鍜Unix涓娇鐢DELETE璇彞銆傚湪Windows涓紝濡傛灉浣犲彧鎯冲垹鎺夊叿鏈変笌root鐩稿悓鏉冮檺鐨勫尶鍚嶈处鎴凤紝鏂规硶涓猴細
shell> mysql -u root
mysql> DELETE FROM mysql.user WHERE Host='localhost' AND User='';
mysql> FLUSH PRIVILEGES;
璇ヨ处鎴峰厑璁稿尶鍚嶈闂紝浣嗘槸鎷ユ湁鍏ㄩ儴鐨勬潈闄愶紝鍥犳鍒犳帀瀹冨彲浠ユ彁楂樺畨鍏ㄣ
浣犲彲浠ョ敤鍑犵鏂规硶涓root璐︽埛鎸囧畾瀵嗙爜銆備互涓嬩粙缁嶄簡涓夌鏂规硶锛
路 浣跨敤SET PASSWORD璇彞
路 浣跨敤mysqladmin鍛戒护琛屽鎴风绋嬪簭
路 浣跨敤UPDATE璇彞
瑕佹兂浣跨敤SET PASSWORD鎸囧畾瀵嗙爜锛岀敤root杩炴帴鏈嶅姟鍣ㄥ苟鎵ц涓や釜SET PASSWORD璇彞銆備竴瀹氳浣跨敤PASSWORD()鍑芥暟鏉ュ姞瀵嗗瘑鐮併
鍦Windows涓殑璇彞锛
shell> mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR 'root'@'%' = PASSWORD('newpwd');
鍦Unix涓殑璇彞锛
shell> mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR 'root'@'host_name' = PASSWORD('newpwd');
鐢ㄦ湇鍔″櫒涓绘満鍚嶆浛鎹㈢浜屼釜SET PASSWORD璇彞涓殑host_name銆傝繖鏄綘鎸囧畾鍖垮悕璐︽埛瀵嗙爜鐨勪富鏈哄悕銆
瑕佹兂浣跨敤mysqladmin涓root璐︽埛鎸囧畾瀵嗙爜锛屾墽琛屼笅闈㈢殑鍛戒护锛
shell> mysqladmin -u root password "newpwd"
shell> mysqladmin -u root -h host_name password "newpwd"
涓婅堪鍛戒护閫傜敤浜Windows鍜Unix銆傜敤鏈嶅姟鍣ㄤ富鏈哄悕鏇挎崲绗簩涓懡浠や腑鐨host_name銆備笉涓瀹氶渶瑕佸皢瀵嗙爜鐢ㄥ弻寮曞彿寮曡捣鏉ワ紝浣嗘槸浣犲鏋滃瘑鐮佷腑鍖呭惈绌烘牸鎴栦笓鐢ㄤ簬鍛戒护瑙i噴鐨勫叾瀹冨瓧绗︼紝鍒欓渶瑕佺敤鍙屽紩鍙峰紩璧锋潵銆
浣犺繕鍙互浣跨敤UPDATE鐩存帴淇敼user琛ㄣ備笅闈㈢殑UPDATE璇彞鍙互鍚屾椂涓轰袱涓root璐︽埛鎸囧畾瀵嗙爜锛
shell> mysql -u root
mysql> UPDATE mysql.user SET Password = PASSWORD('newpwd')
-> WHERE User = 'root';
mysql> FLUSH PRIVILEGES;
UPDATE璇彞閫傜敤浜Windows鍜Unix銆
璁剧疆瀹屽瘑鐮佸悗锛屽綋浣犺繛鎺ユ湇鍔″櫒鏃朵綘蹇呴』鎻愪緵鐩稿簲瀵嗙爜銆備緥濡傦紝濡傛灉浣犳兂瑕佺敤mysqladmin 鍏抽棴鏈嶅姟鍣紝鍙互浣跨敤涓嬮潰鐨勫懡浠わ細
shell> mysqladmin -u root -p shutdown
Enter password: (enter root password here)
娉ㄩ噴锛濡傛灉浣犺缃簡root瀵嗙爜鍚庡繕璁颁簡瀵嗙爜锛屼粠A.4.1鑺傦紝鈥滃浣曞浣嶆牴鐢ㄦ埛瀵嗙爜鈥涓煡闃呴噸璁惧瘑鐮佺殑鏂规硶銆
浣犲彲浠ヤ娇鐢GRANT璇彞璁剧疆鏂拌处鎴枫傜浉鍏宠鏄庡弬瑙5.8.2鑺傦紝鈥滃悜MySQL澧炲姞鏂扮敤鎴疯处鎴封銆
鍋氫负涓鑸師鍒欙紝鎴戜滑寤鸿浠庝竴涓彂甯冪郴鍒楀崌绾у埌鍙︿竴涓彂甯冪郴鍒楁椂锛屼綘搴斿綋鍏堝崌绾у埌瀹冪殑涓嬩竴涓郴鍒楄屼笉瑕佽烦杩囥備緥濡傦紝濡傛灉浣犵洰鍓嶆杩愯MySQL 3.23锛屾兂瑕佸崌绾у埌杈冩柊鐨勭郴鍒楋紝瑕佸崌绾у埌MySQL 4.0鑰屼笉瑕佸崌绾у埌5.0鎴5.1銆
涓嬮潰鐨勯」鍒楀嚭浜嗗崌绾ф椂鐨勭浉鍏充俊鎭細
路 浠MySQL 5.0鍗囩骇鍒5.1鍓,璇烽槄璇2.10.1鑺傦紝鈥滀粠5.0鐗堝崌绾р鍜闄勫綍D锛MySQL鍙樻洿鍙銆傚叾涓彁渚涗簡MySQL 5.1鐩稿浜MySQL 5.0鐨勬柊鐗规ф垨涓嶅悓鐗规с傚鏋滀綘鎯宠浠MySQL 5.0浠ュ墠鐨勫彂甯冪郴鍒楀崌绾,搴斿綋渚濇鍗囩骇鍒颁笅涓涓彂甯冪郴鍒楋紝鐩村埌杈惧埌MySQL 5.0锛岀劧鍚庡啀鍗囩骇鍒MySQL 5.1銆傚叧浜庝粠MySQL 5.0鍗囩骇鐨勪俊鎭,鍙傝MySQL 5.0 鍙傝冩墜鍐锛涘浜庢洿鏃╃殑鍙戝竷锛屽弬瑙MySQL 4.1鍙傝冩墜鍐銆
路 鍦ㄥ崌绾у墠搴斿厛澶囦唤鏁版嵁搴撱
路 濡傛灉鍦Windows涓繍琛MySQL鏈嶅姟鍣紝鍙傝2.3.15鑺傦紝鈥滃湪Windows涓嬪崌绾ySQL鈥銆
路 浠MySQL 5.0鍗囩骇鍒5.1鏇存敼MySQL鏁版嵁搴撲腑鐨 鎺堟潈琛紱澧炲姞浜嗗垪鍜岃〃浠ユ敮鎸佹柊鍔熻兘銆備负浜嗗厖鍒嗗埄鐢ㄨ繖浜涚壒鎬э紝搴旂‘淇濇巿鏉冭〃鏄渶鏂扮殑銆傚崌绾ф巿鏉冭〃鐨勮繃绋嬪弬瑙2.10.2鑺傦紝鈥滃崌绾ф巿鏉冭〃鈥銆傚湪鍗囩骇鍓嶏紝浣犲彲鑳芥兂瑕佷娇鐢mysqldump鏉ヨ浆鍌ㄨ〃锛涘崌绾у悗锛屽彲浠ヤ娇鐢mysql鎴mysqlimport閲嶅缓銆侀噸瑁 鎺堟潈琛ㄦ潵閲嶈浇dump(澶囦唤)鏂囦欢銆
路 濡傛灉浣犳澶嶅埗锛屽叧浜庡崌绾у鍒惰缃殑淇℃伅鍙傝6.6鑺傦紝鈥滃崌绾у鍒惰缃銆
路 濡傛灉瀹夎鍖呮嫭mysqld-max鏈嶅姟鍣ㄧ殑MySQL-Max鍒嗗彂鐗堬紝鍒欏悗闈㈣鍗囩骇鍒伴潪Max鐗堢殑MySQL锛mysqld_safe浠嶇劧璇曞浘杩愯鏃х殑mysqld-max鏈嶅姟鍣ㄣ傚鏋滃崌绾э紝搴斿綋鎵嬪姩鍒犳帀鏃х殑mysqld-max鏈嶅姟鍣ㄤ互纭繚mysqld_safe杩愯鏂扮殑mysqld鏈嶅姟鍣ㄣ
鍙浣犵殑MySQL鐗堟湰灞炰簬鐩稿悓鐨勫彂甯冪郴鍒楋紝鎬绘槸鍙互鍦ㄤ笉鍚岀殑鐗堟湰涔嬮棿鐨勭浉鍚屾灦鏋勪笂绉诲姩MySQL鏍煎紡鏂囦欢鍜屾暟鎹枃浠躲傜洰鍓嶇殑浜у搧鍙戝竷绯诲垪鏄5.1銆傚鏋滆繍琛MySQL鏃舵洿鏀瑰瓧绗﹂泦锛屽繀椤诲鎵鏈MyISAM琛ㄨ繍琛myisamchk -r -q --set-character-set=charset銆傚惁鍒欙紝绱㈠紩椤哄簭灏嗕細鍑洪敊锛屽洜涓烘洿鏀瑰瓧绗﹂泦涔熶細鏇存敼鎺掑簭銆
濡傛灉浣犱娇鐢ㄦ柊鐗堟湰鏃舵瘮杈冨皬蹇冿紝鍦ㄥ畨瑁呮柊鐨MySQL鍓嶅彲浠ラ噸鏂板懡鍚嶆棫鐨mysqld銆備緥濡傦紝濡傛灉浣犳兂瑕佷粠MySQL 5.0.13鍗囩骇鍒5.1.10, 灏嗗綋鍓嶇殑鏈嶅姟鍣ㄤ粠mysqld閲嶆柊鍛藉悕涓mysqld-5.0.13銆濡傛灉鏂扮殑mysqld鍑虹幇闂锛屽彧闇瑕佸叧闂苟鐢ㄦ棫鐨mysqld閲嶆柊鍚姩銆
鍗囩骇鍚庯紝濡傛灉浣犻亣鍒伴噸鏂扮紪璇戠殑瀹㈡埛绔▼搴忛棶棰橈紝渚嬪Commands out of sync鎴栦笉鏈熸湜鐨勫唴鏍歌浆鍌紝鍙兘鏄紪璇戠▼搴忔椂浣跨敤浜嗘棫鐨勫ご鏂囦欢鎴栧簱鏂囦欢銆傚嚭鐜拌繖绉嶆儏鍐碉紝搴斿綋妫鏌mysql.h鏂囦欢鍜libmysqlclient.a搴撶殑鏃ユ湡锛屼互楠岃瘉瀹冧滑鏄惁鏉ヨ嚜鏂扮殑MySQL鍒嗗彂鐗堛傚鏋滀笉鏄紝鐢ㄦ柊鐨勫ご鏂囦欢鍜屽簱閲嶆柊缂栬瘧绋嬪簭銆
濡傛灉鍑虹幇闂锛屼緥濡傛柊mysqld鏈嶅姟鍣ㄤ笉鍚姩鎴栨病鏈夊瘑鐮佷笉鑳借繛鎺ワ紝楠岃瘉鏄惁浣跨敤浜嗕互鍓嶅畨瑁呯殑鏃my.cnf鏂囦欢銆傚彲浠ョ敤--print-defaults閫夐」妫鏌(渚嬪锛mysqld --print-defaults)銆傚鏋滄樉绀虹▼搴忓悕涔嬪鐨勫叾瀹冨唴瀹癸紝璇存槑鏈変竴涓椿鍔my.cnf鏂囦欢褰卞搷浜嗘湇鍔″櫒鎴栧鎴风鎿嶄綔銆
褰撳畨瑁呮柊鐨MySQL鍙戝竷鏃讹紝鏈濂介噸寤哄苟閲嶈Perl DBD锛氾細mysql 妯″潡銆傚悓鏍烽傜敤浜庡叾瀹MySQL鎺ュ彛锛屼緥濡PHP mysql鎵╁睍鍚嶅拰Python MySQLdb妯″潡銆
褰撲粠5.0鍗囩骇鍒5.0.10鎴栨洿楂樼増鏈椂璇锋敞鎰蹇呴』杩愯mysql_fix_privilege_tables(鎴栧湪Windows涓繍琛mysql_fix_privilege_tables.sql)銆傚惁鍒欙紝涓嶈兘鍒涘缓淇濆瓨鐨勮繃绋嬨傜浉鍏宠繃绋嬪弬瑙2.10.2鑺傦紝鈥滃崌绾ф巿鏉冭〃鈥銆
涓浜涘彂甯冨鎺堟潈琛(MySQL鏁版嵁搴撲腑鐨勮〃)鐨勭粨鏋勮繘琛屼簡鏇存敼浠ュ鍔犳柊鐨勬潈闄愭垨鐗规с傚綋浣犳洿鏂板埌鏂扮増鏈 MySQL鏃讹紝瑕佹兂纭繚鎺堟潈琛ㄦ渶鏂帮紝搴斿綋杩愯mysql_fix_privilege_tables鑴氭湰鏉ユ洿鏂 鎺堟潈琛ㄣ傜浉鍏宠繃绋嬪弬瑙5.4鑺傦紝鈥渕ysql_fix_privilege_tables锛氬崌绾ySQL绯荤粺琛ㄢ銆
濡傛灉浣犱粠MySQL 4.1鎴栨洿鏃╃増鏈崌绾э紝鎺堟潈琛ㄥ崌绾ц繃绋嬩负CREATE VIEW鍜SHOW VIEW鏉冮檺澧炲姞浜嗚鍥剧浉鍏崇殑鍒椼傝繖浜涙潈闄愪綅浜庡叏灞鍜屾暟鎹簱 绾с傚湪杩欑鎯呭喌涓嬶紝MySQL 5.1鐗MySQL_fix_privilege_ tables灏user琛ㄤ腑鐨Create_priv鍊煎鍒跺埌Create_view_priv鍜 Show_view_priv鍒椼
浣犲彲浠ュ湪鏀寔鐩稿悓娴偣鏍煎紡鐨勪笉鍚屾灦鏋勪箣闂翠负MyISAM琛ㄥ鍒.frm銆.MYI鍜.MYD鏂囦欢銆(MySQL鍏虫敞鎵鏈夊瓧鑺備氦鎹㈤棶棰橈級銆璇峰弬瑙15.1鑺傦紝鈥淢yISAM瀛樺偍寮曟搸鈥銆
濡傛灉浣犻渶瑕佸湪涓嶅悓鐨勬灦鏋勪箣闂磋浆绉绘暟鎹簱锛屽彲浠ヤ娇鐢mysqldump鍒涘缓鍚湁SQL璇彞鐨勬枃浠躲傜劧鍚庝綘鍙互灏嗘枃浠惰浆绉诲埌鍏跺畠鏈哄櫒涓婏紝骞跺皢瀹冭緭鍏ュ埌MySQL瀹㈡埛绔
浣跨敤mysqldump --help鏉ョ湅鏈夊摢浜涢夐」鍙敤銆傚鏋滀綘姝e皢鏁版嵁绉诲姩鍒版洿鏂扮増鏈殑MySQL锛屼綘搴斿綋浣跨敤mysqldump 鈥opt鏉鍒╃敤鍚勭浼樺寲鎬ц兘鏉ヤ骇鐢熸洿灏忋佸彲浠ユ洿蹇鐞嗙殑杞偍鏂囦欢銆
鍦ㄤ袱鍙版満鍣ㄤ箣闂寸Щ鍔ㄦ暟鎹簱鐨勬渶绠鍗(灏界涓嶆槸鏈蹇)鐨勬柟娉曟槸鍦ㄦ暟鎹簱鎵鍦ㄧ殑鏈哄櫒涓婅繍琛屼笅闈㈢殑鍛戒护锛
shell> mysqladmin -h 'other_hostname' create db_name
shell> mysqldump --opt db_name | mysql -h 'other_hostname' db_name
濡傛灉浣犳兂瑕佷粠杩滅▼鏈哄櫒閫氳繃鎱㈤熺綉缁滃鍒舵暟鎹簱锛屽彲浠ヤ娇鐢細
shell> mysqladmin create db_name
shell> mysqldump -h 'other_hostname' --opt --compress db_name | mysql db_name
杩樺彲浠ュ皢缁撴灉淇濆瓨鍒版枃浠朵腑锛岀劧鍚庡皢鏂囦欢杞Щ鍒扮洰鏍囨満鍣ㄤ笂骞跺皢鏂囦欢瑁呰浇鍒版暟鎹簱涓備緥濡傦紝鍙互鍦ㄦ簮鏈哄櫒涓婁娇鐢ㄤ笅闈㈢殑鍛戒护灏嗘暟鎹簱澶囦唤鍒版枃浠朵腑锛
shell> mysqldump --quick db_name | gzip > db_name.contents.gz
(璇ヤ緥瀛愪腑鍒涘缓鐨勬枃浠舵槸鍘嬬缉鏍煎紡锛銆灏嗗惈鏈夋暟鎹簱鍐呭鐨勬枃浠跺埌鐩爣鏈轰笂骞惰繍琛屽懡浠わ細
shell> mysqladmin create db_name
shell> gunzip < db_name.contents.gz | mysql db_name
杩樺彲浠ヤ娇鐢mysqldump鍜mysqlimport鏉ヨ浆绉绘暟鎹簱銆傚浜庡ぇ鐨勮〃锛屾瘮鍙槸浣跨敤mysqldump瑕佸揩寰楀銆傚湪涓嬮潰鐨勫懡浠や腑锛DUMPDIR浠h〃鐢ㄦ潵淇濆瓨mysqldump杈撳嚭鐨勭洰褰曞叏璺緞鍚嶃
棣栧厛锛屽垱寤轰繚瀛樿緭鍑烘枃浠剁殑鐩綍骞跺浠芥暟鎹簱锛
shell> mkdir DUMPDIR
shell>mysqldump --tab=DUMPDIR db_name
鐒跺悗灏DUMPDIR鐩綍涓殑鏂囦欢杞Щ鍒扮洰鏍囨満涓婄浉搴旂殑鐩綍涓苟灏嗘枃浠惰杞藉埌MySQL锛
shell> mysqladmin create db_name # create database
shell> cat DUMPDIR/*.sql | mysql db_name # create tables in database
shell> mysqlimport db_name DUMPDIR/*.txt # load data into tables
涓嶈蹇樿澶嶅埗MySQL鏁版嵁搴擄紝鍥犱负鎺堟潈琛ㄤ繚瀛樺湪璇ユ暟鎹簱涓備綘鍙兘闇瑕佸湪鏂版満鍣ㄤ笂鐢MySQL root鐢ㄦ埛杩愯鍛戒护锛岀洿鍒颁骇鐢MySQL鏁版嵁搴撱
灏mysql鏁版嵁搴撳鍏ョ洰鏍囨満鍣ㄥ悗锛屾墽琛mysqladmin flush-privileges锛屼互渚挎湇鍔″櫒閲嶈浇鎺堟潈琛ㄤ俊鎭
鏈妭鎻忚堪浜嗘棫鐗堟湰MySQL姣旀柊鐗堟湰宸ヤ綔寰楀ソ鐨勬儏鍐典笅锛屽浣曢檷绾у埌鏃х殑MySQL鐗堟湰銆
濡傛灉浣犲湪鍚屼竴鍙戝竷绯诲垪(渚嬪锛屼粠 5.0.13 鍒5.0.12)鍐呴檷绾э紝涓鑸鍒欐槸鍙渶瑕佸湪鏃х増鏈殑椤堕儴瀹夎鏂扮殑浜岃繘鍒躲備笉闇瑕佸鏁版嵁搴撹繘琛屼换浣曟搷浣溿備絾鏄紝鏈濂芥槸鍏堣繘琛屽浠姐
涓嬮潰鐨勯」鍒楀嚭浜嗚繘琛岄檷绾ф椂搴旀墽琛岀殑鎿嶄綔锛
路 闃呰浣犲皢瑕侀檷绾х殑鍙戝竷绯诲垪鐨勫崌绾ч儴鍒嗭紝纭畾瀹冩病鏈変綘闇瑕佺殑鍔熻兘銆2.10鑺傦紝鈥滃崌绾ySQL鈥銆
路 濡傛灉璇ョ増鏈湁闄嶇骇閮ㄥ垎锛屼綘涔熷簲褰撻槄璇汇
鍙MySQL鐗堟湰灞炰簬鐩稿悓鐨勫彂甯冪郴鍒楋紝浣犳绘槸鍙互鍦ㄤ笉鍚岀殑鐗堟湰涔嬮棿鐨勭浉鍚屾灦鏋勪笂绉诲姩MySQL鏍煎紡鏂囦欢鍜屾暟鎹枃浠躲傜洰鍓嶇殑浜у搧鍙戝竷绯诲垪鏄5.1銆
濡傛灉浣犱粠涓涓彂甯冪郴鍒楅檷绾у埌鍙︿竴涓彂甯冪郴鍒楋紝琛ㄥ偍瀛樻牸寮忓彲鑳戒笉鍏煎銆傚湪杩欑鎯呭喌涓嬶紝浣犲彲浠ュ湪闄嶇骇宓屼娇鐢mysqldump鏉ヨ浆鍌ㄨ〃銆傞檷绾у悗锛屼娇鐢mysql鎴mysqlimport閲嶈浇杞偍鏂囦欢鏉ラ噸鏂板垱寤鸿〃銆傝鍙傝2.10.3鑺傦紝鈥滃皢MySQL鏁版嵁搴撴嫹璐濆埌鍙︿竴鍙版満鍣ㄢ銆
琛ㄦ牸寮忎笉鍚戜笅鍏煎鐨勪竴鑸抗璞℃槸闄嶇骇鏃朵笉鑳芥墦寮琛ㄣ傚湪杩欑鎯呭喌涓嬶紝浣跨敤涓嬮潰鐨勮繃绋嬶細
1. 鍋滄浣犳兂瑕侀檷绾у埌鐨勬棫鐨MySQL鏈嶅姟鍣ㄣ
2. 閲嶆柊鍚姩灏嗚闄嶇骇鐨勬柊鐨MySQL鏈嶅姟鍣ㄣ
3. 浣跨敤mysqldump鍒涘缓涓涓dump锛堣浆鍌級鏂囦欢鏉ヨ浆鍌ㄤ笉鑳借鏃ф湇鍔″櫒璁块棶鐨勬墍鏈夎〃銆
4. 鍋滄鏂MySQL鏈嶅姟鍣紝閲嶆柊鍚姩鏃MySQL鏈嶅姟鍣ㄣ
灏dump锛堣浆鍌級鏂囦欢閲嶈浇鍏ユ棫鏈嶅姟鍣ㄣ傝〃搴斿綋鍙闂
璀﹀憡锛鎴戜滑宸茬粡鍙戠幇鍦SMP绯荤粺涓Linux 2.2.14 鍜MySQL浼氬嚭鐜颁竴浜涘鎬殑闂銆傛垜浠繕鏀跺埌鏉ヨ嚜涓浜MySQL鐢ㄦ埛鐨勬姤鍛婅浠栦滑鐢ㄥ唴鏍2.2.14浣跨敤MySQL鏃堕亣鍒颁簡涓ラ噸鐨勭ǔ瀹氭ч棶棰樸傚鏋滀綘姝d娇鐢ㄨ鍐呮牳锛屽簲褰撳崌绾у埌2.2.19 (鎴栨洿鏂扮増)鎴栧埌2.4鍐呮牳銆傚鏋滀綘鏈変竴涓CPU鐩掞紝搴斿綋鑰冭檻浣跨敤2.4锛屽洜涓哄畠鑳藉ぇ澶у姞閫熴備綘鐨勭郴缁熷皢浼氭洿绋冲畾銆
褰撲娇鐢LinuxThreads鏃讹紝浣犲簲褰撹嚦灏戝彲浠ョ湅瑙佹湁涓変釜mysqld 杩涚▼鍦ㄨ繍琛屻傝繖浜涘疄闄呬笂鏄嚎绋嬨傛湁涓涓嚎绋嬫槸LinuxThreads绠$悊鍣紝涓涓嚎绋嬪鐞嗚繛鎺ワ紝鍙︿竴涓嚎绋嬪鐞嗗憡璀﹀拰淇″彿銆
浜岃繘鍒跺彂甯冪敤-staticis杩炴帴锛岃鏄庝竴鑸儏鍐典綘涓嶉渶瑕佸叧蹇冪郴缁熷簱鐨勭増鏈備綘涔熶笉闇瑕佸畨瑁LinuxThreads銆傜敤-staticis杩炴帴鐨勭▼搴忕◢寰ぇ浜庡姩鎬佽繛鎺ョ▼搴忥紝浣嗕篃绋嶅井蹇竴浜(3-5%)銆備絾鏄紝闈欐佽繛鎺ョ▼搴忕殑涓涓棶棰樻槸浣犱笉鑳戒娇鐢ㄧ敤鎴峰畾涔夊嚱鏁(UDF)銆傚鏋滀綘灏嗚鍐欐垨浣跨敤UDF(鍙傜敤浜C鎴C++ 缂栫▼浜哄憳)锛屼綘蹇呴』浣跨敤鍔ㄦ侀摼鎺ヨ嚜宸辩紪璇MySQL銆
浜岃繘鍒跺垎鍙戠増鐨勪竴涓凡鐭ラ棶棰樻槸鍦ㄤ娇鐢libc鐨勬棫鐨Linux绯荤粺(渚嬪Red Hat 4.x鎴Slackware)涓婏紝浣犱細閬囧埌涓浜(闈炶嚧鍛)涓绘満鍚嶈В鏋愰棶棰樸傚鏋滅郴缁熶娇鐢libc娌℃湁浣跨敤glibc2,浣犲彲鑳戒細閬囧埌涓浜涗富鏈哄悕瑙f瀽鍜getpwnam()闂銆傝繖鏄洜涓glibc渚濋潬涓浜涘閮ㄥ簱鏉ユ墽琛屼富鏈哄悕瑙f瀽鍜getpwent(), 鍗充娇鐢-staticis缂栬瘧涔熷姝ゃ傝繖浜涢棶棰樺嚭鐜板湪涓や釜鏂归潰锛
路 褰撹繍琛mysql_install_db鏃讹紝浣犱細鐪嬭涓嬮潰鐨勯敊璇秷鎭細
路 Sorry, the host 'xxxx' could not be looked up
浣犲彲浠ラ氳繃鎵цmysql_install_db --force鏉ヨВ鍐宠闂锛屽苟涓嶅湪mysql_install_db涓墽琛resolveip娴嬭瘯銆備笉鍒╂柟闈㈡槸 浣犱笉鑳藉湪鎺堟潈琛ㄤ腑浣跨敤涓绘満鍚嶏細闄や簡localhost锛屽繀椤讳娇鐢IP鍙枫傚鏋滀綘姝d娇鐢ㄤ笉鏀寔鈥force鐨勬棫鐗堟湰MySQL锛屽繀椤讳娇鐢ㄦ枃鏈紪杈戝櫒鎵嬪姩鍗歌浇mysql_install涓殑resolveip娴嬭瘯銆
路 褰撲綘灏濊瘯鐢--user閫夐」杩愯mysqld鏃浣犺繕浼氱湅瑙佷笅闈㈢殑閿欒锛
路 getpwnam: No such file or directory
瑕佽В鍐宠闂锛屼娇鐢su鍛戒护鍚姩mysqld锛屼笉瑕佹寚瀹--user閫夐」銆傝繖鏍蜂娇绯荤粺鑷繁鏇存敼mysqld杩涚▼鐨勭敤鎴ID锛mysqld涓嶅啀闇瑕佽繖鏍峰仛銆
鍙︿竴涓В鍐冲姙娉曞彲浠ヨВ鍐充袱涓棶棰橈紝鍗充笉浣跨敤浜岃繘鍒跺垎鍙戠増銆傝幏寰MySQL婧愮爜鍒嗗彂鐗(RPM鎴tar.gz鏍煎紡)骞跺畨瑁呫
鍦ㄤ竴浜Linux 2.2鐗堟湰涓紝褰撳鎴风閫氳繃TCP/IP寤虹珛澶ч噺涓mysqld鏈嶅姟鍣ㄧ殑鏂拌繛鎺ユ椂锛屼綘鍙兘浼氶亣鍒伴敊璇Resource temporarily unavailable銆傝闂鏄Linux鍦ㄤ綘鍏抽棴TCP/IP濂楁帴瀛楃殑鏃堕棿鍜岀郴缁熷疄闄呴噴鏀捐濂楁帴瀛楃殑鏃堕棿涔嬮棿鏈変竴涓欢杩熴傚彧鏈夋湁闄愭暟鐩殑TCP/IP鏃舵鏈夌┖闂达紝鍥犳濡傛灉瀹㈡埛绔瘯鍥惧湪鐭椂闂村唴寤虹珛璁稿鏂TCP/IP杩炴帴鏃讹紝浣犱細閬囧埌婧愪笉鍙敤閿欒銆備緥濡傦紝褰撲綘閫氳繃TCP/IP杩愯MySQL test-connect鍩哄噯娴嬭瘯鏃朵綘浼氱湅瑙佽閿欒銆
鎴戜滑宸茬粡澶氭鍚戜笉鍚岀殑 Linux 閭欢鍒楄〃璇㈤棶璇ラ棶棰橈紝浣嗘槸涓鐩存病鏈夋壘鍒板悎閫傜殑瑙e喅鍔炴硶銆傚敮涓鐭ラ亾鐨勨瑙e喅鍔炴硶鈥濇槸瀹㈡埛绔娇鐢ㄦ案涔呰繛鎺ワ紝鎴栵紝濡傛灉浣犲湪鍚屼竴鏈哄櫒涓婅繍琛屾暟鎹簱鏈嶅姟鍣ㄥ拰瀹㈡埛绔紝浣跨敤Unix濂楁帴瀛楁枃浠舵潵杩炴帴锛屼笉瑕佷娇鐢TCP/IP杩炴帴銆
MySQL鍦Linux涓婁娇鐢 LinuxThreads 銆傚鏋滀綘姝e湪浣跨敤涓涓病鏈glibc2鐨勮佺殑Linux鐗堟湰锛屼綘蹇呴』鍦ㄥ皾璇曠紪璇MySQL鍓嶅畨瑁LinuxThreads銆備綘鍙互浠 http://dev.mysql.com/downloads/os-linux.html鑾峰緱LinuxThreads銆
娉ㄦ剰锛氬綋浣犳墽琛INSERT DELAYED鏃讹紝鎵鐢ㄧ殑鍖呮嫭2.1.1鍙婁互鍓嶇殑glibc鐗堟湰鍦pthread_浜掓枼_timedwait()澶勭悊涓婃湁涓涓嚧鍛介敊璇紝濡傛灉浣犳鍦ㄤ娇鐢INSERT DELAYED锛屾垜浠缓璁鍏堝崌绾glibc銆
璇锋敞鎰Linux 鍐呮牳鍜LinuxThreads搴撻粯璁ゆ儏鍐典笅鏈澶氬彲浠ュ鐞1,024涓嚎绋嬨傚鏋滀綘璁″垝浣跨敤瓒呰繃1,000涓苟琛岃繛鎺ワ紝闇瑕佸LinuxThreads杩涜涓浜涙洿鏀癸紝濡備笅鎵绀猴細
路 灏sysdeps/unix/sysv/linux/bits/local_lim.h涓殑PTHREAD_THREADS_MAX 澧炲姞鍒4096锛屽皢LinuxThreads/internals.h 涓殑STACK_SIZE鍑忓皯鍒256KB銆傝矾寰勭浉瀵逛簬glibc鐨勬牴鐩綍銆(璇锋敞鎰忓鏋STACK_SIZE涓洪粯璁ゅ2MB锛MySQL鏈600-1000涓繛鎺ユ椂涓嶇ǔ瀹氾級銆
路 閲嶆柊缂栬瘧LinuxThreads锛岀敓鎴愭柊鐨libpthreads.a搴擄紝骞堕噸鏂拌繛鎺MySQL銆
鍙互浠http://www.volano.com/linuxnotes.html 鏌ラ槄鍏充簬LinuxThreads绾跨▼闄愬埗鐨勮缁嗕俊鎭
杩樻湁涓涓棶棰樹細涓ラ噸褰卞搷MySQL鐨勬ц兘锛岀壒鍒槸鍦SMP绯荤粺涓傚湪glibc 2.1鐨LinuxThreads涓紝瀵逛簬鎷ユ湁寰堝鍙槸鐭椂闂村唴鍗犳湁浜掓枼浣撶殑绾跨▼鐨勭▼搴忥紝涓嶈兘寰堝ソ鍦版墽琛屼簰鏂ャ傜粨鏋滃嚭鐜拌崚璋殑鐜拌薄锛氬湪璁稿鎯呭喌涓嬶紝濡傛灉浣犱娇鐢ㄦ湭淇敼鐨LinuxThreads杩炴帴MySQL锛屼粠SMP涓幓鎺夊嵏杞藉鐞嗗櫒瀹為檯涓婁細鎻愰珮MySQL鐨勬ц兘銆傛垜浠彁渚涗簡涓涓glibc 2.1.3鐨勮ˉ涓佹潵绾犳璇ヨ涓(http://www.mysql.com/Downloads/Linux/linuxthreads-2.1-patch )銆
鍦glibc 2.2.2涓,MySQL浣跨敤淇敼鍚庣殑浜掓枼锛岃繖鏍风敋鑷虫瘮鎵撲簡琛ヤ竵鐨glibc 2.1.3杩樿濂藉緱澶氥備絾鏄紝闇瑕佹敞鎰忕殑鏄湪鏌愪簺鏉′欢涓嬶紝褰撳墠glibc 2.2.2涓殑浜掓枼浠g爜浼氶珮鏃嬶紝褰卞搷浜MySQL鐨勬ц兘銆傞氳繃浼樺寲mysqld杩涚▼鍒版渶楂樹紭鍏堢骇锛屽彲浠ラ檷浣庡湪杩欑鎯呭喌涓嬪嚭鐜拌繖绉嶉棶棰樼殑鍙兘鎬с傛垜浠繕鍙互閫氳繃琛ヤ竵鏉ョ籂姝i珮鏃嬮棶棰橈紝鍙互浠http://www.mysql.com/Downloads/Linux/linuxthreads-2.2.2.patch涓嬭浇銆傚畠闆嗘垚楂樻棆鐨勭籂姝c佺嚎绋嬫渶澶ф暟鐩拰鍫嗘爤绌洪棿浜庝竴浣撱備綘闇瑕佺敤琛ヤ竵patch -p0 </tmp/linuxthreads-2.2.2.patch鍦LinuxThreads鐩綍涓嬩娇鐢ㄣ傛垜浠 甯屾湜鍦ㄥ皢鏉ョ殑glibc 2.2鍙戝竷涓兘浠ユ煇绉嶅舰寮忓皢瀹冨寘鎷繘鏉ャ傚湪浠讳綍鎯呭喌涓嬶紝濡傛灉浣犺繛鎺glibc 2.2.2,浠嶇劧闇瑕佺籂姝STACK_SIZE鍜 PTHREAD_THREADS_MAX銆鎴戜滑甯屾湜鍦ㄥ皢鏉ヨ兘灏嗛粯璁ゅ肩籂姝e埌鏌愮绋嬪害涓婂彲浠ユ帴鍙楃殑鍊硷紝閫傚悎楂樿礋鑽MySQL璁剧疆锛屽洜姝ょ敤鏉ヤ骇鐢熶綘鑷繁鐨勬瀯寤虹殑 鍛戒护鍙互绠鍖栧埌鍒./configure; make; make install銆
鎴戜滑寤鸿浣犱娇鐢ㄨ繖浜涜ˉ涓佹潵鏋勫缓涓撶敤鐨libpthreads.a闈欐佺増鏈紝骞跺彧浣跨敤瀹冨悓MySQL瀹炵幇闈欐侀摼鎺ャ傛垜浠煡閬撹繖浜涜ˉ涓佸浜MySQL寰堝畨鍏 骞跺ぇ澶ф敼鍠勪簡瀹冪殑鎬ц兘锛屼絾鏄垜浠繕涓嶈兘鏂█瀹冨湪鍏跺畠搴旂敤绋嬪簭涓婄殑鏁堟灉濡備綍銆傚鏋滀綘闇瑕佸皢鍏跺畠浣跨敤LinuxThreads鐨勫簲鐢ㄧ▼搴忓悓鎵撲簡琛ヤ竵鐨勯潤鎬佺増鏈殑搴撹繛鎺ワ紝鎴栨瀯寤轰竴涓墦浜嗚ˉ涓佺殑鍏变韩鐗堟湰锛屽苟灏嗗畠瀹夎鍒扮郴缁熶腑锛屼綘灏嗚嚜宸辨壙鎷呴闄┿
濡傛灉浣犲湪瀹夎MySQL鐨勮繃绋嬩腑閬囧埌浠讳綍濂囨殑闂锛屾垨涓浜涘父鐢ㄥ疄鐢ㄥ伐鍏疯鎮寕璧锋潵锛屽緢鍙兘鏄簱鎴栫紪璇戝櫒鐩稿叧闂銆傚湪杩欑鎯呭喌涓嬶紝浣跨敤鎴戜滑鐨勪簩杩涘埗鏉ヨВ鍐炽
濡傛灉浣犺繛鎺ヤ綘鑷繁鐨MySQL瀹㈡埛绔▼搴忥紝杩愯鏃朵綘浼氱湅瑙佷笅闈㈢殑閿欒锛
ld.so.1: fatal: libmysqlclient.so.#:
open failed: No such file or directory
浣跨敤涓嬮潰鐨勬柟娉曞彲浠ラ伩鍏嶈闂锛
路 鐢-Wl,r/full/path/to/libmysqlclient.so鏍囪杩炴帴瀹㈡埛绔紝涓嶈浣跨敤-Lpath)銆
路 灏libmysqclient.so澶嶅埗鍒/usr/lib銆
路 杩愯瀹㈡埛绔▼搴忓墠锛屽皢libmysqlclient.so鎵鍦ㄧ洰褰曠殑璺緞鍚嶅鍔犲埌LD_RUN_PATH鐜鍙橀噺銆
濡傛灉浣跨敤Fujitsu缂栬瘧鍣 (fcc/FCC)锛岀紪璇MySQ鏃跺彲鑳戒細鍑虹幇涓浜涢棶棰橈紝鍥犱负Linux澶存枃浠朵富瑕侀潰鍚gcc銆備互涓嬬殑configure琛屽簲褰撶粨鍚fcc/FCC浣跨敤锛
CC=fcc CFLAGS="-O -K fast -K lib -K omitfp -Kpreex -D_GNU_SOURCE \
-DCONST=const -DNO_STRTOLL_PROTO" \
CXX=FCC CXXFLAGS="-O -K fast -K lib \
-K omitfp -K preex --no_exceptions --no_rtti -D_GNU_SOURCE \
-DCONST=const -Dalloca=__builtin_alloca -DNO_STRTOLL_PROTO \
'-D_EXTERN_INLINE=static __inline'" \
./configure \
--prefix=/usr/local/mysql --enable-assembler \
--with-mysqld-ldflags=-all-static --disable-shared \
--with-low-memory
鍦MySQL瀹夎鐩綍鎴MySQL婧愮爜鏍戜笅鐨support-files鐩綍涓嬪彲浠ユ壘鍒mysql.server銆備綘鍙互灏嗗畠瀹夎涓/etc/init.d/mysql锛屼互渚胯嚜鍔ㄥ惎鍔ㄥ拰鍏抽棴MySQL銆傝鍙傝2.9.2.2鑺傦紝鈥滆嚜鍔ㄥ惎鍔ㄥ拰鍋滄MySQL鈥銆
濡傛灉MySQL涓嶈兘鎵撳紑瓒冲鐨勬枃浠舵垨杩炴帴锛屽彲鑳芥槸浣犳病鏈夊皢Linux閰嶇疆涓哄鐞嗚冻澶熺殑鏂囦欢銆
鍦Linux 2.2鍙婁互涓婄増鏈腑锛屼綘鍙互妫鏌ュ垎閰嶇殑鏂囦欢鐨勬暟鐩細
shell> cat /proc/sys/fs/file -max
shell> cat /proc/sys/fs/dquot-max
shell> cat /proc/sys/fs/super-max
濡傛灉鏈夎秴杩16MB鐨勫唴瀛橈紝搴斿綋鍦ㄥ惎鍔ㄨ剼鏈腑澧炲姞濡備笅鍐呭(渚嬪锛屽湪SuSE Linux涓細/etc/init.d/boot.local)锛
echo 65536 > /proc/sys/fs/file-max
echo 8192 > /proc/sys/fs/dquot-max
echo 1024 > /proc/sys/fs/super-max
杩樺彲浠ョ敤root浠庡懡浠よ杩愯echo鍛戒护锛屼絾鏄笅涓娆¢噸鏂板惎鍔ㄨ绠楁満鏃惰繖浜涜瀹氬间細涓㈡帀銆
鍙﹀锛屽彲浠ヤ娇鐢ㄨ澶Linux鍒嗗彂鐗堜娇鐢ㄧ殑sysctl宸ュ叿璁剧疆鍚姩鍙傛暟(鍖呮嫭SuSE Linux 8.0鍜屼互鍚庣増鏈)銆傚皢涓嬮潰鐨勫兼斁鍒版枃浠 /etc/sysctl.conf涓細
# Increase some values for MySQL
fs.file-max = 65536
fs.dquot-max = 8192
fs.super-max = 1024
浣犺繕搴斿皢浠ヤ笅鍐呭鍔犲叆/etc/my.cnf锛
[mysqld_safe]
open-files-limit=8192
杩欐牱鏈嶅姟鍣ㄨ繛鎺ュ拰鎵撳紑鏂囦欢鐨勬绘暟鐩彲浠ヨ揪鍒8,192銆
LinuxThreads鐨STACK_SIZE甯告暟鎺у埗鍦ㄥ鍧绌洪棿涓嚎绋嬪爢鏍堢殑鍗犵敤绌洪棿銆傚畠闇瑕佽冻澶熷ぇ锛屼互淇濊瘉姣忎釜绾跨▼鍫嗘爤鏈夎冻澶熺殑绌洪棿锛屼絾鏄簲瓒冲灏忥紝闃叉鏌愪簺绾跨▼鐨勫爢鏍堣繍琛屽叏灞mysqld鏁版嵁銆傞仐鎲剧殑鏄紝鏍规嵁鎴戜滑鐨勫彂鐜帮紝濡傛灉浣犵敤mmap()鏄犲皠鐩墠姝d娇鐢ㄧ殑瀵诲潃锛Linux鎴愬姛杩愯 鍚庝笉浼氭槧灏勬槧灏勫尯锛屽皢浼氭竻绌烘暣涓湴鍧椤典笂鐨勬暟鎹屼笉浼氳繑鍥為敊璇俊鎭傚洜姝わ紝mysqld鎴栧叾瀹冪嚎绋嬪簲鐢ㄧ▼搴忕殑瀹夊叏渚濋潬鍒涘缓绾跨▼鐨勪唬鐮佺殑鈥缁呭+鈥濊涓恒傜敤鎴峰繀椤婚噰鍙栨帾鏂戒互纭繚鍦ㄤ换浣曟椂闂磋繍琛岀嚎绋嬬殑鏁扮洰鐩稿绾跨▼鍫嗘爤搴旇冻澶熶綆锛屼互闃叉鍏ㄥ眬鍫嗗唴瀛樸備娇鐢mysqld鏃讹紝浣犲簲褰撲负max_connections鍙橀噺璁剧疆鍚堢悊鐨勫煎己鍒惰琛屼负銆
濡傛灉浣犺嚜宸辨瀯寤MySQL锛屼綘鍙互涓LinuxThreads鎵撹ˉ涓佷互渚挎洿濂藉湴浣跨敤鍫嗘爤銆傝鍙傝2.12.1.3鑺傦紝鈥淟inux婧愮爜鍒嗗彂鐗堣鏄庘銆傚鏋滀綘涓嶆兂涓LinuxThreads鎵撹ˉ涓侊紝浣犲簲褰撳皢max_connections鐨勫艰缃负涓嶈秴杩500銆傚鏋滀綘鏈夊ぇ鐨勫叧閿瓧缂撳啿鍖恒佸ぇ鐨勫爢鍐呭瓨琛紝鎴栧叾瀹冧娇mysqld鍒嗛厤澶ч噺鍐呭瓨鐨勪笢瑗匡紝鎴栧鏋滀綘鐢2GB鐨勮ˉ涓佽繍琛2.2鍐呮牳锛max_connections鐨勫煎簲褰撴洿浣庛傚鏋滀綘姝d娇鐢ㄦ垜浠殑浜岃繘鍒舵垨RPM鐗堟湰锛屽彲浠ュ畨鍏ㄥ湴灏max_connections璁剧疆涓1500锛堝亣瀹氭病鏈夊ぇ鐨勫叧閿瓧缂撳啿鍖烘垨鏈夊ぇ閲忔暟鎹殑鍫嗗唴瀛樿〃銆傚皢LinuxThreads涓殑STACK_SIZE闄嶄綆寰楄秺浣庯紝鍙互瀹夊叏鍦板垱寤鸿秺澶氱殑绾跨▼銆傛垜浠帹鑽愮殑鍊肩殑鑼冨洿涓128KB鍒256KB銆
濡傛灉浣犳浣跨敤澶ч噺鐨勫苟琛岃繛鎺ワ紝鍦2.2鍐呮牳涓綘鍙兘浼氶亣鍒颁竴涓滅壒鎬р濓紝鍗抽氳繃瀵硅繘绋嬬殑鍒嗘敮鎴栧厠闅嗗瓙杩涚▼鐨勮涓鸿繘琛岀綒鍒嗭紝鏉ヨ瘯鍥鹃槻姝㈣桨鐐告敾鍑汇傝繖鏍蜂綘澧炲姞骞惰瀹㈡埛绔殑鏁伴噺鏃讹紝MySQL涓嶈兘姝g‘鍝嶅簲銆傚湪鍗CPU绯荤粺涓紝鎴戜滑宸茬粡鍙戠幇璇ョ幇璞★紝鍗崇嚎绋嬪垱寤哄湴寰堟參锛涜繛鎺MySQL鐨勬椂闂村緢闀(闀胯揪1鍒嗛挓)锛屽苟涓斿叧闂殑鏃堕棿涔熷緢闀裤傚湪澶CPU绯荤粺涓紝鎴戜滑宸茬粡瑙傚療鍒伴殢鐫瀹㈡埛绔暟鐩殑澧炲姞锛屾煡璇㈤熷害閫愭笎涓嬮檷銆傚湪瀵绘眰瑙e喅鍔炴硶鐨勮繃绋嬩腑锛屾垜浠敹鍒颁簡涓涓敤鎴风殑鍐呮牳琛ヤ竵锛屼粬澹扮О璇ヨˉ涓佸彲浠ヨВ鍐充粬鐨勯棶棰樸備粠http://www.mysql.com/Downloads/Patches/linux-fork.patch鍙互涓嬭浇璇ヨˉ涓併傛垜浠凡缁忓湪寮鍙戝拰鐢熶骇绯荤粺涓婂璇ヨˉ涓佽繘琛屼簡骞挎硾鐨勬祴璇曘傚畠鍙互澶уぇ鏀瑰杽MySQL鐨勬ц兘锛岃屼笉浼氶犳垚浠讳綍闂锛屾垜浠悜浠嶇劧鍦2.2鍐呮牳杩愯楂樿礋鑽锋湇鍔″櫒鐨勭敤鎴锋帹鑽愬畠銆
鍦2.4鍐呮牳涓凡缁忓璇ラ棶棰樿繘琛屼簡淇锛屽洜姝ゅ鏋滀綘涓嶆弧鎰忓綋鍓嶇郴缁熺殑鎬ц兘锛屼笉瑕佷负2.2 鍐呮牳鎵撹ˉ涓侊紝鍦SMP绯荤粺涓崌绾у埌2.4鐗堣瀹规槗鍦板锛屽崌绾т笉浠呭彲浠ヤ慨澶嶉敊璇紝杩樺彲浠ヤ娇SMP鏇村ソ鍦板姞閫熴
鎴戜滑宸茬粡鍦ㄥ弻CPU鏈哄櫒涓婂湪2.4鍐呮牳涓MySQL杩涜浜嗘祴璇曪紝鍙戠幇MySQL鐨勬瘮渚嬭濂藉緱澶氥1,000鍚嶅鎴锋煡璇㈡椂锛岃繕鐪嬩笉鍒伴熷害鏈夊疄璐ㄤ笂鐨勪笅闄嶏紝MySQL鐨勬瘮渚嬪洜瀛(鏈澶у悶鍚愰噺涓庝竴涓鎴风鐨勫悶鍚愰噺鐨勬瘮渚)涓180%銆傛垜浠湪鍥-CPU绯荤粺涓篃瑙傚療鍒颁簡绫讳技鐨勭粨鏋滐細褰撳鎴锋暟鐩笂鍗囧埌1,000鍚嶆椂杩樻病鏈夊疄璐ㄤ笂鐨勫噺鎱, 姣斾緥鍥犲瓙涓300%銆傛牴鎹繖浜涚粨鏋滐紝瀵逛簬浣跨敤2.2鍐呮牳鐨勯珮璐熻嵎SMP鏈嶅姟鍣紝鎴戜滑缁濆寤鸿鍗囩骇鍒 2.4鍐呮牳銆
鎴戜滑宸茬粡鍙戠幇锛屽湪2.4鍐呮牳涓簲浣跨敤鍙兘鐨勬渶楂樹紭鍏堢骇鏉ヨ繍琛mysqld杩涚▼锛屼互鑾峰緱鏈浣虫ц兘銆傚彲浠ラ氳繃涓mysqld_safe鍔renice -20 $$鍛戒护鏉ュ疄鐜般傚湪鍥-CPU绯荤粺涓殑娴嬭瘯涓紝鎻愰珮浼樺厛绾у湪400涓鎴锋椂浼氫娇鍚炲悙閲忓鍔60%銆
鎴戜滑鐩墠杩樻兂鎼滈泦鍏充簬MySQL鍦four-way鍜eight-way绯荤粺涓婄敤2.4鍐呮牳鎵ц鐨勬ц兘鐨勬洿璇︾粏淇℃伅銆傚鏋滀綘璁块棶浜嗚繖浜涚郴缁熷苟杩涜浜嗕竴浜涘熀鍑嗘祴璇曪紝璇峰皢缁撴灉鐢email鍙戦佸埌<benchmarks@mysql.com>銆傛垜浠皢瀵瑰畠浠繘琛屽鏌ヤ互鍖呮嫭杩涙墜鍐屼腑銆
濡傛灉鐢ps杩愯mysqld鏈嶅姟鍣ㄨ繘绋嬫椂鍙戠幇杩涚▼姝绘帀浜嗭紝涓鍗婃槸MySQL涓湁缂洪櫡鎴栨暟鎹簱琛ㄥ穿婧冧簡銆傝鍙傝A.4.2鑺傦紝鈥滃鏋淢ySQL渚濈劧宕╂簝锛屽簲浣滀簺浠涔堚銆
濡傛灉mysqld姝绘帀骞剁粰鍑SIGSEGV淇″彿锛岃鎯冲湪Linux涓鍐呮牳杩涜璋冭瘯锛屼綘鍙互鐢--core-file閫夐」鍚姩mysqld銆傛敞鎰忎綘杩樺彲鑳介渶瑕侀氳繃鍚mysqld_safe娣诲姞ulimit -c 1000000鎴栫敤--core-file-size=1000000鍚姩mysqld_safe鏉ュ姞澶у唴鏍告枃浠剁殑澶у皬銆傝鍙傝5.1.3鑺傦紝鈥渕ysqld_safe锛歁ySQL鏈嶅姟鍣ㄥ惎鍔ㄨ剼鏈銆
MySQL闇瑕5.4.12鎴栨洿鏂扮増鏈殑libc銆傚凡鐭ュ畠鍙互鍦libc 5.4.46涓伐浣溿glibc 2.0.6鍜屾洿鏂扮増鏈簲褰撲篃鍙互宸ヤ綔銆Red Hat鐨glibc RPM鏈変竴浜涢棶棰橈紝鍥犳濡傛灉浣犻亣鍒伴棶棰橈紝搴旂湅鐪嬫槸鍚︽湁鏇存柊鐗堛傚凡鐭glibc 2.0.7-19鍜2.0.7-29 RPM鍙互宸ヤ綔銆
濡傛灉浣犳浣跨敤Red Hat 8.0鎴栨洿鏂扮殑glibc 2.2.x搴擄紝浣犱細鐪嬭mysqld鎵цgethostbyaddr()鏃朵細姝绘帀銆傝繖鏄洜涓烘柊鐨glibc搴撳湪鎵ц璇ヨ皟鐢ㄦ椂闇瑕佸ぇ浜128KB鐨勫爢鏍堢┖闂淬傝鎯充慨澶嶈闂锛岀敤--thread-stack=192K閫夐」鍚姩mysqld銆(鍦MySQL 4浠ュ墠鐨勭増鏈腑搴斾娇鐢-O thread_stack=192K锛銆 鍦MySQL 4.0.10鍜屼互涓婄増鏈腑锛岃鍫嗘爤绌洪棿鍊煎嵆涓洪粯璁ゅ硷紝鍥犳浣犱笉浼氱湅瑙佽闂銆
濡傛灉浣犳浣跨敤gcc 3.0鍜屼互涓婄増鏈紪璇MySQL锛屽湪缂栬瘧MySQL鍓嶄綘蹇呴』鍏堝畨瑁libstdc++v3搴擄紱濡傛灉涓嶈繖鏍峰仛锛屽湪鑱旀帴杩囩▼涓細閬囧埌鍏充簬涓㈠け__cxa_pure_virtual绗﹀彿鐨勯敊璇
鍦ㄤ竴浜涙棫鐨Linux鍒嗗彂鐗堜腑锛configure浼氱敓鎴愬涓嬮敊璇細
Syntax error in sched.h. Change _P to __P in the
/usr/include/sched.h file.
See the Installation chapter in the Reference Manual.
鍙渶瑕佹寜鐓ч敊璇秷鎭殑鎻愮ず鎿嶄綔銆傚鍙湁涓鏉′笅鍒掔嚎鐨_P鍚嶅啀澧炲姞涓鏉′笅鍒掔嚎锛岀劧鍚庨噸鏂板皾璇曘
缂栬瘧鏃跺彲鑳戒細鍑虹幇璀﹀憡銆備笅闈㈢殑璀﹀憡鍙互蹇界暐锛
mysqld.cc -o objs-thread/mysqld.o
mysqld.cc: In function `void init_signals()':
mysqld.cc:315: warning: assignment of negative value `-1' to
`long unsigned int'
mysqld.cc: In function `void * signal_hand(void *)':
mysqld.cc:346: warning: assignment of negative value `-1' to
`long unsigned int'
濡傛灉mysqld鍚姩鏃舵绘槸鍑虹幇杞偍鍐呮牳锛 闂鍙兘鏄綘浣跨敤浜嗘棫鐨/lib/libc.a銆傚皾璇曢噸鏂板鍏跺懡鍚嶏紝鐒跺悗鍒犳帀sql/mysqld骞堕噸鏂版墽琛make install鐒跺悗鍐嶆灏濊瘯銆傚凡缁忔姤瀵煎湪閮ㄥ垎Slackware瀹夎涓嚭鐜颁簡璇ラ棶棰樸
褰撻摼鎺mysqld鏃跺鏋滃嚭鐜颁笅闈㈢殑閿欒锛岃鏄libg++.a瀹夎涓嶆纭細
/usr/lib/libc.a(putc.o): In function `_IO_putc':
putc.o(.text+0x0): multiple definiti鍦of `_IO_putc'
浣犲彲浠ヤ娇鐢libg++.a杩愯configure鏉ラ伩鍏嶈闂锛
shell> CXX=gcc ./configure
鎴戜滑宸茬粡鐢ㄦ垜浠殑鍩哄噯鍜屾祴璇曞浠跺湪Alpha涓祴璇曚簡MySQL 5.1锛岀湅璧锋潵宸ヤ綔寰椾笉閿欍
鎴戜滑鐩墠鍦ㄩ厤缃Alpha EV6澶勭悊鍣ㄧ殑Compaq DS20鏈哄櫒涓婏紝鍦SuSE Linux 7.0涓AXP銆佸唴鏍2.4.4-SMP銆Compaq C缂栬瘧鍣(V6.2-505)鍜Compaq C++缂栬瘧鍣(V6.3-006)鏋勫缓MySQL浜岃繘鍒惰蒋浠跺寘銆
浣犲彲浠ヤ粠 http://www.support.compaq.com/alpha-tools/ 鎵惧埌涓婅堪缂栬瘧鍣ㄣ備娇鐢ㄨ繖浜涚紪璇戝櫒锛屽緱鍒扮殑MySQL鎬ц兘姣gcc瑕佸ソ9-14%銆
鍦Alpha鐗MySQL涓紝鎴戜滑鍦ㄧ紪璇戦夐」涓娇鐢-arch generic鏍囪锛屽彲浠ョ‘淇濅簩杩涘埗鍦ㄦ墍鏈Alpha澶勭悊鍣ㄤ腑杩愯銆傛垜浠繕閲囩敤闈欐佺紪璇戜互閬垮厤搴撻棶棰樸configure鍛戒护搴斾负锛
CC=ccc CFLAGS="-fast -arch generic" CXX=cxx \
CXXFLAGS="-fast -arch generic -noexceptions -nortti" \
./configure --prefix=/usr/local/mysql --disable-shared \
--with-extra-charsets=complex --enable-thread-safe-client \
--with-mysqld-ldflags=-non_shared --with-client-ldflags=-non_shared
濡傛灉鎯宠浣跨敤egcs锛屽彲浠ヤ娇鐢ㄤ笅闈㈢殑configure琛岋細
CFLAGS="-O3 -fomit-frame-pointer" CXX=gcc \
CXXFLAGS="-O3 -fomit-frame-pointer -felide-constructors \
-fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql --disable-shared
宸茬煡鐨勫湪Linux-Alpha涓繍琛MySQL鐨勯棶棰橈細
路 鍦gdb 4.18 涓笉鑳借皟璇曠嚎绋嬪簲鐢ㄧ▼搴忋備綘搴斿綋浣跨敤gdb 5.1銆
路 浣跨敤gcc鏃跺鏋滀綘灏濊瘯闈欐侀摼鎺mysqld锛屽惎鍔ㄦ椂鏄犲儚浼氬鑷磋浆鍌ㄥ唴鏍搞傛崲鍙ヨ瘽璇达紝浣跨敤gcc鏃朵笉瑕佷娇鐢--with-mysqld-ldflags=-all-static銆
瑕佹兂璁MySQL鍦Linux IA-64涓紪璇,鎴戜滑鐢 gcc 2.96鏋勫缓鏃朵娇鐢ㄤ笅闈㈢殑configure鍛戒护锛
CC=gcc \
CFLAGS="-O3 -fno-omit-frame-pointer" \
CXX=gcc \
CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors \
-fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql \
"--with-comment=Official MySQL binary" \
--with-extra-charsets=complex
鍦IA-64涓,MySQL瀹㈡埛绔簩杩涘埗浣跨敤鍏变韩搴撱傝繖鎰忓懗鐫濡傛灉浣犲皢鎴戜滑鐨勪簩杩涘埗鍒嗗彂鐗堝畨瑁呭埌/usr/local/mysql涔嬪鐨勫叾瀹冧綅缃紝闇瑕佸皢libmysqlclient.so瀹夎鐩綍璺緞鍔犲埌/etc/ld.so.conf鏂囦欢鎴LD_LIBRARY_PATH鐜鍙橀噺涓
MySQL搴斿綋鍙互鍦Mac OS X 10.x(Darwin)涓伐浣滐紝涓嶄細鏈夐噸澶ч棶棰樸
宸茬煡鐨勯棶棰樻湁锛
路 杩炴帴鏃堕棿(wait_timeout銆interactive_timeout鍜net_read_timeout)鍊间笉鐞嗘兂銆
杩欏彲鑳芥槸绾跨▼搴撲腑鐨勪俊鍙峰鐞嗛棶棰橈紝淇″彿涓嶈兘涓柇鎸傝捣鐨勮鍛戒护锛屾垜浠笇鏈涘皢鏉ヨ兘瀵圭嚎绋嬪簱杩涜鏇存柊浠ヤ慨澶嶈闂銆
鍦Darwin 6.3涓敤涓嬮潰鐨configure琛屽Mac OS X浜岃繘鍒惰繘琛屼簡缂栬瘧锛
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc \
CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors \
-fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql \
--with-extra-charsets=complex --enable-thread-safe-client \
--enable-local-infile --disable-shared
瀵逛簬褰撳墠鐗堟湰鐨Mac OS X鏈嶅姟鍣紝缂栬瘧MySQL涔嬪墠涓嶉渶瑕佸鎿嶄綔绯荤粺杩涜鏇存敼銆傚湪鏈嶅姟鍣ㄥ钩鍙颁笂鐨勭紪璇戜笌瀹㈡埛绔増鏈Mac OS X鐩稿悓銆
瀵逛簬鏃х殑鐗堟湰(Mac OS X Server 1.2, a.k.a. Rhapsody)锛屽湪閰嶇疆MySQL涔嬪墠蹇呴』鍏堝畨瑁pthread杞欢鍖呫
鍦Solaris涓紝鐢氳嚦鍦ㄨВ鍘嬬缉MySQL鍒嗗彂鐗堟椂锛屼綘涔熶細閬囧埌闂锛屽洜涓Solaris tar涓嶈兘澶勭悊闀挎枃浠跺悕銆傝繖璇存槑瑙e帇缂MySQL鍒嗗彂鐗堟椂浼氶亣瑙侀敊璇
濡傛灉鍑虹幇杩欑闂锛屽繀椤讳娇鐢GNU tar(gtar)鏉ヨВ鍘嬬缉鍒嗗彂鐗堛傚彲浠ヤ粠http://dev.mysql.com/downloads/os-solaris.html鎵惧埌棰勭紪璇戠殑Solaris鐗堟湰銆
Sun鍘熺敓绾跨▼鍙湪Solaris 2.5鍜屾洿楂樼増鏈腑宸ヤ綔銆傚浜庣増鏈2.4鍜屾洿鏃╃増鏈紝MySQL鑷姩浣跨敤MIT-pthreads銆傝鍙傝2.8.5鑺傦紝鈥淢IT-pthreads娉ㄦ剰浜嬮」鈥銆
濡傛灉浣犺繍琛configure鏃堕亣鍒颁笅闈㈢殑閿欒锛岃鏄庣紪璇戝櫒瀹夎寰楁湁闂锛
checking for restartable system calls... configure: error can not
run test programs while cross compiling
鍦ㄨ繖绉嶆儏鍐典笅锛屽簲褰撳皢缂栬瘧鍣ㄥ崌绾у埌杈冩柊鐨勭増鏈傝繕鍙互鍦config.cache鏂囦欢涓彃鍏ヤ笅闈㈢殑琛屾潵瑙e喅璇ラ棶棰橈細
ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls='no'}
濡傛灉鍦SPARC涓婁娇鐢Solaris锛屽缓璁娇鐢ㄧ紪璇戝櫒gcc 2.95.2鎴3.2銆傚彲浠ヤ粠http://gcc.gnu.org/涓嬭浇銆傝娉ㄦ剰egcs 1.1.1鍜gcc 2.8.1涓嶈兘鍦SPARC涓婂彲闈犲湴宸ヤ綔銆
褰撲娇鐢gcc 2.95.2鏃跺缓璁殑configure琛岋細
CC=gcc CFLAGS="-O3" \
CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql --with-low-memory \
--enable-assembler
濡傛灉浣犱娇鐢UltraSPARC绯荤粺锛屽湪CFLAGS鍜CXXFLAGS鐜鍙橀噺涓姞涓-mcpu=v8 -Wa,-xarch=v8plusa锛鎬ц兘鍙互鎻愰珮4%銆
濡傛灉浣犳湁Sun Forte 5.0(鎴栨洿鏂扮増)缂栬瘧鍣紝鍙互杩愯锛
CC=cc CFLAGS="-Xa -fast -native -xstrconst -mt" \
CXX=CC CXXFLAGS="-noex -mt" \
./configure --prefix=/usr/local/mysql --enable-assembler
瑕佹兂鐢Sun Forte 缂栬瘧鍣ㄥ垱寤64-浣嶄簩杩涘埗锛屼娇鐢ㄤ笅闈㈢殑閰嶇疆閫夐」锛
CC=cc CFLAGS="-Xa -fast -native -xstrconst -mt -xarch=v9" \
CXX=CC CXXFLAGS="-noex -mt -xarch=v9" ASFLAGS="-xarch=v9" \
./configure --prefix=/usr/local/mysql --enable-assembler
瑕佹兂浣跨敤gcc鍒涘缓64-浣Solaris浜岃繘鍒讹紝鍦CFLAGS鍜CXXFLAGS涓澧炲姞-m64锛屽苟浠configure琛屽垹鎺--enable-assembler銆
鍦MySQL鍩哄噯娴嬭瘯涓紝鍦UltraSPARC涓婁娇鐢32浣嶆ā寮忕殑Forte 5.0锛屽悓浣跨敤甯-mcpu鏍囪鐨gcc 3.2姣旇緝锛岄熷害鎻愰珮浜4%銆
濡傛灉鍒涘缓浜64浣嶇殑mysqld浜岃繘鍒讹紝閫熷害瑕佹瘮32-浣嶄簩杩涘埗鎱4%锛屼絾鏄彲浠ュ鐞嗘洿澶氱殑绾跨▼鍜屽唴瀛樸
褰撲负x86_64浣跨敤Solaris 10鏃,浣犲簲褰撳畨瑁呯敤forcedirectio閫夐」淇濆瓨InnoDB鏂囦欢鐨勬枃浠剁郴缁熴(榛樿鎯呭喌涓嶇敤璇ラ夐」鏉ュ畨瑁)銆傚鏋滀笉杩欐牱鍋氾紝褰撳湪璇ュ钩鍙颁笂浣跨敤InnoDB 鍌ㄥ瓨寮曟搸鏃跺皢浼氶犳垚涓ラ噸鐨勬ц兘涓嬮檷銆
濡傛灉fdatasync鎴sched_yield鍑虹幇闂锛屼綘鍙互鍦configure琛屽姞LIBS=-lrt淇璇ラ棶棰樸
瀵逛簬鏃╀簬WorkShop 5.3鐨勭紪璇戝櫒,浣犲彲鑳介渶瑕佺紪杈configure鑴氭湰銆傚簲灏嗚琛岋細
#if !defined(__STDC__) || __STDC__ != 1
鏇磋涓猴細
#if !defined(__STDC__)
濡傛灉浣犵敤-Xc 閫夐」鎵撳紑__STDC__锛Sun 缂栬瘧鍣ㄤ笉鑳界敤Solaris pthreads.h 澶存枃浠剁紪璇戙傝繖鏄竴涓Sun 缂洪櫡(涓柇鐨勭紪璇戝櫒鎴include鏂囦欢)銆
濡傛灉杩愯mysqld鏃跺嚭鐜颁笅闈㈢殑閿欒娑堟伅锛屽師鍥犳槸浣犱紒鍥句笉鍚敤-mt multi-thread閫夐」鑰岀敤Sun缂栬瘧鍣ㄧ紪璇MySQL锛
libc internal error: _rmutex_unlock: rmutex not held
灏-mt鍔犲埌CFLAGS鍜CXXFLAGS涓婂苟閲嶆柊缂栬瘧銆
濡傛灉浣犳浣跨敤gcc鐨SFW鐗堟湰(鍦Solaris 8瀹夎鍖呭唴)锛岃繍琛configure涔嬪墠浣犲繀椤诲皢/opt/sfw/lib鍔犲埌鐜鍙橀噺LD_LIBRARY_PATH涓娿
濡傛灉浣犳浣跨敤浠sunfreeware.com涓嬭浇鐨gcc锛屼細閬囧埌璁稿闂銆傝鎯抽伩鍏嶏紝搴斿綋鍦ㄨ繍琛屾満鍣ㄤ笂閲嶆柊缂栬瘧gcc鍜GNU binutils銆
濡傛灉浣犵敤gcc缂栬瘧MySQL鏃堕亣鍒颁笅闈㈢殑閿欒锛岃鏄gcc閰嶇疆涓嶉傚悎Solaris鐨勭増鏈細
shell> gcc -O3 -g -O2 -DDBUG_OFF -o thr_alarm ...
./thr_alarm.c: In function `signal_hand':
./thr_alarm.c:556: too many arguments to function `sigwait'
鍦ㄨ繖绉嶆儏鍐典笅姝g‘鐨勫仛娉曟槸寰楀埌鏈鏂扮増鏈殑gcc锛屽苟鐢ㄤ綘褰撳墠鐨gcc缂栬瘧鍣ㄧ紪璇戙傝嚦灏戝浜Solaris 2.5,鍑犱箮鎵鏈変簩杩涘埗鐗堟湰鐨gcc鏈夋棫鐨勪笉鍐嶄娇鐢ㄧ殑include鏂囦欢,涓柇浜嗘墍鏈変娇鐢ㄧ嚎绋嬬殑绋嬪簭锛屼篃鍙兘浼氫腑鏂叾瀹冪▼搴忋
Solaris涓嶆彁渚涢潤鎬佺増鏈殑绯荤粺搴(libpthreads鍜libdl)锛屽洜姝や綘涓嶈兘鐢--static缂栬瘧MySQL銆傚鏋滀綘璇曞浘杩欐牱鍋氾紝浼氶亣鍒颁笅闈㈢殑閿欒锛
ld: fatal: library -ldl: not found
undefined reference to `dlopen'
cannot find -lrt
濡傛灉浣犺繛鎺ヤ綘鑷繁鐨MySQL瀹㈡埛绔▼搴忥紝杩愯鏃朵細鍑虹幇涓嬮潰鐨勯敊璇細
ld.so.1: fatal: libmysqlclient.so.#:
open failed: No such file or directory
鍙互閫氳繃涓嬮潰鐨勬柟娉曢伩鍏嶈闂锛
路 鐢-Wl,r/full/path/to/libmysqlclient.so鏍囪鑰屼笉瑕佺敤-Lpath)杩炴帴瀹㈡埛绔
路 灏libmysqclient.so澶嶅埗鍒/usr/lib銆
路 杩愯瀹㈡埛绔▼搴忓墠锛屽皢libmysqlclient.so鐩綍鐨勮矾寰勫悕鍔犲埌LD_RUN_PATH鐜鍙橀噺涓娿
濡傛灉浣犳湭瀹夎zlib鐢 -lz杩炴帴鏃configure鍑虹幇闂锛屼綘鏈変袱涓夊垯锛
路 濡傛灉浣犳兂瑕佷娇鐢ㄥ帇缂╅氫俊鍗忚锛屼綘闇瑕佷粠ftp.gnu.org鑾峰緱骞跺畨瑁zlib銆
路 鏋勫缓MySQL鏃剁敤--with-named-z-libs=no閫夐」杩愯configure銆
濡傛灉浣犳浣跨敤gcc锛屽悜MySQL璋冪敤鐢ㄦ埛瀹氫箟鍑芥暟(UDF)鏃跺嚭鐜伴棶棰橈紝灏濊瘯鍚UDF杩炴帴琛屾坊鍔-lgcc鍒般
濡傛灉鎯宠MySQL鑷姩鍚姩锛屽彲浠ュ皢support-files/mysql.server澶嶅埗鍒/etc/init.d锛骞跺垱寤/etc/rc3.d/S99mysql.server绗﹀彿杩炴帴銆
濡傛灉鏈夊お澶氳繘绋嬭瘯鍥惧揩閫熻繛鎺mysqld锛屼綘搴斿綋鑳藉啀MySQL鏃ュ織鍙湅瑙侀敊璇細
Error in accept: Protocol error
鍙互灏濊瘯鐢--back_log=50閫夐」鍚姩鏈嶅姟鍣ㄦ潵瑙e喅璇ラ棶棰樸(鍦MySQL 4浠ュ墠鐨勭増鏈腑浣跨敤-O back_log=50锛銆
Solaris涓嶆敮鎸setuid() 搴旂敤绋嬪簭鎵闇鐨勫唴鏍告枃浠讹紝鍥犳濡傛灉浣犱娇鐢--user閫夐」浣犱笉鑳戒粠mysqld閬囧埌鍐呮牳鏂囦欢銆
涓鑸儏鍐碉紝鍙互鍦Solaris 2.7鍜2.8涓娇鐢Solaris 2.6浜岃繘鍒躲傚ぇ澶氭暟Solaris 2.6鍙戝竷涔熼傜敤Solaris 2.7鍜2.8銆
MySQL搴斿綋鑳藉鑷姩妫娴嬪埌鏂扮殑Solaris鐗堟湰骞惰В鍐充笅闈㈢殑闂銆
Solaris 2.7/2.8鐨include鏂囦欢涓湁涓浜涚己闄枫傚綋浣跨敤gcc鏃浣犱細鐪嬭涓嬮潰鐨勯敊璇細
/usr/include/widec.h:42: warning: `getwc' redefined
/usr/include/wchar.h:326: warning: this is the location of the previous
definition
濡傛灉鍑虹幇璇ラ棶棰橈紝淇鐨勫姙娉曟槸灏/usr/include/widec.h澶嶅埗鍒.../lib/gcc-lib/os/gcc-version/include锛屽苟灏41琛屼粠锛
#if !defined(lint) && !defined(__lint)
鏇存敼涓猴細
#if !defined(lint) && !defined(__lint) && !defined(getwc)
鍙﹀锛屽彲浠ョ洿鎺ョ紪杈/usr/include/widec.h銆傜敤浠讳綍涓绉嶆柟娉曚慨澶嶅悗锛屽簲褰撳垹鎺config.cache骞跺啀娆¤繍琛configure銆
濡傛灉杩愯make鏃堕亣鍒颁笅闈㈢殑閿欒锛岃繖鏄洜涓configure涓嶈兘妫娴嬪埌curses.h鏂囦欢(鍙兘鏄洜涓/usr/include/widec.h涓殑閿欒)锛
In file included from mysql.cc:50:
/usr/include/term.h:1060: syntax error before `,'
/usr/include/term.h:1081: syntax error before `;'
鍙互鐢ㄤ笅闈换浣曚竴绉嶆柟娉曡В鍐宠闂锛
路 鐢CFLAGS=-DHAVE_CURSES_H CXXFLAGS=-DHAVE_CURSES_H ./configure閰嶇疆銆
路 鏍规嵁鍓嶉潰鐨勮璁虹紪杈/usr/include/widec.h骞堕噸鏂configure銆
路 鍒犳帀config.h鏂囦欢涓殑#define HAVE_TERM琛屽苟閲嶆柊杩愯make銆
濡傛灉閾炬帴瀹㈡埛绔▼搴忔椂杩炴帴鍣ㄦ壘涓嶅埌-lz锛岄棶棰樺彲鑳芥槸libz.so鏂囦欢瀹夎鍒颁簡/usr/local/lib銆傚彲浠ョ敤涓嬮潰浠讳綍涓绉嶆柟娉曡В鍐宠闂锛
路 鍚LD_LIBRARY_PATH澧炲姞/usr/local/lib銆
路 澧炲姞鍒libz.so from /lib鐨勮繛鎺ャ
路 濡傛灉浣跨敤Solaris 8,鍙互瀹夎Solaris 8 CD鍒嗗彂鐗堜腑鐨勫彲閫夐」zlib銆
路 鏋勫缓MySQL鏃剁敤--with-named-z-libs=no閫夐」杩愯configure銆
鍦x86 Solaris 8涓, 濡傛灉浣跨敤strip鍒犻櫎璋冭瘯绗﹀彿锛mysqld杞偍鍐呮牳銆
濡傛灉姝e湪 Solaris x86涓婁娇鐢gcc鎴egcs锛屽苟涓斾綘纰板埌浜嗗湪瑁呰浇鏃剁殑鍐呮牳杞偍闂锛屽簲璇ヤ娇鐢ㄤ笅鍒configure鍛戒护锛
CC=gcc CFLAGS="-O3 -fomit-frame-pointer -DHAVE_CURSES_H" \
CXX=gcc \
CXXFLAGS="-O3 -fomit-frame-pointer -felide-constructors \
-fno-exceptions -fno-rtti -DHAVE_CURSES_H" \
./configure --prefix=/usr/local/mysql
鐢libstdc++搴撳拰涓C++寮傚父澶勭悊鏉ラ伩鍏嶈繖涓棶棰樸
濡傛灉杩欐病鏈夊府鍔╋紝浣犲簲璇ョ紪璇戜竴涓皟璇曠増鏈苟涓旂敤涓涓釜杩规枃浠惰繍琛屽畠鎴栧湪gdb涓嬭繍琛屽畠銆傝鍙傝E.1.3鑺傦紝鈥滃湪gdb鐜涓嬭皟璇昺ysqld鈥銆
瀵逛簬杩愯MySQL锛屾帹鑽愪娇鐢FreeBSD 4.x鎴栨洿鏂扮増鏈紝鍥犱负鍏剁嚎绋嬪寘鏇村姞瀹屾暣銆傝鎯抽亣鍒颁竴涓畨鍏ㄣ佺ǔ瀹氱殑绯荤粺锛屼綘搴斿綋鍙娇鐢ㄦ爣璁-RELEASE鐨FreeBSD鍐呮牳銆
鏈瀹规槗鍥犳鏄瘮杈冨彈鍠滄鐨勫畨瑁呮柟娉曟槸浣跨敤mysql-server鍜mysql-client绉绘锛屽彲浠http://www.freebsd.org寰楀埌銆
浣跨敤杩欎簺绉绘鐨勭泭澶勫寘鎷細
路 鐢pkg_info -L瀵熺湅鍝釜鏂囦欢琚畨瑁呯殑鑳藉姏
路 濡傛灉浣犲湪閭e彴鏈哄櫒涓婁笉鍐嶆兂瑕MySQL锛岀敤pkg_delete瀹屽叏鍒犻櫎瀹冧滑銆
寤鸿鍦FreeBSD 2.x鐗堜笂浣跨敤 MIT-pthreads锛屽湪鐗堟湰3鍜屼互涓婄増鏈敤鍘熺敓绾跨▼銆傚湪涓浜2.2.x鐨勪互鍚庣増鏈娇鐢ㄥ師鐢熺嚎绋嬭繍琛屾槸鍙兘鐨勶紝浣嗘槸浣犲彲鑳界鍒mysqld鍏虫帀鐨勯棶棰樸
閬楁喚鐨勬槸锛FreeBSD璋冪敤鐨勬煇浜涘嚱鏁拌繕涓嶈兘瀹屽叏淇濊瘉绾跨▼瀹夊叏銆傜壒鍒护浜烘敞鎰忕殑鏄紝鍖呮嫭gethostbyname()鍑芥暟锛 MySQL浣跨敤璇ュ嚱鏁板皢涓绘満鍚嶈浆鎹负IP鍦板潃銆傚湪鏌愪簺鐜涓紝mysqld杩涚▼浼氱獊鐒堕犳垚100%鐨CPU璐熻嵎锛屼笉鍐嶅搷搴斻傚鏋滀綘閬囧埌璇ラ棶棰橈紝灏濊瘯浣跨敤--skip-name-resolve閫夐」鍚姩MySQL銆
鍙﹀锛岃繕鍙互灏FreeBSD 4.x涓殑MySQL鍚LinuxThreads搴撹繛鎺ワ紝杩欐牱鍙互閬垮厤涓浜涘師鐢FreeBSD绾跨▼鎵ц鏃剁殑闂銆備负浜嗘洿濂藉湴灏LinuxThreads鍚屽師鐢熺嚎绋嬭繘琛屽姣旓紝鍙傝Jeremy Zawodny鐨勬枃绔FreeBSD or Linux for your MySQL Server? 鍦板潃锛http://jeremy.zawodny.com/blog/archives/000697.html 銆
鍦FreeBSD浣跨敤LinuxThreads鐨勫凡鐭ラ棶棰樻湁锛
路 杩炴帴鏃堕棿(wait_timeout銆interactive_timeout鍜net_read_timeout)鍊间笉鐞嗘兂銆傜幇璞℃槸姘镐箙杩炴帴鎸傝捣杈冮暱鏃堕棿锛屼笉鑳藉叧闂紝鍙湁绾跨▼鎵ц鏂板懡浠ゆ椂 'kill'绾跨▼鏂规湁鏁堛
杩欏彲鑳芥槸绾跨▼搴撲腑鐨勪俊鍙峰鐞嗛棶棰橈紝淇″彿涓嶈兘涓柇鎸傝捣鐨勮鍛戒护銆傛湡鏈涘湪FreeBSD 5.0涓慨澶嶃
MySQL鏋勫缓杩涚▼闇瑕GNU make(gmake)宸ヤ綔銆傚鏋滄病鏈GNU make锛屽繀椤诲湪缂栬瘧MySQL鍓嶅厛瀹夎瀹冦
寤鸿鐨勫湪FreeBSD涓敤gcc(2.95.2鍜屼互涓婄増鏈)缂栬瘧鍜屽畨瑁MySQL鐨勬柟娉曟槸锛
CC=gcc CFLAGS="-O2 -fno-strength-reduce" \
CXX=gcc CXXFLAGS="-O2 -fno-rtti -fno-exceptions \
-felide-constructors -fno-strength-reduce" \
./configure --prefix=/usr/local/mysql --enable-assembler
gmake
gmake install
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
bin/mysqld_safe &
濡傛灉configure浣跨敤MIT-pthreads锛屽簲褰撻槄璇MIT-pthreads娉ㄦ剰浜嬮」銆傝鍙傝2.8.5鑺傦紝鈥淢IT-pthreads娉ㄦ剰浜嬮」鈥銆
濡傛灉浣犱粠make install閬囧埌涓涓畠涓嶈兘鎵惧埌鈥/usr/include/pthreads鈥鐨勯敊璇紝configure娌℃湁妫娴嬪嚭浣犻渶瑕MIT-pthreads銆傝淇璇ラ棶棰橈紝绉昏蛋config.cache锛岀劧鍚庣敤--with-mit-threads閫夐」閲嶆柊杩愯configure銆
纭畾璁╀綘鐨勫悕瀛楄В鏋愮▼搴忓畨瑁呮纭紝鍚﹀垯褰撹繛鎺mysqld鏃讹紝浣犲彲鑳戒細閬囧埌瑙f瀽寤舵椂鎴栧け璐ャ備繚璇佸湪鈥/etc/hosts鈥鏂囦欢涓殑localhost鍏ュ彛鏄纭殑銆鈥/etc/hosts鈥鏂囦欢搴旇浠ヤ笅闈竴琛屽紑濮嬶細
127.0.0.1 localhost localhost.your.domain
宸茬煡FreeBSD鐨勬枃浠跺彞鏌勯檺鍒堕粯璁ゅ煎緢浣庛傝鍙傝A.2.17鑺傦紝鈥滄枃浠舵湭鎵惧埌鈥銆備娇鐢--open-files-limit閫夐」鎵цmysqld_safe鍚姩鏈嶅姟鍣紝鎴栧湪/etc/login.conf涓mysqld鐢ㄦ埛鎻愰珮闄愬埗骞剁敤cap_mkdb /etc/login.conf閲嶅缓瀹冦傚鏋滀綘涓嶄娇鐢ㄩ粯璁ゅ悕(鍗充娇鐢chpass mysqld-user-name)锛岃繕瑕佷繚璇佷负璇ョ敤鎴疯缃湪瀵嗙爜鏂囦欢涓殑鐩稿簲绾у埆銆傝鍙傝5.1.3鑺傦紝鈥渕ysqld_safe锛歁ySQL鏈嶅姟鍣ㄥ惎鍔ㄨ剼鏈銆
FreeBSD灏嗚繘绋嬬┖闂撮檺鍒跺埌512MB锛屽嵆浣跨郴缁熸湁寰堝鐨勫彲鐢RAM涔熷姝ゃ傚洜姝や綘鍙兘浼氶亣鍒板涓嬫墍绀洪敊璇細
Out of memory (Needed 16391 bytes)
鍦ㄥ綋鍓嶇増鏈殑FreeBSD(鑷冲皯4.x鍜屾洿楂樼増鏈)涓紝浣犲彲浠ュ湪/boot/loader.conf鏂囦欢涓鍔犱笅闈㈢殑鏉$洰骞堕噸鍚満鍣ㄥ鍔犺闄愬埗(涓嶈兘鍦ㄨ繍琛屾椂闂寸敤sysctl鍛戒护鏇存敼杩欎簺璁惧畾鍊)锛
kern.maxdsiz="1073741824" # 1GB
kern.dfldsiz="1073741824" # 1GB
kern.maxssiz="134217728" # 128MB
鍦ㄦ棫鐗堟湰鐨FreeBSD涓紝蹇呴』閲嶆柊缂栬瘧鍐呮牳锛屼互渚挎洿鏀硅繘绋嬬殑鏈澶ф暟鎹绌洪棿銆傚湪杩欑鎯呭喌涓嬶紝搴斿綋鏌ョ湅LINT閰嶇疆鏂囦欢涓殑MAXDSIZ閫夐」鏌ョ湅鏇磋缁嗙殑淇℃伅銆
濡傛灉MySQL鐨勫綋鍓嶆棩鏈熸湁闂锛岃缃TZ鍙橀噺灏嗕細鏈夊府鍔┿傝鍙傝闄勫綍F锛鐜鍙橀噺銆
濡傛灉鍦ㄧ紪璇MySQL鏃讹紝閬囧埌涓嬪垪閿欒, 璇存槑铏氭嫙鍐呭瓨鐨ulimit鍊煎お浣庝簡锛
item_func.h: In method
`Item_func_ge::Item_func_ge(const Item_func_ge &)':
item_func.h:28: virtual memory exhausted
make[2]: *** [item_func.o] Error 1
璇曡瘯浣跨敤ulimit -v 80000骞跺啀娆¤繍琛make銆傚鏋滆繖杩樹笉琛屽苟涓斾綘姝e湪浣跨敤bash锛岃瘯璇曟崲鍒csh鎴sh锛涗竴浜BSDI鐢ㄦ埛鎶ュ憡浜嗕娇鐢bash鍜ulimit鏈夐棶棰樸
濡傛灉浣犳鍦ㄤ娇鐢gcc锛屽彲鑳藉繀椤讳负configure浣跨敤--with-low-memory鏍囧織鎵嶈兘缂璇戔sql_yacc.cc鈥銆
濡傛灉MySQL鐨勫綋鍓嶆棩鏈熸湁闂锛岃缃TZ鍙橀噺灏嗕細鏈夊府鍔┿傝鍙傝闄勫綍F锛鐜鍙橀噺銆
鍗囩骇鍒BSD/OS 3.1銆傚鏋滀笉鑳藉崌绾э紝鍒欏畨瑁BSDI patch M300-038銆
鍦ㄩ厤缃MySQL鏃讹紝浣跨敤涓嬪垪鍛戒护:
env CXX=shlicc++ CC=shlicc2 \
./configure \
--prefix=/usr/local/mysql \
--localstatedir=/var/mysql \
--without-perl \
--with-unix-socket-path=/var/mysql/mysql.sock
宸茬煡涓嬮潰鐨勯」鍙互宸ヤ綔锛
env CC=gcc CXX=gcc CXXFLAGS=-O3 \
./configure \
--prefix=/usr/local/mysql \
--with-unix-socket-path=/var/mysql/mysql.sock
濡傛灉浣犳効鎰忥紝鍙互鏀瑰彉鐩綍浣嶇疆锛屾垨涓嶆寚瀹氫换浣曚綅缃屼娇鐢ㄩ粯璁ょ洰褰曘
濡傛灉鍦ㄩ噸璐熻浇涓嬬殑鎬ц兘鏈夐棶棰橈紝璇曡瘯浣跨敤--skip-thread-priority閫夐」鎵цmysqld锛佽繖灏嗕互鐩稿悓浼樺厛绾ц繍琛屾墍鏈夌嚎绋嬶紱鍦BSDI 3.1涓婏紝鍙互寰楀埌杈冨ソ鐨勬ц兘(鑷冲皯鐩村埌BSDI鍙互淇鍏剁嚎绋嬭皟搴︾▼搴)銆
濡傛灉鍦ㄧ紪璇戞椂閬囧埌virtual memory exhausted閿欒锛岃瘯璇曚娇鐢ulimit -v 80000骞跺啀娆¤繍琛make銆傚鏋滆繖杩樹笉琛屽苟涓斾綘姝e湪浣跨敤bash锛岃瘯璇曟崲鍒csh鎴sh锛涗竴浜BSDI鐢ㄦ埛鎶ュ憡浜嗕娇鐢bash鍜ulimit浼氭湁闂銆
鍦ㄤ竴浜 BSDI 4.x绯荤粺涓紝浣犲彲鑳戒細閬囧埌鍏变韩搴撻棶棰樸傜幇璞℃槸涓嶈兘鎵ц浠讳綍瀹㈡埛绔▼搴忥紝渚嬪锛mysqladmin銆傚湪杩欑鎯呭喌涓嬶紝闇瑕侀噸鏂伴厤缃紝鐢disable-shared閫夐」绂佺敤搴撶殑鍏变韩浠ヤ究杩涜閰嶇疆銆
涓浜涘鎴峰湪BSDI 4.0.1涓亣鍒颁簡涓ラ噸闂锛屽嵆mysqld浜岃繘鍒惰繃涓浼氬効涓嶈兘鎵撳紑琛ㄣ傝繖鏄洜涓轰竴浜涘簱/绯荤粺鐩稿叧閿欒浣mysqld鏈緱鍒版寚浠や究鏇存敼浜嗗綋鍓嶇洰褰曘
淇鏂规硶鏄崌绾MySQL鍒版渶浣3.23.34鐗堟垨鏇撮珮鐗堬紝杩愯configure鍚庯紝杩愯make鍓嶅垹鎺config.h涓殑琛#define HAVE_REALPATH銆
璇锋敞鎰忚繖璇存槑浣犱笉鑳介氳繃绗﹀彿杩炴帴灏嗘暟鎹簱鐩綍杩炴帴鍒板彟涓涓暟鎹簱鐩綍锛屾垨閫氳繃绗﹀彿杩炴帴灏嗚〃杩炴帴鍒BSDI涓婄殑鍙︿竴涓暟鎹簱銆(鍙互閫氳繃绗﹀彿杩炴帴杩炴帴鍒板彟涓涓‖鐩)銆
鍦HP-UX涓婄紪璇MySQL鏃讹紝鏈変竴浜涒滃皬鈥濋棶棰樸傛垜浠帹鑽愭偍浣跨敤gcc鑰屼笉鏄HP-UX鑷繁鐨勭紪璇戝櫒锛屽洜涓gcc鍙互鐢熸垚鏇村ソ鐨勪唬鐮侊紒
鎴戜滑鎺ㄨ崘鍦HP-UX涓婁娇鐢gcc 2.95锛屼笉浣跨敤楂樺害浼樺寲鏍囧織(绫讳技-O6)锛屽洜涓鸿繖鍦HP-UX 涓婂彲鑳戒笉瀹夊叏銆
涓嬮潰鐨configure琛屽湪gcc 2.95涓簲褰撳伐浣滐細
CFLAGS="-I/opt/dce/include -fpic" \
CXXFLAGS="-I/opt/dce/include -felide-constructors -fno-exceptions \
-fno-rtti" \
CXX=gcc \
./configure --with-pthread \
--with-named-thread-libs='-ldce' \
--prefix=/usr/local/mysql --disable-shared
涓嬮潰鐨configure琛屽湪gcc 3.1涓簲褰撳伐浣滐細
CFLAGS="-DHPUX -I/opt/dce/include -O3 -fPIC" CXX=gcc \
CXXFLAGS="-DHPUX -I/opt/dce/include -felide-constructors \
-fno-exceptions -fno-rtti -O3 -fPIC" \
./configure --prefix=/usr/local/mysql \
--with-extra-charsets=complex --enable-thread-safe-client \
--enable-local-infile --with-pthread \
--with-named-thread-libs=-ldce --with-lib-ccflags=-fPIC
--disable-shared
PHKL_22840 Streams cumulative
PHNE_22397 ARPA cumulative
杩欐牱鍙互瑙e喅鍦ㄧ嚎绋嬪簲鐢ㄧ▼搴忎腑杩愯recv()鏃跺緱鍒EWOULDBLOCK鍜屾墽琛accept()鏃跺緱鍒EBADF鐨勯棶棰樸
濡傛灉浣犲湪鏈墦琛ヤ竵鐨HP-UX 11.x绯荤粺涓娇鐢gcc 2.95.1锛屽彲鑳戒細閬囧埌涓嬮潰鐨勯敊璇細
In file included from /usr/include/unistd.h:11,
from ../include/global.h:125,
from mysql_priv.h:15,
from item.cc:19:
/usr/include/sys/unistd.h:184: declaration of C function ...
/usr/include/sys/pthread.h:440: previous declaration ...
In file included from item.h:306,
from mysql_priv.h:158,
from item.cc:19:
闂鏄HP-UX娌℃湁涓鑷村湴瀹氫箟pthreads_atfork()銆傚畠鍚/usr/include/sys/unistd.h锛184鍜/usr/include/sys/pthreads.h锛440涓殑鍘熷瀷鍐茬獊銆
涓涓В鍐冲姙娉曟槸灏/usr/include/sys/unistd.h澶嶅埗鍒MySQL/include骞剁紪杈unistd.h锛屽瀹冭繘琛屾洿鏀逛互鍖归厤pthreads.h涓殑瀹氫箟銆傛煡鎵句笅鍒楄锛
extern int pthreads_atfork(void (*prepare)()锛void (*parent)(),
void (*child)())锛
灏嗗畠鏇存敼涓猴細
extern int pthreads_atfork(void (*prepare)(void)锛void (*parent)(void),
void (*child)(void))锛
鏇存敼瀹屽悗锛屼笅闈㈢殑configure琛屽簲褰撳伐浣滐細
CFLAGS="-fomit-frame-pointer -O3 -fpic" CXX=gcc \
CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti -O3" \
./configure --prefix=/usr/local/mysql --disable-shared
濡傛灉浣犱娇鐢HP-UX 缂栬瘧鍣紝鍙互浣跨敤涓嬮潰鐨勫懡浠(宸茬粡鐢cc B.11.11.04杩涜浜嗘祴璇)锛
CC=cc CXX=aCC CFLAGS=+DD64 CXXFLAGS=+DD64 ./configure \
--with-extra-character-set=complex
浣犲彲浠ュ拷鐣ヤ笅闈㈢被鍨嬬殑浠讳綍閿欒锛
aCC: warning 901: unknown option: `-3': use +help for online
documentation
濡傛灉杩愯configure鏃堕亣鍒颁笅闈㈢殑閿欒锛岃楠岃瘉鍦ㄥ埌HP-UX C鍜C++缂栬瘧鍣ㄧ殑璺緞鍓嶆槸鍚︽湁鍒K&R缂栬瘧鍣ㄧ殑璺緞锛
checking for cc option to accept ANSI C... no
configure: error: MySQL requires an ANSI C compiler (and a C++ compiler).
Try gcc. See the Installation chapter in the Reference Manual.
涓嶈兘缂栬瘧鐨勫彟涓涓師鍥犲彲鑳芥槸浣犳病鏈夋寜鐓у墠闈㈡墍杩板畾涔+DD64鏍囪銆
瀵逛簬HP-UX 11锛屽彟涓涓姙娉曟槸浣跨敤http://dev.mysql.com/downloads/鎻愪緵鐨MySQL浜岃繘鍒讹紝杩欐槸鎴戜滑宸茬粡鏋勫缓骞舵祴璇曡繃鐨勩傛垜浠篃鏀跺埌浜MySQL鐨HP-UX 10.20浜岃繘鍒跺彲浠ュ湪HP-UX 11涓婃垚鍔熻繍琛岀殑鎶ュ憡銆傚鏋滀綘閬囧埌闂锛屼竴瀹氳妫鏌HP-UX琛ヤ竵鐨勭増鏈
Autoconf涓病鏈変簡xlC鑷姩妫娴嬶紝鍥犳杩愯configure鍓锛岄渶瑕佽缃澶氬彉閲忋備互涓嬩緥瀛愪娇鐢IBM缂栬瘧鍣細
export CC="xlc_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192 "
export CXX="xlC_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192"
export CFLAGS="-I /usr/local/include"
export LDFLAGS="-L /usr/local/lib"
export CPPFLAGS=$CFLAGS
export CXXFLAGS=$CFLAGS
./configure --prefix=/usr/local \
--localstatedir=/var/mysql \
--sbindir='/usr/local/bin' \
--libexecdir='/usr/local/bin' \
--enable-thread-safe-client \
--enable-large-files
鍙互浠http://www-frec.bull.com/鎵惧埌涓婅堪缂栬瘧MySQL鍒嗗彂鐗堢殑閫夐」銆
濡傛灉浣犲皢鍓嶉潰鐨configure琛屼腑鐨-O3鏀逛负-O2锛屽繀椤诲垹鎺-qstrict閫夐」銆傝繖鏄IBM C缂栬瘧鍣ㄧ殑闄愬埗銆
濡傛灉浣犳鍦ㄤ娇鐢gcc鎴egcs缂栬瘧MySQL锛蹇呴』浣跨敤-fno-exceptions鏍囧織锛屽洜涓gcc/egcs鐨勫紓甯稿鐞嗕笉鏄绾跨▼瀹夊叏鐨勶紒锛堝凡缁忕敤egcs1.1娴嬭瘯杩囷級銆IBM姹囩紪绋嬪簭涔熸湁涓浜涘凡鐭ラ棶棰橈紝褰撲娇鐢gcc鏃跺彲浠ョ敓鎴愬潖鐨勪唬鐮併
鍦 AIX 涓婁娇鐢egcs鍜gcc 2.95锛屾垜浠帹鑽愪笅鍒configure琛岋細
CC="gcc -pipe -mcpu=power -Wa,-many" \
CXX="gcc -pipe -mcpu=power -Wa,-many" \
CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql --with-low-memory
涓轰簡鎴愬姛缂栬瘧锛岄渶瑕佷娇鐢-Wa,-many閫夐」銆IBM鐭ラ亾璇ラ棶棰橈紝浣嗘槸鐢变簬宸ヤ綔鍖虹殑鍘熷洜锛屼笉鎬ヤ簬淇瀹冦傛垜浠笉鐭ラ亾gcc 2.95鏄惁闇瑕-fno-exceptions閫夐」,浣嗘槸鍥犱负MySQL涓嶄娇鐢ㄤ緥澶栵紝骞朵笖璇ラ夐」鍙互浜х敓蹇熺殑浠g爜锛屾垜浠缓璁娇鐢egcs/gcc鏃朵娇鐢ㄨ閫夐」銆
濡傛灉姹囩紪鐮佹湁闂锛岃瘯璇曟洿鏀-mcpu=xxx閫夐」浠ュ尮閰嶄綘鐨CPU銆備竴鑸儏鍐靛彲鑳介渶瑕佷娇鐢power2銆power鎴powerpc銆傚彟澶栵紝浣犲彲鑳介渶瑕佷娇鐢604鎴604e銆傛垜浠笉鑳界粷瀵硅偗瀹氫絾鎬鐤power涓鑸簲瀹夊叏锛屽嵆浣垮湪power2鏈哄櫒涓婁篃瀹夊叏銆
濡傛灉浣犱笉鐭ラ亾浣犵殑CPU鏄粈涔堟牱鐨勶紝鍙互鎵цuname -m鍛戒护銆傚彲浠ヤ骇鐢熺被浼000514676700鐨勫瓧绗︿覆锛屾牸寮忎负xxyyyyyymmss锛屽叾涓xx鍜ss鎬绘槸00,yyyyyy鏄敮涓鐨勭郴缁ID锛mm鏄CPU Planar鐨ID銆備粠http://www16.boulder.ibm.com/pseries/en_US/cmds/aixcmds5/uname.htm鍙互鎵惧埌杩欎簺鍊肩殑鍥捐〃銆
璇ュ浘琛ㄥ彲浠ョ粰鍑轰綘鍙互浣跨敤鐨勬満鍣ㄧ被鍨嬪拰鏈哄櫒鍨嬪彿锛岀‘瀹CPU鐨勭被鍨嬨
濡傛灉閬囧埌淇″彿闂(MySQL鍦ㄩ珮璐熻浇涓嬪嚭浜烘剰鏂欏湴姝绘帀)锛屼綘鍙兘宸茬粡鍙戠幇浜嗕笌绾跨▼鍜屼俊鍙锋湁鍏崇殑涓涓OS 缂洪櫡銆傚湪杩欑鎯呭喌涓嬶紝浣犲彲浠ョ敤濡備笅閰嶇疆鍛婅瘔MySQL涓嶄娇鐢ㄤ俊鍙凤細
CFLAGS=-DDONT_USE_THR_ALARM CXX=gcc \
CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti \
-DDONT_USE_THR_ALARM" \
./configure --prefix=/usr/local/mysql --with-debug \
--with-low-memory
杩欎笉褰卞搷MySQL鐨勬ц兘锛屼絾鏄湁鍓綔鐢紝灏辨槸涓嶈兘鐢mysqladmin kill鎴mysqladmin shutdown鏉姝诲湪涓涓繛鎺ヤ笂鈥滅潯鐪犫濈殑瀹㈡埛绔傜浉鍙嶏紝褰撳鎴风鍙戝嚭涓嬩竴涓懡浠ゆ椂锛屽畠灏嗘鎺夈
鍦AIX鐨勪竴浜涚増鏈笂鐢libbind.a閾炬帴浣垮緱getservbyname锛堬級鍐呮牳杞偍锛岃繖鏄AIX鐨勪竴涓己闄峰苟涓斿簲璇ユ姤鍛IBM銆
瀵逛簬AIX 4.2.1鍜gcc锛岃繘琛屼笅闈㈢殑鏇存敼銆
閰嶇疆瀹屽悗锛岀紪杈config.h鍜include/my_config.h锛屽皢涓嬮潰鐨勮锛
#define HAVE_SNPRINTF 1
鏇存敼涓猴細
#undef HAVE_SNPRINTF
鏈鍚庨渶瑕佸湪mysqld.cc涓负initgroups ()娣诲姞锛
#ifdef _AIX41
extern "C" int initgroups(const char *,int);
#endif
濡傛灉浣犻渶瑕佷负mysqld杩涚▼鍒嗛厤澶ч噺鍐呭瓨锛屽彧浣跨敤ulimit -d unlimited鏄笉澶熺殑銆傝繕鍙互闇瑕佷慨鏀mysqld_safe锛屽鍔犱笅闈㈢殑琛岋細
export LDR_CNTRL='MAXDATA=0x80000000'
鍏充簬浣跨敤澶ч噺鍐呭瓨鐨勪俊鎭鏌ラ槄http://publib16.boulder.ibm.com/pseries/en_US/aixprggd/genprogc/lrg_prg_support.htm 銆
鍦SunOS 4涓婏紝闇瑕佺敤MIT-pthreads缂栬瘧MySQL锛屽弽杩囨潵杩欐剰鍛崇潃闇瑕佷娇鐢GNU make銆
涓浜SunOS 4绯荤粺鐨勫姩鎬佸簱鍜libtool鏈夐棶棰樸傚彲浠ヤ娇鐢ㄤ笅鍒configure琛屾潵閬垮厤杩欎釜闂锛
./configure --disable-shared --with-mysqld-ldflags=-all-static
褰撶紪璇readline鏃讹紝鍙兘浼氶亣鍒板叧浜庨噸澶嶅畾涔夌殑璀﹀憡锛屽彲浠ュ拷鐣ャ
褰撶紪璇mysqld鐨勬椂鍊欙紝灏嗕細閬囧埌implicit declaration of function璀﹀憡锛屽彲浠ュ拷鐣ャ
濡傛灉浣犲湪Digital Unix涓婁娇鐢egcs 1.1.2锛屽簲褰撳崌绾у埌gcc 2.95.2,鍥犱负egcs鍦DEC涓婃湁涓浜涗弗閲嶇己闄凤紒
褰撳湪Digital UNIX涓嬬紪璇戠嚎绋嬬▼搴忔椂锛屾枃妗f帹鑽愬浜cc鍜cxx浣跨敤-pthread閫夐」鍜-lmach -lexc搴擄紙闄や簡-lpthread澶)銆備綘搴旇璞′笅闈㈣繖鏍疯繍琛configure锛
CC="cc -pthread" CXX="cxx -pthread -O" \
./configure --with-named-thread-libs="-lpthread -lmach -lexc -lc"
褰撶紪璇mysqld鏃讹紝浼氱湅瑙佷笅闈㈢殑璀﹀憡锛
mysqld.cc: In function void handle_connections()':
mysqld.cc:626: passing long unsigned int *' as argument 3 of
accept(int,sockadddr *, int *)'
浣犲彲浠ユ斁蹇冨湴蹇界暐杩欎簺璀﹀憡锛屽畠浠殑鍙戠敓鏄洜涓configure鍙兘妫娴嬪嚭閿欒锛岃屼笉鏄鍛娿
濡傛灉鐩存帴浠庡懡浠よ鍚姩鏈嶅姟鍣紝褰撻鍑烘椂锛屽彲鑳芥湁姝绘帀鐨勯棶棰樸傦紙褰撲綘閫鍑烘椂锛岄噸瑕佽繘绋嬫敹鍒颁竴涓SIGHUP淇″彿)锛屽鏋滃姝わ紝璇曠潃璞¤繖鏍峰惎鍔ㄦ湇鍔″櫒锛
nohup mysqld [options] &
nohup浣垮緱鍚庨潰鐨勫懡浠ゅ拷瑙嗕粠缁堢鍙戞潵鐨勪换浣SIGHUP淇″彿浜嗐傚彟澶栵紝閫氳繃杩愯safe_mysqld鍚姩鏈嶅姟鍣紝鍙互璁nohup璋冪敤mysqld銆傝鍙傝5.1.3鑺傦紝鈥渕ysqld_safe锛歁ySQL鏈嶅姟鍣ㄥ惎鍔ㄨ剼鏈銆
濡傛灉缂栬瘧mysys/get_opt.c鏃堕亣鍒伴棶棰橈紝鍙渶瑕佷粠鍚姩鏂囦欢鍒犳帀#define _NO_PROTO琛屻
濡傛灉浣跨敤Compaq鐨CC缂栬瘧鍣紝涓嬮潰鐨configure琛搴斿綋宸ヤ綔锛
CC="cc -pthread"
CFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed all -arch host"
CXX="cxx -pthread"
CXXFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed all \
-arch host -noexceptions -nortti"
export CC CFLAGS CXX CXXFLAGS
./configure \
--prefix=/usr/local/mysql \
--with-low-memory \
--enable-large-files \
--enable-shared=yes \
--with-named-thread-libs="-lpthread -lmach -lexc -lc"
gnumake
濡傛灉鐢ㄥ叡浜簱缂栬瘧鏃libtool鍑虹幇闂锛屽簲褰撹兘澶熷湪閾炬帴mysql鏃堕氳繃涓嬭堪鍛戒护瑙e喅璇ラ棶棰橈細
cd mysql
/bin/sh ../libtool --mode=link cxx -pthread -O3 -DDBUG_OFF \
-O4 -ansi_alias -ansi_args -fast -inline speed \
-speculate all \ -arch host -DUNDEF_HAVE_GETHOSTBYNAME_R \
-o mysql mysql.o readline.o sql_string.o completion_hash.o \
../readline/libreadline.a -lcurses \
../libmysql/.libs/libmysqlclient.so -lm
cd ..
gnumake
gnumake install
scripts/mysql_install_db
濡傛灉閬囧埌缂栬瘧闂骞跺畨瑁呬簡DEC CC鍜gcc锛屽皾璇曡繖鏍疯繍琛configure锛
CC=cc CFLAGS=-O CXX=gcc CXXFLAGS=-O3 \
./configure --prefix=/usr/local/mysql
濡傛灉閬囧埌鈥c_asm.h鈥鏂囦欢鐨勯棶棰橈紝鍙互鍒涘缓骞朵娇鐢ㄤ竴涓滃搼(dummy)鈥鈥c_asm.h鈥鏂囦欢锛
touch include/c_asm.h
CC=gcc CFLAGS=-I./include \
CXX=gcc CXXFLAGS=-O3 \
./configure --prefix=/usr/local/mysql
璇锋敞鎰忎粠http://ftp.support.compaq.com/public/unix/涓嬭浇鏈鏂扮殑DEC(Compaq)琛ヤ竵鍙互淇ld绋嬪簭鐨勪笅闈㈤棶棰樸
鍦OSF1 V4.0D鍜岀紪璇戝櫒"DEC C V5.6-071 on Digital UNIX V4.0 (Rev. 878)" 涓婏紝缂栬瘧鍣ㄦ湁浜嗕竴浜涘鎬殑琛屼负(鏈畾涔asm鏍囧織)銆/bin/ld濂借薄涔熻鐮村潖(褰撻摼鎺mysqld鏃讹紝鍙戠敓_exit undefined闂)銆傚湪杩欎釜绯荤粺涓婏紝浠OSF 4.0C鐨勭増鏈浛鎹簡/bin/ld鍚庯紝鎴戜滑璁炬硶鐢ㄤ笅鍒configure鍛戒护琛岀紪璇MySQL锛
CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql
鐢Digital缂栬瘧鍣ㄢC++ V6.1-029鈥濓紝涓嬪垪鍛戒护搴旇宸ヤ綔锛
CC=cc -pthread
CFLAGS=-O4 -ansi_alias -ansi_args -fast -inline speed \
-speculate all -arch host
CXX=cxx -pthread
CXXFLAGS=-O4 -ansi_alias -ansi_args -fast -inline speed \
-speculate all -arch host -noexceptions -nortti
export CC CFLAGS CXX CXXFLAGS
./configure --prefix=/usr/mysql/mysql \
--with-mysqld-ldflags=-all-static --disable-shared \
--with-named-thread-libs="-lmach -lexc -lc"
鍦OSF1鐨勬煇浜涚増鏈腑锛alloca()鍑芥暟琚牬鍧忥紝閫氳繃鍒犻櫎瀹氫箟'HAVE_ALLOCA'鐨勨config.h鈥鐨勮鏇存瀹冦
alloca()鍑芥暟涔熷彲鑳藉湪/usr/include/alloca.h閲岄潰鏈変竴涓笉姝g‘鐨勫師鍨嬶紝婧愪簬姝ょ殑璀﹀憡鍙互蹇界暐銆
configure灏嗚嚜鍔ㄥ湴浣跨敤涓嬪垪绾跨▼搴擄細 --with-named-thread-libs="-lpthread -lmach -lexc -lc"銆
褰撲娇鐢gcc鏃讹紝涔熷彲浠ヨ瘯璇曡繖鏍疯繍琛configure锛
CFLAGS=-D_PTHREAD_USE_D4 CXX=gcc CXXFLAGS=-O3 ./configure ....
濡傛灉浣犵殑淇″彿鏈夐棶棰(MySQL鍑轰汉鎰忔枡鍦板湪楂樿礋杞戒笅姝绘帀)锛屽彲鑳介亣鍒颁簡涓涓嚎绋嬪拰淇″彿鏈夊叧鐨OS 缂洪櫡銆傚湪杩欑鎯呭喌涓嬶紝浣犲彲浠ュ憡璇MySQL鎸濡備笅閰嶇疆涓嶄娇鐢ㄤ俊鍙凤細
CFLAGS=-DDONT_USE_THR_ALARM \
CXXFLAGS=-DDONT_USE_THR_ALARM \
./configure
杩欎笉褰卞搷MySQL鎬ц兘锛屼絾鏄湁鍓綔鐢紝灏辨槸涓嶈兘鐢mysqladmin kill鎴mysqladmin shutdown鏉姝诲湪涓涓繛鎺ヤ笂鈥滅潯鐪犫濈殑瀹㈡埛绔傜浉鍙嶏紝褰撳鎴风鍙戝嚭涓嬩竴涓懡浠ゆ椂锛屽畠灏嗘鎺夈
浣跨敤gcc 2.95.2,浼氶亣鍒颁笅闈㈢殑缂栬瘧閿欒锛
sql_acl.cc:1456: Internal compiler error in `scan_region',
at except.c:2566
Please submit a full bug report.
瑕佷慨澶嶈闂锛屽簲褰撹繘鍏sql鐩綍骞跺壀鍒囥佸鍒舵渶鍚涓琛gcc锛屼絾搴斿皢-O3 鏀逛负-O0 (鎴栧鏋滅紪璇戣娌℃湁浠讳綍-O閫夐」锛屽簲鍦gcc鍚庨潰澧炲姞-O0)銆備箣鍚庯紝鍙互鍥炲埌椤剁骇鐩綍骞堕噸鏂拌繍琛make銆
濡傛灉浣跨敤Irix 6.5.3鎴栨洿鏂扮増锛屽鏋滅敤鎷ユ湁CAP_SCHED_MGT鏉冮檺鐨勭敤鎴(渚嬪root)杩愯mysqld鎴栫敤涓嬮潰鐨shell鍛戒护缁mysqld鏈嶅姟鍣ㄨ鏉冮檺锛mysqld鑳藉鍒涘缓绾跨▼锛
chcap "CAP_SCHED_MGT+epi" /opt/mysql/libexec/mysqld
鍙兘闇瑕佸湪杩愯configure鍚庝笖鍦ㄧ紪璇戝墠瀹氫箟鈥config.h鈥閲岄潰鐨勪竴浜涚鍙枫
鍦ㄤ竴浜Irix瀹炵幇涓紝alloca()鍑芥暟琚牬鍧忋傚鏋mysqld鏈嶅姟鍣ㄦ浜庝竴浜SELECT璇彞锛屾妸鈥config.h鈥瀹氫箟HAVE_ALLOC鍜HAVE_ALLOCA_H鐨勮鍒犻櫎鍗冲彲銆傚鏋mysqladmin create涓嶅伐浣滐紝鎶鈥config.h鈥瀹氫箟HAVE_READDIR_R鐨勮鍒犻櫎锛屼綘涔熷彲鑳藉繀椤诲垹闄HAVE_TERM_H琛屻
SGI鎺ㄨ崘灏嗘湰椤典笂鐨勬墍鏈夎ˉ涓佷綔涓轰竴涓暣浣撴潵瀹夎锛
http://support.sgi.com/surfzone/patches/patchset/6.2_indigo.rps.html
鑷冲皯锛屽簲璇ュ畨瑁呮渶鏂扮殑鏍稿績鍗(rollup)銆佹渶鏂扮殑rld鍗峰拰鏈鏂扮殑libc鍗枫
寰堟槑纭紝瀵逛簬pthreads鏀寔锛岄渶瑕佹湰椤典笂鎵鏈夌殑POSIX琛ヤ竵锛
http://support.sgi.com/surfzone/patches/patchset/6.2_posix.rps.html
濡傛灉鍦ㄧ紪璇鈥mysql.cc鈥鏃讹紝閬囧埌绫讳技浜庝笅闈㈢殑閿欒:
"/usr/include/curses.h", line 82: error(1084):
invalid combinati鍦of type
閭d箞搴斿湪MySQL婧愮爜鏍戠殑椤剁骇鐩綍杈撳叆涓嬪垪鍛戒护锛
extra/replace bool curses_bool < /usr/include/curses.h > include/curses.h
make
搴旇涔熸湁瀹夋帓涓婄殑闂鎶ュ憡銆傚鏋滃彧鏈変竴涓嚎绋嬫鍦ㄨ繍琛岋紝浜嬫儏浼氬彉鎱㈢殑銆傞氳繃鍚姩鍙﹀涓涓鎴风鏉ラ伩鍏嶅畠锛岃繖鍙互瀵艰嚧姝ゅ悗鍏跺畠绾跨▼鐨勬墽琛岄熷害澧炲姞2鍒10鍊嶃傝繖鏄Irix绾跨▼闅句互鐞嗚В鐨勯棶棰橈紱鍙兘蹇呴』涓存椂鍑嗗鎵惧嚭瑙e喅鏂规鐩村埌瀹冭兘琚慨姝c
濡傛灉浣犳鍦ㄧ敤gcc缂栬瘧锛屽彲浠ヤ娇鐢ㄤ笅鍒configure鍛戒护锛
CC=gcc CXX=gcc CXXFLAGS=-O3 \
./configure --prefix=/usr/local/mysql --enable-thread-safe-client \
--with-named-thread-libs=-lpthread
鍦ㄧ敤鍘熺敓Irix C鍜C++缂栬瘧鍣7.3.1.2鐨Irix 6.5.11涓,涓嬮潰鐨勯」宸ヤ綔锛
CC=cc CXX=CC CFLAGS='-O3 -n32 -TARG:platform=IP22 -I/usr/local/include \
-L/usr/local/lib' CXXFLAGS='-O3 -n32 -TARG:platform=IP22 \
-I/usr/local/include -L/usr/local/lib' \
./configure --prefix=/usr/local/mysql --with-innodb --with-berkeley-db \
--with-libwrap=/usr/local \
--with-named-curses-libs=/usr/local/lib/libncurses.a
褰撳墠鐨勭Щ妞嶄粎鍦ㄢsco3.2v5.0.5鈥,鈥sco3.2v5.0.6鈥濆拰鈥sco3.2v5.0.7鈥濈郴缁熶笂杩涜浜嗘祴璇锛屽湪鈥sco 3.2v4.2鈥濅笂鐨勭Щ妞嶄篃鏈夊緢澶ц繘灞曘OpenServer 5.0.8(Legend)鍏锋湁鍘熺敓绾跨▼锛屽厑璁告枃浠跺ぇ浜2GB銆傜洰鍓嶆渶澶х殑鏂囦欢鍙互杈惧埌2GB銆
鎴戜滑鍙互鍦OpenServer涓婄敤gcc 2.95.3鐢ㄤ笅闈㈢殑configure鍛戒护缂栬瘧MySQL銆
CC=gcc CXX=gcc ./configure --prefix=/usr/local/mysql \
--enable-thread-safe-client --with-innodb \
--with-openssl --with-vio --with-extra-charsets=complex
浠ftp://ftp.sco.com/pub/openserver5/opensrc/gnutools-5.0.7Kj鍙互寰楀埌gcc銆
璇ュ紑鍙戠郴缁熼渶瑕佸湪OpenServer 5.0.6O鐨penServer Execution Environment Supplement oss646B鍜oss656B锛OpenSource搴撲綅浜 gwxlibs銆傛墍鏈OpenSource宸ュ叿浣嶄簬opensrc鐩綍銆傚彲浠ヤ粠ftp://ftp.sco.com/pub/openserver5/opensrc/鑾峰緱銆
鎴戜滑寤鸿浣跨敤鏈鏂扮殑MySQL浜у搧鍙戝竷銆
SCO鎻愪緵鐨勬搷浣滅郴缁熻ˉ涓侊細OpenServer 5.0.[0-6]锛ftp://ftp.sco.com/pub/openserver5锛OpenServer 5.0.7锛ftp://ftp.sco.com/pub/openserverv5/507銆
SCO鎻愪緵鐨勫叧浜庡畨鍏ㄤ慨澶嶇殑淇℃伅锛Server 5.0.x锛ftp://ftp.sco.com/pub/security/OpenServer銆
OpenSever 5.0.x绯荤粺涓婃渶澶х殑鏂囦欢鐨勫ぇ灏忎负2GB銆
鍦OpenServer 5.0.x涓婏紝鍙緵涓茬紦鍐插尯銆clist鍜岄攣瀹氳褰曞垎閰嶇殑鎬诲唴瀛樹笉鑳借秴鍑60MB銆
涓茬紦鍐插尯鐨勫垎閰嶅崟浣嶄负4096 瀛楄妭鐨勯〉锛clists涓70瀛楄妭锛岄攣瀹氳褰曚负64瀛楄妭锛屽洜姝や负锛
(NSTRPAGES * 4096) + (NCLIST * 70) + (MAX_FLCKREC * 64) <= 62914560
鎸夌収浠ヤ笅姝ラ鏉ラ厤缃Database Services閫夐」銆傚鏋滀綘涓嶇‘瀹氬簲鐢ㄧ▼搴忔槸鍚﹂渶瑕侊紝鍙傝闅忓簲鐢ㄧ▼搴忔彁渚涚殑鏂囨。銆
1. 鐢root鐧诲綍銆
2. 缂栬緫/etc/conf/sdevice.d/suds鏂囦欢鍚敤SUDS椹卞姩绋嬪簭銆傚皢绗2涓煙鍐呯殑N鏇存敼涓Y銆
3. 浣跨敤mkdev aio鎴Hardware/Kernel Manager鏉ュ惎鐢ㄥasynchronous I/O鐨勬敮鎸侊紝骞堕噸鏂拌繛鎺ュ唴鏍搞傝鎯宠鐢ㄦ埛閿佸畾鍐呭瓨鐢ㄤ簬璇ョ被I/O锛屾洿鏂aiomemlock(F)鏂囦欢銆傚簲褰撳璇ユ枃浠惰繘琛屾洿鏂帮紝鍖呮嫭杩涘彲浠ヤ娇鐢AIO鐨勭敤鎴峰拰鍙互閿佸畾鐨勬渶澶ф暟閲忕殑鍐呭瓨銆
4. 璁稿搴旂敤绋嬪簭浣跨敤setuid浜岃繘鍒讹紝鍥犳浣犲彧鑳芥寚瀹氬崟涓敤鎴 銆傝鍙傝闅忓簲鐢ㄧ▼搴忔彁渚涚殑鏂囨。鏉ョ湅鏄惁搴旂敤绋嬪簭鏄繖绉嶆儏鍐点
瀹屾垚璇ヨ繘绋嬪悗锛岄噸鏂板惎鍔ㄧ郴缁燂紝鍒涘缓鍖呮嫭杩欎簺鏇存敼鐨勬柊鍐呮牳銆
榛樿鎯呭喌锛/etc/conf/cf.d/mtune涓殑鏉$洰璁剧疆涓猴細
Value Default Min Max
----- ------- --- ---
NBUF 0 24 450000
NHBUF 0 32 524288
NMPBUF 0 12 512
MAX_INODE 0 100 64000
MAX_FILE 0 100 64000
CTBUFSIZE 128 0 256
MAX_PROC 0 50 16000
MAX_REGION 0 500 160000
NCLIST 170 120 16640
MAXUP 100 15 16000
NOFILES 110 60 11000
NHINODE 128 64 8192
NAUTOUP 10 0 60
NGROUPS 8 0 128
BDFLUSHR 30 1 300
MAX_FLCKREC 0 50 16000
PUTBUFSZ 8000 2000 20000
MAXSLICE 100 25 100
ULIMIT 4194303 2048 4194303
* Streams Parameters
NSTREAM 64 1 32768
NSTRPUSH 9 9 9
NMUXLINK 192 1 4096
STRMSGSZ 16384 4096 524288
STRCTLSZ 1024 1024 1024
STRMAXBLK 524288 4096 524288
NSTRPAGES 500 0 8000
STRSPLITFRAC 80 50 100
NLOG 3 3 3
NUMSP 64 1 256
NUMTIM 16 1 8192
NUMTRW 16 1 8192
* Semaphore Parameters
SEMMAP 10 10 8192
SEMMNI 10 10 8192
SEMMNS 60 60 8192
SEMMNU 30 10 8192
SEMMSL 25 25 150
SEMOPM 10 10 1024
SEMUME 10 10 25
SEMVMX 32767 32767 32767
SEMAEM 16384 16384 16384
* Shared Memory Parameters
SHMMAX 524288 131072 2147483647
SHMMIN 1 1 1
SHMMNI 100 100 2000
FILE 0 100 64000
NMOUNT 0 4 256
NPROC 0 50 16000
NREGION 0 500 160000
鎴戜滑寤鸿灏嗚繖浜涘艰缃负锛
NOFILES搴斿綋涓4096鎴2048銆
MAXUP搴斿綋涓2048銆
瑕佹兂鏇存敼鍐呮牳锛岃繘鍏/etc/conf/bin骞朵娇鐢./idtune name parameter鏉ユ洿鏀广備緥濡傦紝瑕佸皢SEMMS鏀逛负200锛岀敤root璐︽埛鎵ц鍛戒护锛
# cd /etc/conf/bin
# ./idtune SEMMNS 200
鎴戜滑寤鸿瀵硅绯荤粺杩涜璋冭妭锛屼絾鏄娇鐢ㄧ殑姝g‘鍙傛暟鍊煎彇鍐充簬璁块棶搴旂敤绋嬪簭鎴栨暟鎹簱鐨勭敤鎴锋暟鐩拰鏁版嵁搴撶┖闂(涔熷氨鏄娇鐢ㄧ殑缂撳啿姹)銆備笅闈㈢殑椤瑰奖鍝/etc/conf/cf.d/stune涓畾涔夌殑鍐呮牳鍙傛暟锛
SHMMAX(鎺ㄨ崘璁惧畾鍊硷細128MB)鍜SHMSEG(鎺ㄨ崘璁惧畾鍊硷細15)銆傝繖浜涘弬鏁板奖鍝嶅垱寤虹敤鎴风紦鍐叉睜鐨MySQL鏁版嵁搴撳紩鎿庛
NOFILES鍜MAXUP鑷冲皯搴旇揪鍒2048銆
MAXPROC鑷冲皯搴斿綋璁剧疆鍒3000/4000(鍙栧喅浜庣敤鎴锋暟)鎴栨洿澶у笺
寤鸿浣跨敤涓嬮潰鐨勫叕寮忔潵璁$畻SEMMSL銆SEMMNS鍜SEMMNU鐨勫硷細
SEMMSL = 13
鍙戠幇13鏈閫傚悎杩涚▼鍜MySQL銆
SEMMNS = SEMMSL * 绯荤粺涓婅繍琛岀殑db鏈嶅姟鍣ㄦ暟鐩
灏SEMMNS璁剧疆涓SEMMSL鍊间箻浠ヤ綘鍦ㄨ绯荤粺涓婁竴娆¤繍琛岀殑db鏈嶅姟鍣ㄧ殑(鏈澶)鏁扮洰銆
SEMMNU = SEMMNS
灏SEMMNU鍊艰缃负绛変簬SEMMNS鍊笺傚彲浠ュ皢璇ュ艰缃负75%鐨SEMMNS锛屼絾鏄繖鏄竴涓繚瀹堢殑浼拌銆
鑷冲皯闇瑕佸畨瑁"SCO OpenServer Linker and Application Development Libraries"鎴OpenServer寮鍙戠郴缁熸潵浣跨敤gcc銆備綘涓嶈兘鍙娇鐢GCC Dev绯荤粺锛岃屼笉瀹夎瀹冧滑銆
浣犲簲褰撹幏寰FSU PTHREADS瀹夎杞欢鍖呭苟鍏堝畨瑁呭畠銆傚彲浠ヤ粠http://moss.csc.ncsu.edu/~mueller/ftp/pub/PART/pthreads.tar.gz鑾峰緱銆備綘杩樺彲浠ヤ粠 ftp://ftp.zenez.com/pub/zenez/prgms/FSU-threads-3.14.tar.gz鑾峰緱棰勭紪璇戠殑瀹夎杞欢鍖呫
FSU Pthreads鑳界敤甯tcpip鐨SCO UNIX 4.2缂栬瘧锛屾垨浣跨敤OpenServer 3.0鎴Open Desktop 3.0(OS 3.0 ODT 3.0)锛屽畨瑁呭甫鏈変娇鐢ㄤ竴涓GCC 2.5.X鐨SCO寮鍙戠郴缁熴傚ODT鎴OS 3.0锛屽皢闇瑕佷竴涓GCC 2.5.x鐨勮壇濂界Щ妞嶃傛病鏈変竴涓壇濂界殑绉绘浼氭湁寰堝闂銆傚杩欎釜浜у搧鐨勭Щ妞嶉渶瑕SCO UNIX寮鍙戠郴缁燂紝娌℃湁瀹冿紝缂哄皯鎵闇鐨勫簱鍜岄摼鎺ュ櫒銆傝繕闇瑕SCO-3.2v4.2-includes.tar.gz銆傝鏂囦欢鍖呭惈SCO 寮鍙include 鏂囦欢鐨勬洿鏀硅繖鏄瀯寤MySQL鎵闇瑕佺殑銆傞渶瑕佺敤杩欎簺淇敼鐨勫ご鏂囦欢鏇挎崲宸叉湁绯荤粺鐨include鏂囦欢銆傚彲浠ヤ粠 ftp://ftp.zenez.com/pub/zenez/prgms/SCO-3.2v4.2-includes.tar.gz鑾峰緱銆
涓轰簡鍦ㄧ郴缁熶笂鏋勯FSU Pthreads锛岄渶瑕佸仛鐨勫伐浣滄槸杩愯GNU make銆傚惎鍔FSU-threads-3.14.tar.gz涓殑Makefile鐢熸垚FSU-绾跨▼銆
鍦鈥thread/src鈥鐩綍涓嬭繍琛./configure骞朵笖閫夋嫨SCO OpenServer閫夐」銆傝繖涓懡浠ゆ嫹璐鈥Makefile.SCO5鈥鍒鈥Makefile鈥銆傜劧鍚庤繍琛make銆
涓轰簡鍦ㄩ粯璁鐨勨/usr/include鈥鐩綍瀹夎锛屼綔涓root鐧诲綍锛岀劧鍚cd 鍒扳thread/src鈥鐩綍锛屽苟杩愯make install銆
璁板緱鍦ㄥ埗浣MySQL鏃惰浣跨敤GNU make銆
娉ㄩ噴锛濡傛灉浣犱笉鏄綔涓root鍚姩safe_mysqld锛屽皢鍙兘姣忚繘绋嬪彧鏈 榛樿鐨110涓墦寮鐨勬枃浠躲mysqld灏嗗湪鏃ュ織鏂囦欢鍐欎笅鍏充簬姝ょ殑娉ㄨВ銆
鐢SCO 3.2V4.2鏃,搴斿綋浣跨敤FSU PTHREADS 3.14鎴栨洿鏂扮増銆備互涓configure鍛戒护搴斿綋宸ヤ綔锛
CFLAGS="-D_XOPEN_XPG4" CXX=gcc CXXFLAGS="-D_XOPEN_XPG4" \
./configure \
--prefix=/usr/local/mysql \
--with-named-thread-libs="-lgthreads -lsocket -lgen -lgthreads" \
--with-named-curses-libs="-lcurses"
浣犲彲鑳介亣鍒include鏂囦欢鐨勬煇浜涢棶棰樸傚湪杩欑鎯呭喌涓嬶紝浣犺兘鍦ftp://www.mysql.com/pub/mysql/Downloads/SCO/SCO-3.2v4.2-includes.tar.gz鎵惧埌鏂扮殑SCO鐗瑰畾鐨include鏂囦欢銆備綘搴旇鍦MySQL婧愮爜鏍鐨勨include鈥鐩綍涓嬫墦寮杩欎釜鏂囦欢銆
SCO寮鍙戞敞鎰忎簨椤癸細
路 鍦FSU Pthreads涓紝涓嬪垪绯荤粺璋冪敤鏄pthreads鎰熺煡鐨勶細read()銆write()銆getmsg()銆connect()銆accept()銆select()鍜wait()銆
路 CSSA-2001-SCO.35.2(琛ヤ竵鍒椾负瀹氬埗erg711905-dscr_remap瀹夊叏琛ヤ竵(鐗堟湰 2.0.0))涓柇FSU绾跨▼骞朵娇mysqld涓嶇ǔ瀹氥傚鏋滀綘鎯冲湪 OpenServer 5.0.6鏈哄櫒涓婅繍琛mysqld蹇呴』鍒犻櫎瀹冦
路 濡傛灉浣犱娇鐢SCO OpenServer 5,鍙兘闇瑕佺敤-DDRAFT7 in CFLAGS閲嶆柊缂栬瘧FSU pthreads銆傚惁鍒欙紝mysqld鍚姩鏃InnoDB浼氭寕璧枫
路 SCO鍦ftp://ftp.sco.com/pub/openserver5鎻愪緵浜OpenServer 5.0.x鐨勬搷浣滅郴缁熻ˉ涓併
路 SCO鍦ftp://ftp.sco.com/pub/security/sse鍜ftp://ftp.sco.com/pub/security/sse鎻愪緵浜OpenServer 5.0.x鐨勫畨鍏ㄤ慨澶嶅拰libsocket.so.2銆
路 Pre-OSR506瀹夊叏淇銆傚湪ftp://stage.caldera.com/pub/security/openserver/鎴ftp://stage.caldera.com/pub/security/openserver/CSSA-2001-SCO.10/鎻愪緵浜libsocket.so.2鍜libresolv.so.1鐨telnetd淇锛屼互鍙婂湪pre-OSR506绯荤粺涓婄殑瀹夎璇存槑銆
鏈濂藉湪缂栬瘧/浣跨敤MySQL涔嬪墠瀹夎杩欎簺琛ヤ竵銆
Legend/ OpenServer 6.0.0鏈夊師鐢熺嚎绋嬶紝娌℃湁2GB鏂囦欢澶у皬闄愬埗銆
鎴戜滑鍙互鐢ㄤ笅闈㈢殑configure鍛戒护鍦UnixWare 7.1.x涓紪璇MySQL锛
CC="cc" CFLAGS="-I/usr/local/include" \
CXX="CC" CXXFLAGS="-I/usr/local/include" \
./configure --prefix=/usr/local/mysql \
--enable-thread-safe-client --with-berkeley-db=./bdb \
--with-innodb --with-openssl --with-extra-charsets=complex
濡傛灉浣犳兂瑕佷娇鐢gcc锛屽繀椤讳娇鐢gcc 2.95.3鎴栨洿鏂扮増銆
CC=gcc CXX=g++ ./configure --prefix=/usr/local/mysql
褰撴瀯寤MySQL鏃朵笉浣跨敤UnixWare 7.1.4鎴OpenServer 6.0.0涓殑Berkeley DB鐗堟湰銆MySQL浣跨敤鑷繁鐨Berkeley DB銆傜敤鏉ユ瀯寤洪潤鎬佸拰鍔ㄦ佸簱鐨configure鍛戒护鍦src_directory/bdb/build_unix/涓紝浣嗘槸瀹冧笉鍦MySQL鑷繁鐨BDB鐗堟湰涓傚伐浣滃尯濡備笅鎵绀恒
1. 鎸夊父瑙勯厤缃MySQL銆
2. 杩涘叆锛cd锛bdb/build_unix/
3. 灏 -p Makefile澶嶅埗(cp)鍒Makefile.sav
4. 浣跨敤鍚屾牱鐨勯夐」骞惰繍琛../dist/configure銆
5. 杩愯gmake銆
6. cp -p Makefile.sav Makefile
7. 杩涘叆椤剁骇婧愮洰褰曞苟杩愯gmake銆
鍏佽鐢熸垚鍏变韩鍜屽姩鎬佸簱骞跺伐浣溿
SCO鍦ftp://ftp.sco.com/pub/unixware7鎻愪緵浜UnixWare 7.1.1鐨勬搷浣滅郴缁熻ˉ涓,鍦ftp://ftp.sco.com/pub/unixware7/713/ 鎻愪緵浜UnixWare 7.1.3鐨勬搷浣滅郴缁熻ˉ涓, UnixWare 7.1.4鐨勮ftp://ftp.sco.com/pub/unixware7/714/, OpenUNIX 8.0.0鐨勮 ftp://ftp.sco.com/pub/openunix8 銆
SCO鎻愪緵鐨勫畨鍏ㄤ慨澶嶇浉鍏充俊鎭細OpenUNIX瑙ftp://ftp.sco.com/pub/security/OpenUNIX锛UnixWare瑙 ftp://ftp.sco.com/pub/security/UnixWare銆
榛樿鎯呭喌锛屽湪UnixWare 7.1.1绯荤粺涓渶澶ф枃浠剁殑澶у皬涓1GB锛屼絾鏄UnixWare 7.1.4涓枃浠跺ぇ灏忛檺鍒舵槸1 TB锛堢敤VXFS锛夈備竴浜OS瀹炵敤绋嬪簭 鐨勯檺鍒舵槸2GB銆傚湪UnixWare 7涓彲鑳界殑鏈澶ф枃浠跺ぇ灏忔槸1TB锛堢敤VXFS锛夈
鍦UnixWare 7.1.4涓紝浣犱笉闇瑕侀噰鍙栨帾鏂芥潵鑾峰緱澶ф枃浠舵敮鎸侊紝浣嗗湪UnixWare 7.1.x鐨勪互鍓嶇増鏈腑闇瑕佸惎鐢ㄥぇ鏂囦欢鏀寔锛屽彲浠ヨ繍琛fsadm銆
# fsadm -Fvxfs -o largefiles /
# fsadm / * Note
# ulimit unlimited
# cd /etc/conf/bin
# ./idtune SFSZLIM 0x7FFFFFFF ** Note
# ./idtune HFSZLIM 0x7FFFFFFF ** Note
# ./idbuild -B
* This should report "largefiles".
** 0x7FFFFFFF represents infinity for these values.
鐢shutdown閲嶅惎绯荤粺銆
榛樿鎯呭喌锛/etc/conf/cf.d/mtune涓殑鏉$洰璁剧疆涓猴細
Value Default Min Max
----- ------- --- ---
SVMMLIM 0x9000000 0x1000000 0x7FFFFFFF
HVMMLIM 0x9000000 0x1000000 0x7FFFFFFF
SSTKLIM 0x1000000 0x2000 0x7FFFFFFF
HSTKLIM 0x1000000 0x2000 0x7FFFFFFF
鎴戜滑寤鸿灏嗚繖浜涘艰缃负锛
SDATLIM 0x7FFFFFFF
HDATLIM 0x7FFFFFFF
SSTKLIM 0x7FFFFFFF
HSTKLIM 0x7FFFFFFF
SVMMLIM 0x7FFFFFFF
HVMMLIM 0x7FFFFFFF
SFNOLIM 2048
HFNOLIM 2048
鎴戜滑寤鸿瀵硅绯荤粺杩涜璋冭妭锛屼絾鏄娇鐢ㄧ殑姝g‘鍙傛暟鍊煎彇鍐充簬璁块棶搴旂敤绋嬪簭鎴栨暟鎹簱鐨勭敤鎴锋暟鐩拰鏁版嵁搴撶┖闂(涔熷氨鏄娇鐢ㄧ殑缂撳啿姹)銆備笅闈㈢殑椤瑰奖鍝/etc/conf/cf.d/stune涓畾涔夌殑鍐呮牳鍙傛暟锛
SHMMAX(鎺ㄨ崘璁惧畾鍊硷細128MB)鍜SHMSEG(鎺ㄨ崘璁惧畾鍊硷細15)銆傝繖浜涘弬鏁板奖鍝嶅垱寤虹敤鎴风紦鍐叉睜鐨MySQL鏁版嵁搴撳紩鎿庛
SFNOLIM鍜HFNOLIM鑷冲皯搴旇揪鍒2048銆
NPROC鑷冲皯搴斿綋璁剧疆鍒3000/4000(鍙栧喅浜庣敤鎴锋暟)銆
寤鸿浣跨敤涓嬮潰鐨勫叕寮忔潵璁$畻SEMMSL銆SEMMNS鍜SEMMNU鐨勫硷細
SEMMSL = 13
鎹彂鐜13鏈閫傚悎杩涚▼鍜MySQL銆
SEMMNS = SEMMSL * 绯荤粺涓婅繍琛岀殑db鏈嶅姟鍣ㄦ暟鐩
灏SEMMNS璁剧疆涓SEMMSL鍊间箻浠ヤ綘鍦ㄨ绯荤粺涓婁竴娆¤繍琛岀殑db鏈嶅姟鍣ㄧ殑(鏈澶)鏁扮洰銆
SEMMNU = SEMMNS
灏SEMMNU鍊艰缃负绛変簬SEMMNS鍊笺傚彲浠ュ皢璇ュ艰缃负75%鐨SEMMNS锛屼絾鏄繖鏄竴涓繚瀹堢殑浼拌銆
OpenServer6鐨勪富瑕佹敼杩涘寘鎷細
路 澶ф枃浠舵敮鎸侊紝鍙揪鍒1 TB銆
路 澶氬鐞嗗櫒鏀寔锛屼粠4涓鐞嗗櫒澧炲姞鍒32涓鐞嗗櫒銆
路 澧炲姞鐨勫唴瀛樻敮鎸侊紝鍙揪鍒64GB銆
路 灏UnixWare鐨勫姛鑳芥墿灞曞埌OpenServer6銆
路 鎬ц兘鐨勬敼杩
OpenServer6.0.0鍏锋湁锛
路 /bin锛岀敤浜庝笌OpenServer5.0.x鐩稿悓琛屼负鐨勫懡浠ゃ
路 /u95/bin鐢ㄤ簬鏍囧噯鐨勫懡浠わ紝渚嬪澶ф枃浠剁郴缁(LFS)鏀寔銆
路 /udk/bin鐢ㄤ簬UnixWare 7.1.4涓浉鍚岀殑鍛戒护锛岄粯璁ゆ槸LFS鏀寔銆
涓嬮潰鏄湪OpenServer6涓婅缃PATH鐨勬寚瀵笺傚鏋滅敤鎴锋兂浣跨敤浼犵粺鐨OpenServer5.0.x锛屽垯璺緞搴斿綋棣栧厛涓/bin銆傚鏋滅敤鎴烽渶瑕LFS鏀寔锛屽垯 璺緞搴斿綋涓/u95/bin锛/bin銆傚鏋滅敤鎴烽閫UnixWare 7鏀寔锛屽垯璺緞搴斾负/udk/bin锛/u95/bin锛/bin锛銆
鎴戜滑寤鸿浣跨敤鏈鏂扮殑MySQL浜у搧鍙戝竷銆
鎴戜滑鍙互鍦OpenServer 6.0.x鐢ㄤ笅闈㈢殑configure鍛戒护缂栬瘧MySQL锛
CC="cc" CFLAGS="-I/usr/local/include" \
CXX="CC" CXXFLAGS="-I/usr/local/include" \
./configure --prefix=/usr/local/mysql \
--enable-thread-safe-client --with-berkeley-db=./bdb \
--with-innodb --with-openssl --with-extra-charsets=complex \
--enable-readline
濡傛灉浣犳兂瑕佷娇鐢gcc锛屽繀椤讳娇鐢gcc2.95.3鎴栨洿鏂扮増銆
CC=gcc CXX=g++ ./configure --prefix=/usr/local/mysql
褰撴瀯寤MySQL鏃朵笉浣跨敤UnixWare 7.1.4鎴OpenServer 6.0.0涓殑Berkeley DB鐗堟湰銆MySQL浣跨敤鑷繁鐨Berkeley DB銆傜敤鏉ユ瀯寤洪潤鎬佸拰鍔ㄦ佸簱鐨configure鍛戒护鍦src_directory/bdb/build_unix/涓紝浣嗘槸瀹冧笉鍦MySQL鑷繁鐨BDB鐗堟湰涓傚伐浣滃尯濡備笅鎵绀恒
1. 鎸夊父瑙勯厤缃MySQL銆
2. 杩涘叆锛cd锛bdb/build_unix/
3. 灏 -p Makefile澶嶅埗(cp)鍒Makefile.sav
4. 浣跨敤鍚屾牱鐨勯夐」骞惰繍琛../dist/configure銆
5. 杩愯gmake銆
6. cp -p Makefile.sav Makefile
7. 杩涘叆椤剁骇婧愮洰褰曞苟杩愯gmake銆
鍏佽鐢熸垚鍏变韩鍜屽姩鎬佸簱骞跺伐浣溿OpenServer6.0.0 杩橀渶瑕MySQL婧愮爜鏍戠殑琛ヤ竵鍜岄傜敤浜bdb/dist/config.guess鐨config.guess鐨勮ˉ涓併備綘鍙互浠ftp://ftp.zenez.com/pub/zenez/prgms/mysql-4.1.12-osr6-patches.tar.gz鍜ftp://ftp.zenez.com/pub/zenez/prgms/mysql-4.x.x-osr6-patches涓嬭浇琛ヤ竵銆傛湁涓涓README鏂囦欢鍙互鎻愪緵甯姪銆
SCO鍦ftp://ftp.sco.com/pub/openserver6鎻愪緵浜OpenServer6鐨勬搷浣滅郴缁熻ˉ涓併
SCO鍦ftp://ftp.sco.com/pub/security/OpenServer鎻愪緵鍏充簬瀹夊叏淇鐨勪俊鎭
榛樿鎯呭喌锛屽湪OpenServer6.0.0绯荤粺鐨勬渶澶ф枃浠跺ぇ灏忎负1TB銆備竴浜涙搷浣滅郴缁熷伐鍏风殑闄愬埗鏄2GB銆傚湪UnixWare 7涓渶澶ф枃浠跺ぇ灏忓彲浠ユ槸1TB锛堢敤 VXFS鎴HTFS锛夈
榛樿鎯呭喌锛/etc/conf/cf.d/mtune涓殑鏉$洰璁剧疆涓猴細
Value Default Min Max
----- ------- --- ---
SVMMLIM 0x9000000 0x1000000 0x7FFFFFFF
HVMMLIM 0x9000000 0x1000000 0x7FFFFFFF
SSTKLIM 0x1000000 0x2000 0x7FFFFFFF
HSTKLIM 0x1000000 0x2000 0x7FFFFFFF
鎴戜滑寤鸿灏嗚繖浜涘艰缃负锛
SDATLIM 0x7FFFFFFF
HDATLIM 0x7FFFFFFF
SSTKLIM 0x7FFFFFFF
HSTKLIM 0x7FFFFFFF
SVMMLIM 0x7FFFFFFF
HVMMLIM 0x7FFFFFFF
SFNOLIM 2048
HFNOLIM 2048
鎴戜滑寤鸿瀵硅绯荤粺杩涜璋冭妭锛屼絾鏄娇鐢ㄧ殑姝g‘鍙傛暟鍊煎彇鍐充簬璁块棶搴旂敤绋嬪簭鎴栨暟鎹簱鐨勭敤鎴锋暟鐩拰鏁版嵁搴撶┖闂(涔熷氨鏄娇鐢ㄧ殑缂撳啿姹)銆備笅闈㈢殑椤瑰奖鍝/etc/conf/cf.d/stune涓畾涔夌殑鍐呮牳鍙傛暟锛
SHMMAX(鎺ㄨ崘璁惧畾鍊硷細128MB)鍜SHMSEG(鎺ㄨ崘璁惧畾鍊硷細15)銆傝繖浜涘弬鏁板奖鍝嶅垱寤虹敤鎴风紦鍐叉睜鐨MySQL鏁版嵁搴撳紩鎿庛
SFNOLIM鍜HFNOLIM鑷冲皯搴旇揪鍒2048銆
NPROC鑷冲皯搴斿綋璁剧疆鍒3000/4000(鍙栧喅浜庣敤鎴锋暟)銆
寤鸿浣跨敤涓嬮潰鐨勫叕寮忔潵璁$畻SEMMSL銆SEMMNS鍜SEMMNU鐨勫硷細
SEMMSL = 13
鍙戠幇13鏈閫傚悎杩涚▼鍜MySQL銆
SEMMNS = SEMMSL * 绯荤粺涓婅繍琛岀殑db鏈嶅姟鍣ㄦ暟鐩
灏SEMMNS璁剧疆涓SEMMSL鍊间箻浠ヤ綘鍦ㄨ绯荤粺涓婁竴娆¤繍琛岀殑db鏈嶅姟鍣ㄧ殑(鏈澶)鏁扮洰銆
SEMMNU = SEMMNS
灏SEMMNU鍊艰缃负绛変簬SEMMNS鍊笺傚彲浠ュ皢璇ュ艰缃负75%鐨SEMMNS锛屼絾鏄繖鏄竴涓繚瀹堢殑浼拌銆
SET EMXOPT=-c -n -h1024
濡傛灉涓嶈繖鏍峰仛锛屽皢鍙兘纰板埌涓嬪垪閿欒锛
File 'xxxx' not found (Errcode: 24)锝
褰OS/2 Warp 3涓婁娇鐢MySQL鏃讹紝瑕佹眰FixPack 29鎴栦互涓婄増鏈傜敤OS/2 Wrap 4锛岃姹FixPack 4鎴栦互涓婄増鏈傝繖鏄Pthreads搴撶殑涓涓姹傘MySQL蹇呴』瀹夎鍦ㄦ敮鎸侀暱鏂囦欢鍚嶇殑涓涓垎鍖轰笂锛屽HPFS銆FAT32绛夌瓑銆
鈥INSTALL.CMD鈥鑴氭湰蹇呴』浠OS/2鑷繁鐨鈥CMD.EXE鈥杩愯骞朵笖涓嶈兘宸ヤ綔鍦ㄦ浛浠e澹冲鈥4OS2.EXE鈥濄
鈥scripts/mysql-install-db鈥鑴氭湰宸茬粡琚噸鏂板懡鍚嶄簡锛氬畠绉颁负鈥install.cmd鈥骞朵笖鏄竴涓REXX鑴氭湰锛屽皢瀹夎 榛樿鐨MySQL瀹夊叏閰嶇疆骞朵负MySQL鍒涘缓WorkPlace Shell鍥炬爣銆
鍔ㄦ佹ā鍧楁敮鎸侀氳繃缂栬瘧浣嗘病鏈夊厖鍒嗘祴璇曪紝鍔ㄦ佹ā鍧楀簲璇ヤ娇鐢Pthreads杩愯鏃跺埢搴撶紪璇戙
gcc -Zdll -Zmt -Zcrtdll=pthrdrtl -I../include -I../regex -I.. \
-o example udf_example.cc -L../lib -lmysqlclient udf_example.def
mv example.dll example.udf
娉ㄩ噴锛鐢变簬OS/2鐨勯檺鍒讹紝UDF妯″潡鍚嶅瓧鐨勮瘝骞蹭笉鑳借秴杩8涓瓧绗︺傛ā鍧楀瓨鍌ㄥ湪鈥/mysql2/udf鈥鐩綍锛safe-mysqld.cmd鑴氭湰灏嗘妸杩欎釜鐩綍鏀惧湪BEGINLIBPATH鐜鍙橀噺涓傚綋浣跨敤UDF妯″潡鏃讹紝鎸囧畾鐨勬墿灞曞悕琚拷鐣--瀹冭鍋囧畾涓鈥.udf鈥銆備緥濡傦紝鍦 Unix涓婏紝鍏变韩妯″潡鍙兘琚懡鍚涓衡example.so鈥骞朵笖鍙互璞¤繖鏍蜂粠瀹冭杞藉嚱鏁帮細
mysql> CREATE FUNCTION metaphon RETURNS STRING SONAME 'example.so'锛
鍦OS/2涓, 妯″潡琚懡鍚嶄负example.udf锛屼絾鏄笉鑳芥寚瀹氭ā鍧楁墿灞曞悕锛
mysql> CREATE FUNCTION metaphon RETURNS STRING SONAME 'example'锛
Perl瀵MySQL鐨勬敮鎸佸熷姪DBI/DBD瀹㈡埛绔帴鍙c傛帴鍙h姹Perl 5.6.0鎴栦互鍚庣増鏈傚鏋滀綘鐨Perl鐗堟湰鏇存棫锛屾帴鍙灏嗕笉鑳藉伐浣銆
濡傛灉鎯宠鍦Perl DBI涓娇鐢ㄤ簨鍔★紝闇瑕佹湁1.2216鐗堟垨鏇存柊鐗DBD锛氾細mysql銆傚缓璁娇鐢2.9003鐗堟垨鏇存柊鐗堛
濡傛灉浣犱娇鐢MySQL 4.1瀹㈡埛绔簱锛屽繀椤讳娇鐢DBD锛氾細mysql 2.9003鎴栨洿鏂扮増銆
MySQL鍒嗗彂鐗堜笉鍖呭惈Perl鏀寔銆傚彲浠ヤ粠http://search.cpan.org鑾峰緱Unix闇瑕佺殑妯″潡锛屾垨鍦Windows涓娇鐢ActiveState ppm绋嬪簭銆備互涓嬬珷鑺傛弿杩颁簡濡備綍鍋氥
濡傛灉浣犳兂瑕佽繍琛MySQL鍩哄噯鑴氭湰锛屽繀椤诲畨瑁Perl鏀寔銆傝鍙傝7.1.4鑺傦紝鈥淢ySQL鍩哄噯濂椾欢鈥銆
MySQL Perl鏀寔涔熻姹備綘瀹夎浜MySQL瀹㈡埛绔紪绋嬫敮鎸(搴撳拰澶存枃浠)銆傚ぇ澶氭暟瀹夎涓畨瑁呬簡蹇呰鐨勬枃浠躲備絾鏄紝濡傛灉浣犲湪Linux涓粠RPM鏂囦欢瀹夎MySQL锛岀‘淇濆畨瑁呬簡寮鍙戣RPM銆傚鎴风绋嬪簭鍦ㄥ鎴风RPM涓紝浣嗘槸瀹㈡埛绔紪绋嬫敮鎸佸湪寮鍙戣RPM銆
濡傛灉浣犳兂瑕佸畨瑁Perl鏀寔锛岄渶瑕佺殑鏂囦欢鑳戒粠http://search.cpan.org鐨CPAN (Comprehensive Perl Archive Network)鑾峰緱銆
鍦Unix涓畨瑁Perl妯″潡鏈绠鍗曠殑鏂规硶鏄娇鐢CPAN妯″潡銆備緥濡傦細
shell> perl -MCPAN -e shell
cpan> install DBI
cpan> install DBD::mysql
DBD锛氾細mysql瀹夎杩愯璁稿娴嬭瘯銆傛祴璇曚腑浣跨敤榛樿鐢ㄦ埛鍚嶅拰瀵嗙爜灏濊瘯杩炴帴鏈湴MySQL鏈嶅姟鍣ㄣ(榛樿鐢ㄦ埛鍚嶆槸Unix涓殑鐧诲綍鍚嶅拰Windows涓殑ODBC銆傞粯璁ゅ瘑鐮佲滄病鏈瀵嗙爜銆鈥) 濡傛灉浣犱笉鑳介氳繃杩欎簺鍊艰繛鎺ユ湇鍔″櫒 (渚嬪锛屽鏋滀綘鐨勮处鎴锋湁瀵嗙爜)锛屾祴璇曞け璐ャ傚彲浠ヤ娇鐢force install DBD::mysql蹇界暐澶辫触鐨勬祴璇曘
DBI闇瑕Data::Dumper妯″潡銆傚簲璇ュ彲浠ュ畨瑁咃紱濡傛灉涓嶈兘锛屽簲褰撳湪瀹夎DBI鍓嶅畨瑁Data::Dumper妯″潡銆
杩樺彲浠ヤ笅杞tar鏂囦欢鍘嬬缉鏍煎紡鐨勬ā鍧楀垎鍙戠増锛屽苟鎵嬪姩鏋勫缓妯″潡銆備緥濡傦紝瑙e帇缂╁拰鏋勫缓DBI鍒嗗彂鐗堢殑杩囩▼涓猴細
1. 灏嗗垎鍙戠増瑙e帇缂╁埌褰撳墠鐩綍锛
2. shell> gunzip < DBI-VERSION.tar.gz | tar xvf -
璇ュ懡浠ゅ垱寤虹洰褰 DBI-VERSION銆
3. 杩涘叆瑙e帇缂╁垎鍙戠増鐨勯《绾х洰褰曪細
4. shell> cd DBI-VERSION
5. 鏋勫缓鍒嗗彂鐗堝苟缂栬瘧锛
6. shell> perl Makefile.PL
7. shell> make
8. shell> make test
9. shell> make install
make test鍛戒护寰堥噸瑕侊紝鍥犱负瀹冮獙璇佹ā鍧楁鍦ㄥ伐浣溿傛敞鎰忥細鍦ㄤ綘DBD::mysql瀹夎鏈熼棿杩愯璇ュ懡浠よ瘯楠屾帴鍙d唬鐮佹椂锛MySQL鏈嶅姟鍣ㄥ繀椤绘鍦ㄨ繍琛岋紝鍚﹀垯娴嬭瘯灏嗗け璐ャ
鏃犺浣曟椂浣犲畨瑁呬竴涓柊鐗堟湰鐨MySQL锛岄噸寤哄苟涓旈噸鏂板畨瑁DBD::mysql鍒嗗彂鐗堟槸涓涓ソ涓绘剰, 鐗瑰埆鏄湪鍗囩骇MySQL鍚庯紝瑙傚療鎵鏈夊紓甯革紝濡DBI鑴氭湰澶辫触銆
濡傛灉浣犳病鏈夋潈闄愬湪绯荤粺鐩綍涓嬪畨瑁Perl妯″潡锛屾垨濡傛灉浣犲畨瑁呮湰鍦Perl妯″潡锛屼笅鍒楀弬鑰冧功鍙互甯姪浣狅細http://servers.digitaldaze.com/extensions/perl/modules.html#modules
鍦ㄦ爣棰樷Installing New Modules that Require Locally Installed Modules鈥涓嬮潰鏌ユ壘銆
鍦Windows涓紝搴斿綋鎸夌収浠ヤ笅姝ラ瀹夎甯ActiveState Perl鐨MySQL DBD妯″潡锛
路 浠http://www.activestate.com/Products/ActivePerl/鑾峰緱ActiveState Perl骞跺畨瑁呫
路 鎵撳紑鎺у埗鍙扮獥鍙(鈥DOS绐楀彛)銆
路 濡傛灉闇瑕侊紝璁剧疆HTTP_proxy鍙橀噺銆備緥濡傦紝浣犲彲浠ヨ瘯璇曪細
路 set HTTP_proxy=my.proxy.com:3128
路 鍚姩PPM绋嬪簭锛
路 C锛\> C锛\perl\bin\ppm.pl
路 濡傛灉浣犺繕娌℃湁瀹夎DBI锛屽垯瀹夎锛
路 ppm> install DBI
路 濡傛灉鎴愬姛锛岃繍琛屼笅闈㈢殑鍛戒护锛
路 install\
路 ftp://ftp.de.uu.net/pub/CPAN/authors/id/JWIED/DBD-mysql-1.2212.x86.ppd
璇ヨ繘绋嬪簲褰撳湪ActiveState Perl 5.6鎴栨洿鏂扮増鏈腑宸ヤ綔銆
濡傛灉浣犱笉鑳戒娇涓婅堪姝ラ宸ヤ綔锛屽簲璇ュ畨瑁MyODBC椹卞姩绋嬪簭骞朵笖閫氳繃ODBC杩炴帴MySQL鏈嶅姟鍣細
use DBI;
$dbh= DBI->connect("DBI:ODBC:$dsn",$user,$password) ||
die "Got error $DBI::errstr when connecting to $dsn\n";
濡傛灉Perl鎶ュ憡瀹冧笉鑳藉彂鐜../mysql/mysql.so妯″潡锛屽彲鑳借瘯鍥犱负Perl涓嶈兘瀹氫綅鍏变韩搴libmysqlclient.so銆
鍙互浣跨敤涓嬮潰鐨勬柟娉曚慨澶嶈闂锛
路 鐢perl Makefile.PL -static -config鑰屼笉瑕佺敤perl Makefile.PL缂栬瘧DBD锛氾細mysql鍒嗗彂鐗堛
路 灏libmysqlclient.so澶嶅埗鍒板叾瀹冨叡浜簱鎵鍦ㄧ殑鐩綍 (鍙兘涓/usr/lib 鎴/lib)銆
路 淇敼鐢ㄦ潵缂栬瘧DBD锛氾細mysql鐨-L閫夐」锛屽弽搴libmysqlclient.so鐨勫疄闄呬綅缃
路 鍦Linux涓紝浣犲彲浠ュ皢libmysqlclient.so鐨勭洰褰曡矾寰勫悕澧炲姞鍒/etc/ld.so.conf鏂囦欢銆
路 灏libmysqlclient.so鐨勭洰褰曡矾寰勫悕澧炲姞鍒LD_RUN_PATH鐜鍙橀噺銆備竴浜涚郴缁熶娇鐢LD_LIBRARY_PATH銆
娉ㄦ剰濡傛灉杩炴帴鍣ㄦ病鏈夋壘鍒板彟涓涓簱锛屼綘杩樺彲鑳介渶瑕佷慨鏀-L閫夐」銆備緥濡傦紝濡傛灉鍥犱负libc鍦/lib涓嬪苟涓旇繛鎺ュ懡浠ゆ寚瀹氫簡-L/usr/lib锛岃繛鎺ュ櫒涓嶈兘鎵惧埌瀹冿紝灏-L閫夐」鏇存敼涓-L/lib鎴栧湪杩炴帴鍛戒护涓鍔-L/lib銆
濡傛灉浣犻亣鍒颁笅闈㈢殑DBD锛氾細mysql閿欒锛屼綘鍙兘浣跨敤浜gcc(鎴栦娇鐢ㄤ簡鐢gcc缂栬瘧鐨勬棫鐨勪簩杩涘埗)锛
/usr/bin/perl: can't resolve symbol '__moddi3'
/usr/bin/perl: can't resolve symbol '__divdi3'
褰撴瀯寤mysql.so搴撴槸鍦ㄨ繛鎺ュ懡浠や腑澧炲姞-L/usr/lib/gcc-lib/... -lgcc(褰撶紪璇Perl瀹㈡埛绔椂妫鏌ョ敓鎴mysql.so鐨make鐨勮緭鍑)銆-L閫夐」搴旀寚瀹libgcc.a鍦ㄧ郴缁熶腑鐨勫畨瑁呯洰褰曠殑璺緞鍚嶃
璇ラ棶棰樼殑鍙︿竴涓師鍥犳槸Perl鍜MySQL娌℃湁鐢gcc缂栬瘧銆傚湪杩欑鎯呭喌涓嬶紝浣犲彲浠ョ敤gcc缂栬瘧浜岃呮潵瑙e喅銆
褰撲綘杩愯娴嬭瘯鏃朵綘浼氫粠DBD锛氾細mysql鐪嬭涓嬮潰鐨勯敊璇細
t/00base............install_driver(mysql) failed:
Can't load '../blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql:
../blib/arch/auto/DBD/mysql/mysql.so: undefined symbol:
uncompress at /usr/lib/perl5/5.00503/i586-linux/DynaLoader.pm line 169.
杩欐剰鍛崇潃浣犻渶瑕佸湪杩炴帴琛屽寘鎷-lz 鍘嬬缉搴撱傚彲浠ラ氳繃鏇存敼鏂囦欢lib/DBD/mysql/Install.pm鐨勪笅鍒楄鏉ュ疄鐜帮細
$sysliblist .= " -lm";
鏇存敼涓猴細
$sysliblist .= " -lm -lz";
鐒跺悗锛屼綘蹇呴』杩愯make realclean 鐒跺悗閲嶆柊瀹夎銆
濡傛灉浣犳兂瑕佸湪SCO涓婂畨瑁DBI锛岄渶瑕佸湪DBI-xxx 鍜屾瘡涓瓙鐩綍涓紪杈Makefile銆傝娉ㄦ剰涓嬮潰鐨勬洿鏂板亣瀹氫娇鐢gcc 2.95.2鎴栨洿鏂扮増锛
鏃э細 鏂帮細
CC = cc CC = gcc
CCCDLFLAGS = -KPIC -W1,-Bexport CCCDLFLAGS = -fpic
CCDLFLAGS = -wl,-Bexport CCDLFLAGS =
LD = ld LD = gcc -G -fpic
LDDLFLAGS = -G -L/usr/local/lib LDDLFLAGS = -L/usr/local/lib
LDFLAGS = -belf -L/usr/local/lib LDFLAGS = -L/usr/local/lib
LD = ld LD = gcc -G -fpic
OPTIMISE = -Od OPTIMISE = -O1
鏃э細
CCCFLAGS = -belf -dy -w0 -U M_XENIX -DPERL_SCO5 -I/usr/local/include
鏂帮細
CCFLAGS = -U M_XENIX -DPERL_SCO5 -I/usr/local/include
杩欎簺鏇存敼鏄繀闇鐨勶紝鍥犱负鐢icc鎴cc缂栬瘧鐨Perl鍔ㄦ佽杞藉櫒涓嶈杞DBI妯″潡銆
濡傛灉浣犳兂瑕佸湪涓嶆敮鎸佸姩鎬侀摼鎺(渚嬪 SCO)鐨勭郴缁熶腑浣跨敤Perl妯″潡锛屽彲浠ョ敓鎴愪竴涓寘鎷DBI鍜DBD锛氾細mysql鐨勯潤鎬佺増鏈殑Perl銆傛柟娉曟槸鐢熸垚涓涓敤DBI浠g爜杩炴帴鐨Perl鐗堟湰锛屽苟灏嗗畠瀹夎鍒板綋鍓Perl鐨勯《绾х洰褰曘傜劧鍚庢瀯寤轰竴涓惈DBD浠g爜杩炴帴鐨Perl鐗堟湰骞跺畨瑁呫
鍦SCO涓紝蹇呴』灏嗕笅闈㈢殑鐜鍙橀噺璁剧疆涓猴細
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/progressive/lib
Or锛
LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/lib:/usr/ccs/lib:\
/usr/progressive/lib:/usr/skunk/lib
LIBPATH=/usr/lib:/lib:/usr/local/lib:/usr/ccs/lib:\
/usr/progressive/lib:/usr/skunk/lib
MANPATH=scohelp:/usr/man:/usr/local1/man:/usr/local/man:\
/usr/skunk/man:
棣栧厛锛屽湪DBD鍒嗗彂鐗堢殑瀹夎鐩綍杩愯涓嬭堪鍛戒护鏉ュ垱寤轰竴涓寘鎷潤鎬佽繛鎺ョ殑DBD妯″潡鐨Perl锛
shell> perl Makefile.PL -static -config
shell> make
shell> make install
shell> make perl
鐒跺悗蹇呴』瀹夎鏂扮殑Perl銆make perl鐨勮緭鍑鸿〃绀哄畨瑁呮椂闇瑕佹墽琛岀殑make鍛戒护銆傚湪SCO涓紝涓make -f Makefile.aperl inst_perl MAP_TARGET=perl銆
鐒跺悗锛屼娇鐢ㄥ垰鍒氬垱寤虹殑Perl锛屽湪DBD锛氾細mysql鍒嗗彂鐗堢殑瀹夎鐩綍杩愯涓嬭堪鍛戒护鏉ュ垱寤哄彟涓涓Perl锛屽簲鍖呮嫭闈欐佽繛鎺ョ殑DBD锛氾細mysql锛
shell> perl Makefile.PL -static -config
shell> make
shell> make install
shell> make perl
鏈鍚庯紝搴斿綋瀹夎鏂扮殑Perl銆make perl鐨杈撳嚭鎸囩ず浜嗕娇鐢ㄧ殑鍛戒护銆
杩欐槸MySQL鍙傝冩墜鍐岀殑缈昏瘧鐗堟湰锛屽叧浜嶮ySQL鍙傝冩墜鍐岋紝璇疯闂dev.mysql.com.銆傚師濮嬪弬鑰冩墜鍐屼负鑻辨枃鐗堬紝涓庤嫳鏂囩増鍙傝冩墜鍐岀浉姣旓紝鏈炕璇戠増鍙兘涓嶆槸鏈鏂扮殑銆