ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

7-3 ¸ê®Æ®wªº°ò¦Æ[©À(7-3-1 ¦p¦ó«Ø¥ß¸ê®Æ®w)

7-3 ¸ê®Æ®wªº°ò¦Æ[©À(7-3-1 ¦p¦ó«Ø¥ß¸ê®Æ®w)

7-3   ¸ê®Æ®wªº°ò¦Æ[©À
¸ê®Æ®w¤D¬O¤@¸s®æ¦¡¤Æ¸ê®ÆªºÀx¦s³õ©Ò¡A²³æªº¨Ì·Ó¼h¯Å¤º®e¨Ó·§¤À¡G¸ê®Æ®w¡]Database¡^->¸ê®Æªí¡]Table¡^->Äæ¦ì¡]Column¡^->Äæ¦ì¸ê®Æ¡A±z¤£§«±N¸ê®Æ®w·Q¹³¦¨¤@¶¡­Ü®w¡A«h¸ê®Æªí´N¬O­Ü®w¤¤ªº®w©Ð¡AÄæ¦ì«h¬O®w©Ð¤¤Àxª«¬[ªºÀxª«®æ¡A¨º¸ê®Æ©O¡H¸ê®Æ´Nµ¥¦P©ñ¸m©óÀxª«¬[ªºª««~¡C


7-3-1        ¦p¦ó«Ø¥ß¸ê®Æ®w
¦bMySQL Server¤¤«Ø¥ß¸ê®Æ®w¦³¬Û·í¦hªº¤èªk¡A¥i¥H¥Î©R¥O¦C«ü¥O¡BphpMyAdmin¹Ï«¬¤ÆºÞ²z¤¶­±¡BPHP¨ç¦¡µ¥¡Aµ§ªÌ¬O¤ñ¸û³ßÅw¥Î¹Ï§Î¤ÆªºphpMyAdmin¨Ó«Ø¥ß¸ê®Æ®w¡C

¨Ï¥Î©R¥O¦C«ü¥O«Ø¥ß¸ê®Æ®w
­n¨Ï¥Î«ü¥O¦bMySQL Server¤¤«Ø¥ß¸ê®Æ®w¡A²Ä¤@¨B´N¬O­n¸òMySQL Server«Ø¥ß³s½u¡A«Ø¥ß³s½uªº«ü¥O¦p¤U¡G
  1. mysql [-u username] [-h hostname] [-p[password]] dbname
½Æ»s¥N½X

  • -u¡GMySQL Server¨Ï¥ÎªÌ±b¸¹¡C
  • -h¡GMySQL Server¥D¾÷¦WºÙ¡C
  • -p¡G¨Ï¥ÎªÌ±b¸¹ªº±K½X(°Ñ¼Æ»P±K½X¤§¶¡¨S¦³ªÅ¥Õ)¡C
  • dbname¡G³s½u«á±ý¨Ï¥Îªº¸ê®Æ®w¡]¥i¬Ù²¤¡^¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

1.¶}±ÒDOS¼Ò¦¡µøµ¡¡G¶}±Ò->°õ¦æ->¿é¤J¡ucmd¡v->¡u½T©w¡v¡C

2.¦bDOS¼Ò¦¡µøµ¡¤¤¿é¤JMySQL Server³s½u«ü¥O¡AµM«á«ö¤U¡uEnter¡vÁä¡G
  1. mysql -u root -h localhost -p12345a
½Æ»s¥N½X
3.·íDOS¼Ò¦¡µøµ¡¤¤¥X²{¡u>mysql¡vªº´£¥Ü²Å¸¹®É¡A´Nªí¥Ü¤w¸g»PMySQL Server«Ø¥ß³s½u¡A¦p¤U¹Ï©Ò¥Ü¡G

¹Ï7-10 »PMySQL Server«Ø¥ß³s½u¡C

4.¸Ë¦nMySQL¤§«á¡A¹w³]·|¦³¤G­Ó¸ê®Æ®w¦s¦b¡A¤À§O¬Omysql¤Îtest¡A­n«Ø¥ß·s¸ê®Æ®w¤§«e¥²¶·¥ý½T»{¨S¦³¦P¦Wªº¸ê®Æ®w¦s¦b¡A©Ò¥H§Ú­Ì¥i¥H¥Îshow«ü¥O¨Ó¦CªíMySQL Server¥Ø«e¦³´X­Ó±±ºÞªº¸ê®Æ®w¡G

¹Ï7-11 ¦Cªí¸ê®Æ®w¡C
  1. show databases;
½Æ»s¥N½X
¦b©R¥Oµ²§À°È¥²¥[¤W¤@­Ó¡u¡F¡v¤À¸¹¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

5.°²³]¦Cªí¤¤ªº¸ê®Æ®w¦³§A·Q¾Þ§@ªº¹ï¶H¡A«h¥i§Q¥Îuse«ü¥O¨Ó¤Á´«¾Þ§@ªº¸ê®Æ®w¹ï¶H¡A¨Ò¦p¤Á´«¾Þ§@¹ï¶H¬°¡umysql¡v¸ê®Æ®w¡A¨º´N¥i¥H¤U¹F¡yuse mysql¡z«ü¥O¡G

¹Ï7-12  ¤Á´«¾Þ§@ªº¸ê®Æ®w¹ï¶H¡C

6.­n«Ø¥ß·sªº¸ê®Æ®w¥i¥H¨Ï¥Î¡ucreate database¡v«ü¥O¡G
  1. create database ¸ê®Æ®w¦WºÙ ;
½Æ»s¥N½X
¨Ï¥Î¡ucreate database¡v«ü¥O«Ø¥ß¤@­Ó·s¸ê®Æ®w«á¡A¨Ã¤£¥Nªí§Ú­Ì¥¿¦b¾Þ§@ªº¸ê®Æ®w¹ï¶H´N¬O³o­Ó·s«Øªº¸ê®Æ®w¡C

¹Ï7-13  «Ø¥ß·sªº¸ê®Æ®w¡C

¨Ò¦p¡A«Ø¥ß¤@­Ó¦W¬°¡uorderbase¡v·s¸ê®Æ®w¡G¡]¹Ï7-13¡^
  1. create database orderbase;
