Mysql server

download Mysql server

of 22

  • date post

    26-Jun-2015
  • Category

    Documents

  • view

    330
  • download

    1

Embed Size (px)

Transcript of Mysql server

  • 1. Hng dn ci t MySQL Phin bn 0.7 - Ngy 24/12/2007HNG DN CI TMySQL SERVERNgy 24/12/2007Phin bn0.7Trng thi Cp nhtBn quyn cng ty iNet Solutions. Trang 1/22

2. Hng dn ci t MySQL Phin bn 0.7 - Ngy 24/12/2007 Phin bnNgy Phin bnGii thch Tc gi03/11/2007 0.5 To bn nhpDng Nguyn24/12/2007 0.7 Cp nhtTng LngBn quyn cng ty iNet Solutions. Trang 2/22 3. Hng dn ci t MySQLPhin bn 0.7 - Ngy 24/12/20071TNG QUAN Hu ht cc sn phm qun l, thng mi hin nay u thao tc trn CSDL, do vic lm quen vi CSDL l mt vn thit yu v ti quan trng. C rt nhiu h qun tr CSDL hin nay, nhng hu ht cc h qun tr CSDL ny u tun theo chun SQL92 do t chc ANSI ra v MySQL cng l mt trong cc h qun tr CSDL .2MC TIU Ti liu ny c vit vi mc ch gip cho ngi dng cui c th t ci t v cu hnh c h qun tr CSDL MySQL trn mi trng Windows v Linux. Mt khc cng cung cp cho ngi dng mt CSDL tt, n gin, gn nh, y tnh nng nhng min ph.3GII THIU MYSQL MySQL l mt h qun tr CSDL gn, nh nhng cng y tnh nng v c bit l min ph. Hin MySQL c hai bn MySQL Server Community - y l bn min ph, tuy nhin cung cp y tnh nng nh mt bn hon thin nhng khng c s h tr ca nh sn xut. MySQL Server Enterprise - y l bn c ph v c s h tr ca cng ty MySQL. Trong phin bn ny c km theo nhng tool v qun l MySQL thng qua web, o hiu sut ca h thng, ... MySQL hin cng h tr cho ngi dng nhng cng c cn thit cho vic qun l v pht trin v l mt trong cc h CSDL c ngi dng trn khp cng ng ngun m a chung trong vic chn la v pht trin ng dng. Vi cng c MySQL Administrator mang n cho ngi dng nhng thun li trong vic backup v restore d liu, cng nh ln k hoch, thay i thng s u vo v ti u ho cc thng s cn thit nhm gip cho h qun tr CSDL ny vn ng tt hn. Bn cnh , MySQL Query Browser cung cp cho ngi dng nhng tnh nng lin quan n vic qun tr v pht trin sn phm ca mnh. Khai thc nhng cng c ny, ngi dng s tit kim thi gian ng k cho vic pht trin cng nh qun tr h thng.Bn quyn cng ty iNet Solutions.Trang 3/22 4. Hng dn ci t MySQL Phin bn 0.7 - Ngy 24/12/20074CC BC CI T V CU HNH Trong phn ny trnh by cc bc ci t v cu hnh h qun tr CSDL MySQL trn mi trng Windows v Linux. Bn ti bn MySQL Server t trang web http://www.mysql.org, bn c th ti v bn cc cng c qun tr v pht trin MySQL Server t mc Tools trn trang ny.4.1Mi trng Windows Bc 1: Nhp i chut vo bn MySQL Server va ti v trang web http://www.mysql.org khi s xut hin mn hnh Welcome ca trnh ci t.Hnh 4.1.a Mn hnh Welcome ca trnh ci t. Nhn nt Next tip tc quy trnh ci t. Bc 2: La chn qu loi ci t. bc ny s xut hin hp thoi c ba la chn, chng ta tm hiu ln lt ngha ca cc la chn:Bn quyn cng ty iNet Solutions. Trang 4/22 5. Hng dn ci t MySQL Phin bn 0.7 - Ngy 24/12/2007 Typical: Vi la chn ny chng trnh s ci t nhng components cn thit cho vic ci t sau ny. Complete: Vi la chn ny trnh ci t s ci t y cc tnh nng v nhng phn m rng ca h qun tr CSDL. Custom: y l la chn cho php ngi dng c th t custom h thng ca mnh theo mnh. La chn Custom tip tc qu trnh ci t. Hnh 4.1.b Hp thoi la chn loi ci t. Nhn nt Next tip tc qu trnh ci t. Bc 3: La chn thnh phn ci t v ng dn. Trong bc ny ngi dng la chn cc thnh phn c ci t cho h qun tr CSDL ca mnh. Ngoi ra, ngi dng cng c th la chn ng dn (Change...), ni m chng trnh ci t s chp cc tp tin c lin quan n cc thnh phn ci t c la chn v cng l ni cha cc tp cu hnh m ngi dngBn quyn cng ty iNet Solutions. Trang 5/22 6. Hng dn ci t MySQLPhin bn 0.7 - Ngy 24/12/2007 c th custom nhm mang li hiu sut cao cho h thng ca mnh.Hnh 4.1.c Mn hnh la chn thnh phn ci t v ng dn kho cha Sau khi chn xong, Nhn nt Next tip tc qu trnh ci t Bc 4: Tng kt qu trnh ci t. Trong bc ny mn hnh s hin ra nhng la chn trong qu trnh ci t, nu trong khi xem xt hp thoi tng kt qu trnh ci t m cha hi lng vn g th mnh c th quay tr li cc qu trnh trc iu chnh cho hp l trc khi tip tc qu trnh ci t h qun tr CSDL MySQL. Khi nhn nt Install tin trnh ci t bt u din ra, trong lc ny chng trnh ci t s chp nhng thnh phn cn thit vo kho cha trong ng dn m bn ch nh. Sau khi tin trnh ny kt thc bn bm nt Next, mnh hnh gii thiu bn Enterprise s xut hin trong hai hp thoi tip theo. Trong phn gii thiu v bn Enterprise nh cung cp s cung cp cho cc bn nhng thng tin v mt s tnh nng mi trong bn Enterprise c ph ca nh cung cp. Bn nhn 2 ln nt Next tip tc qu trnh ci t.Bn quyn cng ty iNet Solutions. Trang 6/22 7. Hng dn ci t MySQLPhin bn 0.7 - Ngy 24/12/2007Hnh 4.1.d Mn hnh th hin tin trnh ci t Bc 5: Kt thc qu trnh ci t. Trong hi thoi kt thc ca qu trnh ci t c mt checkbox cho php bn la chn vic cu hnh hay khng? Nu bn chn cu hnh cho h qun tr CSDL MySQL th chn checkbox v nhn nt Finish tip tc. Nu khng chn vic cu hnh cho h qun tr CSDL MySQL th b chn checkbox v nhn nt Finish kt thc qu trnh ci t v khng cn lm theo qu trnh tip theo. Tuy nhin nu b chn vic cu hnh th bn phi cu hnh bng tay nn cng rt d lm cho mi vic i vo sai st nu bn khng phi l chuyn gia. Theo ti th bn nn chn vic cu hnh bng cch chn checkbox v nhn nt Finish v sau lm theo cc bc tip theo trong bn hng dn ny hon thnh vic cu hnh h thng qun tr CSDL MySQL. Bc 6: Sau khi chn Finish c chn vo checkbox th mn hnh Welcome ca mnh hnh cu hnh xut hin. n y nu bn khng mun cu hnh h thng th c th nhn nt cancel Bn quyn cng ty iNet Solutions.Trang 7/22 8. Hng dn ci t MySQLPhin bn 0.7 - Ngy 24/12/2007 kt thc qu trnh ci t. Hnh 4.1.e Mn hnh Welcome ca trnh cu hnh h qun tr CSDL MySQL Nhn nt Next tip tc qu trnh cu hnh h thng. Bc 7: La chn loi cu hnh. bc ny bn chn loi cu hnh h thng. Trong hp hi thoi s xut hin hai la chn, ta i vo ngha ca tng la chn nh sau: Detailed Configuration: i vi la chn ny, bn s thc hin vic ti u h thng qun tr CSDL MySQL. Bn phi cn thn khi chn la ch ny, tuy nhin bn c th c c mt bn ci t nh thch mnh bng cch la chn ng n cc thng s cu hnh. Standard Configuration: y l la chn cho vic to nn mt Server da trn cu hnh thng thng c thit lp sn trong trnh ci t. Vi cch ny bn khng can thip vo tin trnh iu chnh cc thng s cho qu trnh cu hnh, nhng bn cng c th t mnh cu hnh bng tay bng cch thit lp thng s trong tp cu hnh ngay khi qu trnh ktBn quyn cng ty iNet Solutions. Trang 8/22 9. Hng dn ci t MySQL Phin bn 0.7 - Ngy 24/12/2007 thc. Tuy nhin, qu trnh ny mt nhiu cng sc v gp nhiu kh khn. Theo nh kinh nghim th bn nn chn Detailed Configuration c th can thip nhng thng s cn thit c th a phng ho bn MySQL Server.Hnh 4.1.f La chn loi cu hnh. Chn nt Next tip tc vic cu hnh chng trnh. Bc 8: La chn loi cu hnh my. Trong mc ny c ba la chn: Developer Machine: Nu chn loi ny th h thng ci t s la ch phng n ti u cho vic cu hnh my pht trin. Trong trng hp ny h ci t s tit kim b nh ti a cho my pht trin. Server Machine: i vi la chn ny, ngi dng mun chia s my ny vi web server hay cc server khc. Trong trng hp ny h ci t s chn phng n trung bnh cho vic s dng b nh. Dedicated MySQL Server Machine: i vi trng hp ny ngi dng mun ci ring hBn quyn cng ty iNet Solutions.Trang 9/22 10. Hng dn ci t MySQL Phin bn 0.7 - Ngy 24/12/2007 qun tr CSDL MySQL trn mt my ring v khng ci nhng h server khc. Trong trng hp ny h ci t s tn dng ti a b nh my tnh. Tt hn c nn chn trng hp Server Machine khi cn c th shared server ny cho cc mc ch khc nhau. Hnh 4.1.g Mn hnh la chn loi Server cu hnh. Sau khi la chn loi Server cu hnh, nhn nt Next tip tc. Bc 9: La chn kiu h tr CSDLBn quyn cng ty iNet Solutions.Trang 10/22 11. Hng dn ci t MySQL Phin bn 0.7 - Ngy 24/12/2007 Hnh 4.1.h Mn hnh la chn kiu h tr CSDL. Thng thng bn nn chn kiu h tr InnoDB h tr transaction tt nht (nh hnh chp). Sau khi la chn xong bm nt Next tip tc. Bc 10: La chn khong khng gian cho Database. Trong bc ny ngi dng phi chn ni m d liu c tr n. Bnh thng chng trnh s chn ni ci t chng trnh MySQL, nhng hn qun tr cn cho php bn chn ni khc lu. Trong mc ny bn s c trnh ci t nhc n InnoDB. InnoDB l mt loi Engine Database c h tr trong h qun tr MySQL Server, y l loi Engine c h tr Transaction khi thc hin thi cc thao tc trn Database. y cng l mt iu cn lu , nu bn mun m bo tnh ton vn d liu th bn nn chn la loi CSDL c to bi InnoDB. Tuy nhin do c tnh ny nn cc database c to bi InnoDB Engine s c hiu sut khng cao bng cc Engine khc.Bn quyn cng ty iNet Solutions. Trang 11/22 12. Hng dn ci t MySQLPhin bn 0.7 - Ngy 24/12/2007Hnh 4.1.i Mn hnh cu hnh khong khng cho InnoDB Database. Sau khi la chn khong khng cho InnoDB xong, nhn nt Next tip tc quy trnh. Bc 11: Chn la s lng kt ni ti a n Database Engine trong cng mt thi im. Decision Support (DSS)/OLAP: Vi loi ny cn rt t kt ni n Database trong cng mt thi im. Do , trong trng hp ny trnh ci t s chn khong 20 kt ni n Database trong cng mt lc. Online Transaction Processing (OLTP): y l trng hp cn nhiu kt ni n CSDL cng mt lc. Do , trong trng hp ny trnh ci t s chn khong 500 kt ni n Database trong cng mt lc. y l con s kh cao nhng i vi cc ng dng Online con s ny tng i hp l. Manual Setting: Trong trng hp ny trnh ci t cho php ngi dng chn con s m mnh cm thy hp l nht. Khi chn trng hp ny bn phi tnh ton v thc s hiu c cch thc vn hnh ca chnh h thng m bn cn thit lp. Vic chn mt con s hp l l iu ti cn thit, th nht n m bo cho chnh Server ca bn c vn hnhBn quyn cng ty iNet Solutions. Trang 12/22 13. Hng dn ci t MySQLPhin bn 0.7 - Ngy 24/12/2007 mt cch trn tru, th hai n m bo cho h thng ca bn p ng c nhu cu ca ngi dng. Ty vo nhu cu s dng m bn cn chn mt la chn ph hp cu hnh cho h thng ca bn vn hnh mt cch hp l nht.Hnh 4.1.j Hnh chn s lng kt ni n Database trong cng mt thi im. Sau khi la chn xong bn nhn nt Next n tip bc tip theo ca qu trnh cu hnh h thng. Bc 12: Cu hnh thng s cng v ch ca my ch. Trong bc ny ngi cu hnh la chn cc thng s lin quan n Network, v cn lu i vi thng s cng lng nghe kt ni t pha trnh khch. Enable TCP/IP Networking: Bn phi chn thng s ny v cn thit. Vi thng s ny trnh ci t s cho bn thit lp cng trnh ch thit lp cu hnh lng nghe v chp nhn kt ni t pha trnh khch. Thng thng cng ca MySQL c m 3306, bn c th thayBn quyn cng ty iNet Solutions.Trang 13/22 14. Hng dn ci t MySQL Phin bn 0.7 - Ngy 24/12/2007 i gi tr ny, tuy nhin khi thay i bn phi nh v kt hp vi vic m tng la cho php ni b bn trong hay bn ngoi c th kt ni n cng ny. Enable Strict Mode: Ch ny c nh cung cp gi nn chn h thng qun tr CSDL MySQL c th c xem nh nh mt Database Manag