½Æ»s¥N½X
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

7.¥Ñ©ó§Ú­Ìªº¸ê®Æ®w±N¦s©ñªº¸ê®Æ¬°¤¤¤åÁcÅé¡A¦]¦¹¡A¥i§Q¥Î¡uALTER DATABASE¡v«ü¥OÅܧó¸ê®Æ®wªº°ò¦µ²ºc¡A¨Ò¦p¦r²Åªº¹ï·Ó¡]®Õ¹ï¡^¡AÁקK§Ú­Ì±N¤¤¤å¸ê®Æ¦s¤J¸ê®Æ®w«áÅܦ¨¶Ã½X¡A³oÂI«Ü­«­n¡A¬G¡A½Ð§Q¥Î¤U¦C«ü¥OÅܧó¸ê®Æ®wªº¦r²Å¹ï·Ó¡G
  1. ALTER DATABASE ¡¥¸ê®Æ®w¦W¡¦ DEFAULT
  2. CHARACTER SET big5 COLLATE big5_chinese_ci;
½Æ»s¥N½X
«Ø¥ß¸ê®Æ®w»P¸ê®Æ®w¦r²Åªº¹ï·Ó¡]®Õ¹ï¡^¥i¦P®É¶i¦æ¡A¥H¥»¨Ò¨Ó»¡¡A¨BÆJ6»P7ªº±Ô­z§Y¥i¦X¨Ö¦p¤U¡G
  1. CREATE DATABASE `orderbase` DEFAULT CHARACTER SET big5 COLLATE big5_chinese_ci;
½Æ»s¥N½X

¹Ï7-14   Åܧó¸ê®Æ®wªº¦r²Å¹ï·Ó¡C

¦Ü¦¹¡A§Ú­Ì´N§¹¦¨¨Ï¥Î«ü¥O¤è¦¡«Ø¥ß¸ê®Æ®wªº¨BÆJ¤F¡A³Ì«á¡A¦b¡u>mysql¡vªº´£¥Ü²Å¸¹«á¿é¤J¡yexit;¡zµ²§ô»PMySQL Serverªº³s½u¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

¨Ï¥ÎphpMyAdmin«Ø¥ß¸ê®Æ®w
¨Ï¥ÎphpMyAdmin¨Ó«Ø¥ßMySQL¸ê®Æ®w´N§ó²«K¤F¡A¦]¬°§¹¥þ¤£¥Î·Ð´o«ü¥Oªº¨Ï¥Î¡A³æ¯Âªº¿é¤J¸ê®Æ§Y¥i¡G

1.¥´¶}ÂsÄý¾¹ª½±µ¦bºô§}¦C¿é¤JphpMyAdminºÞ²z­º­¶¡uhttp://localhost/phpmyadmin/index.php¡v¡A¦b­º­¶¤¤ÂI¿ï¡u¸ê®Æ®w¡v¶W³sµ²¶µ¥Ø¡G

¹Ï7-15  

2.¦b¸ê®Æ®wºÞ²zµe­±³Ì¤U¤èªº¡u«Ø¥ß·s¸ê®Æ®w¡vÄæ¦ì¤¤¿é¤J·s¼W¸ê®Æ®wªº¦WºÙ¡A¥»¨Ò¬°¡uadminbase¡v¡C

3.¦b¡u«Ø¥ß·s¸ê®Æ®w¡vÄæ¦ì¥k¤èªº¡u®Õ¹ï¡v¤U©Ô¿ï³æÄæ¦ì¤¤¿ï¨ú¡ubig5_chinese_ci¡v¡A¥Nªí¦¹·s¼Wªº¸ê®Æ®w±N¨Ï¥Î¡uÁcÅ餤¤å¡A¤j¤p¼g¤£¬Û²Å¡v¦r²Åªº¹ï·Ó¡]®Õ¹ï¡^¡AµM«á«ö¤U¡u½T©w¡v«ö¶s¡G

¹Ï7-16 ¿é¤J·s¼W¸ê®Æ®w¦WºÙ»P¦r²Å¿ï¾Ü¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

4.«ö¤U¹Ï7-16¤¤ªº¡u½T©w¡v«ö¶s«á¡AphpMyAdmin§Y¶}©l¬°§Ú­Ì©óMySQL Server¤¤³Ð«Ø£¸­Ó¦r²Åªí¬°¡ubig5_chinese_ci¡vªº·s¸ê®Æ®w¡uadminbase¡v¡G

¹Ï7-17  ·s¼W¸ê®Æ®w§¹¦¨¡C


´£¥Ü¡I¡I
¦bphpMyAdminºÞ²z­º­¶¤¤¦³£¸­Ó¡u¦r²Åªí¡vªº¶W³sµ²¶µ¥Ø¡AÂI¿ï¸Ó¶µ¥Ø§Y¥iÀò±o¦r¤¸¶°»P®Õ¹ïªº¬ÛÃö¸ê®Æ¡A¨£¹Ï7-18¡C

¹Ï7-18  ¦r¤¸¶°»P®Õ¹ï¸ê®Æ¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

        ÀR«ä¦Û¦b : ¤£©È¨Æ¦h¡A¥u©È¦h¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD