¸ñÂ÷ 0. mSQL Guide Á¤º¸ 1. mSQL °£·« ¼Ò°³ 2. mSQLÀÇ Æ¯Â¡ 3. mSQLÀÇ ´ÜÁ¡ 4. mSQLÀÇ °¡°Ý 5. mSQLÀÇ ±¸ÀÔ 6. mSQL ÃֽŹöÀü Download ¹Þ±â 7. mSQL ¼³Ä¡ 8. mSQL°ü¸® ÇÁ·Î±×·¥ »ç¿ë 9. mSQL ÀÚ·áÇü ¹× SQL ¸í·É 10. FAQ & Tips 11. ³¡À¸·Î.. 0. mSQL Guide Á¤º¸ Version : 0.91 ÀÛ¼º: ÀÌöÇõ(msql@msql.co.kr) ÀÛ¼ºÀÏÀÚ: 0Â÷ 1999³â 1¿ù 9ÀÏ. 1Â÷ 1999³â 11¿ù 1ÀÏ. 2Â÷ 2000³â 2¿ù 1ÀÏ. 3Â÷ 2000³â 2¿ù 8ÀÏ. ÃëÁö : mSQLÀÌ ÇöÀç »ç¿ëµÇ´Â °Í¿¡ ºñÇؼ´Â ³Ê¹«³ªµµ Å͹«´Ï ¾øÀÌ ¹®¼°¡ ºÎÁ·ÇÕ´Ï´Ù. ÀÌ¿¡ Á¦°¡ ¾Ë°í ÀÖ´Â mSQL¿¡ ´ëÇÑ °ÍÀ» Á¤¸®Çؼ ¹®¼È ÇÕ´Ï´Ù. mSQLÀÇ °ø½Ä 2.0 Reference ´Â ÀÌ°÷ ¿¡¼ º¼ ¼ö ÀÖ½À´Ï´Ù. ¶ÇÇÑ ¿ø·¡´Â Mini SQL·Î ĪÇØ¾ß ÇÏÁö¸¸, ±¹³»¿¡¼´Â mSQL ·Î ³Î¸® ¾Ë·ÁÁö°í »ç¿ëµÇ´Â¹Ù mSQL ·Î À̹®¼¿¡¼´Â ĪÇϵµ·Ï ÇÏ°Ú½À´Ï´Ù. 1. mSQL °£·« ¼Ò°³ - David J. Hughes¾¾(Çö : Hughes Technologies Pty Ltd.) °¡ Á¦ÀÛÇÑ MiniSQL Àº Å©±â°¡ ÀÛ°í, ¼³Ä¡¿Í °ü¸®°¡ ½¬¿ö¼ Ãʱ⿡ ¸Å¿ì ¸¹ÀÌ »ç¿ëµÈ SQL ¼¹öÀÔ´Ï ´Ù. ¿¡¼ Á¦ÀÛ, Ãʱâ À¥ ¿¬µ¿¿¡¼ ¸¹ÀÌ ¾²¿´À¸¸ç, Áö±Ýµµ ¸¹ÀÌ »ç¿ëµË´Ï´Ù¸¸ ¿ä±Ù·¡ MySQLÀÇ °·ÂÇÑ ¼º´É¿¡ ¹Ð·Á¼ Á¡Á¡ »ç¿ëÀÌ Àû¾îÁö°í ÀÖ½À´Ï´Ù. ÇÏÁö¸¸ ¾ÆÁ÷±îÁöµµ À¥È£½ºÆà ¾÷ü³ª ´ëÇÐ ¼¹ö¿¡¼ °¡À帹ÀÌ Áö¿øµÇ°í ÀÖÀ¸¸ç, Áß¼ÒÇü ¿¡ À־ ¿ÀÈ÷·Á ´Ù¸¥ ´ëÇü DB º¸´Ù °¡º±°í ºü¸£¹Ç·Î ¿ëµµ¿¡ ¸Â°Ô ÀûÀýÈ÷ »ç¿ëÇϱ⿡´Â ÃÖ°íÀÇ SQL ¼¹ö¶ó°í »ý°¢ÇÕ´Ï´Ù. ¶ÇÇÑ ¼³Ä¡¿Í »ç¿ëÀÌ °£´ÜÇϹǷÎ(³Ê¹« °£´ÜÇѸéÀÌ ¾øÀÝ¾Æ ÀÖÁö¸¸), óÀ½¿¡ °øºÎÇÏ°íÀÚ ÇÏ´Â »ç¶÷¿¡°Ô ÀûÇÕÇÑ SQL ¼¹ö ÀÔ´Ï´Ù. ÇÏÁö¸¸ ¸ðµÎ ¹«·á°¡ ¾Æ´Ï ¶ó´Â Á¡ÀÌ Á¦¾àÀÔ´Ï´Ù. ¿¬±¸³ª Çмú ¸ñÀûÀ¸·Î´Â ¹«·á ÀÌÁö¸¸ »ó¾÷ÀûÀÎ ¸ñÀûÀ¸·Î »ç¿ë½Ã¿¡´Â $250 À» ÁöºÒÇØ¾ß ÇÕ´Ï´Ù.
mSQL ȨÆäÀÌÁö·Î
2. mSQLÀÇ Æ¯Â¡ - mSQL Àüü Å©±â°¡ 1MB°¡ µÇÁö ¾Ê´Â °¡º¿î SQL ¼¹ö ÀÔ´Ï´Ù. ÃֽŠ2.0.11 ¹öÀüÀÌ ÀüºÎ 957KBÀÔ´Ï´Ù. - CrayµîÀÇ ½´ÆÛÄÄÇ»ÅÍ¿¡¼µµ ¿øÈ°È÷ µ¿ÀÛÇÕ´Ï´Ù. - ÇÁ·Î±×·¥ ÀÚüµµ ÀÛ°í ÀûÀº ¸Þ¸ð¸®¸¦ Â÷Áö Çϱ⠶§¹®¿¡ ´Ù¸¥ ´ëÇü RDBMS µé°ú ´Þ¸® ³·Àº ½Ã½ºÅÛ¿¡¼µµ ¿øÈ°È÷ µ¿ÀÛÇÕ´Ï´Ù. - Mini SQL À¸·Î ºÒ¸®Áö¸¸ OS¿Í Çϵå¿þ¾îÂ÷¿øÀÇ Á¦¾à¸¸ ¾ø´Ù¸é 4GB ¿¡ ´ÞÇÏ´Â Database¸¦ ´Ù·ê¼ö ÀÖ½À´Ï´Ù. - DB °ü¸®, Á¢±ÙÀÌ °ü¸®ÆÄÀÏ Çϳª·Î ¼³Á¤µÇ¹Ç·Î Æí¸®ÇÏ°Ô °ü¸®ÇÒ¼ö ÀÖ½À´Ï´Ù. - ¸¹Àº ¾ð¾î¿¡¼ Áö¿øÀ» ÇÕ´Ï´Ù. C, Perl, Tcl/Tk, PHPµî ¿øÇÏ´Â ¾ð¾î·Î ½±°Ô ¿¬µ¿ÇÏ¿© »ç¿ëÇÒ¼ö ÀÖ½À´Ï´Ù. ´ëºÎºÐÀÇ °æ¿ì MySQLº¸´Ù ¸ÕÀú Áö¿øµË´Ï´Ù. - ÀÚü ½ºÅ©¸³Æ® ¾ð¾îÀÎ W3-mSQL°ú Lite ¾ð¾î¸¦ Áö¿øÇÕ´Ï´Ù. ¿äÁò¿¡´Â PHP°¡ ¸¹ÀÌ »ç¿ëµÇÁö¸¸ óÀ½ ³ª¿ÔÀ» ´ç½Ã¸¸ Çصµ ȹ±âÀûÀ¸·Î Æí¸®ÇÏ°Ô mSQL DB ¿¬µ¿ ÇÏ¿© »ç¿ëÇÒ¼ö ÀÖ´Â ½ºÅ©¸³Æ® ¾ð¾î·Î Æò°¡ ¹Þ¾Ò½À´Ï´Ù. ÁÖÀÇ : ¿ø·¡ SQLÀÇ ¸í·ÉÀÇ ³¡¿¡´Â ;¸¦ ÀÔ·ÂÇÏ¿© ¸í·ÉÀ» ÀԷ½Ãŵ´Ï´Ù¸¸ mSQL¿¡¼ ´Â \g¸¦ »ç¿ëÇÕ´Ï´Ù. MySQLÀº ÀÌÀÇ ÀǽÄÇؼ ÀÎÁö ; °ú \g ¸¦ µÑ´Ù ÀνÄÇÕ´Ï´Ù. 3. mSQL ÀÇ ´ÜÁ¡ - Ç¥ÁØ SQLÀ» ÀüºÎ Áö¿øÇÏÁö ¸øÇÕ´Ï´Ù. Áö¿øÇÏ´Â SQL¹®¹ýÀº °ÅÀÇ ±âÃÊÀûÀÎ ¹®¹ý À̶ó ÇÒ¼ö ÀÖ½À´Ï´Ù. - °¡Àå ¸¹ÀÌ »ç¿ëÇÏ´Â Select ¹® Áß ´ÙÁß Select¸¦ Áö¿øÇÏÁö ¸øÇÕ´Ï´Ù. - ALTER¹®À» Áö¿øÇÏÁö ¸øÇϹǷΠÅ×ÀÌºí ±¸Á¶¸¦ ÀÚµ¿À¸·Î º¯°æ½Ãų¼ö ¾ø½À´Ï´Ù. Çѹø »ý¼ºÇÑ Å×À̺íÀ» º¯°æÇÒ¶§´Â msqldump ÇÁ·Î±×·¥À» ÀÌ¿ëÇÏ¿© ±âÁ¸ ÀڷḦ ¹ÞÀºÈÄ ¼öµ¿ ȤÀº ÀÛ¼ºÇÑ ÇÁ·Î±×·¥À¸·Î »õ·Î »ý¼ºÇÏ¿© »ç¿ëÇÏ¿©¾ß ÇÕ´Ï´Ù. - SQLÇÔ¼ö¸¦ °ÅÀÇ Áö¿øÇÏÁö ¸øÇÕ´Ï´Ù. ¸¹Àº ¿ëµµ·Î »ç¿ëµÇ´Â ÇÔ¼ö¸¦ Áö¿øÇÏÁö ¸øÇϹǷΠ´ëºÎºÐ ÇÁ·Î±×·¥¿¡¼ ¼öµ¿ 󸮸¦ ÇØÁà¾ß ÇÏ´Â ´ÜÁ¡ÀÌ ÀÖ½À´Ï´Ù. - ÇÏµå µð½ºÅ©¿Í ¸Þ¸ð¸®¸Ê °úÀÇ µ¿±âÈ°¡ ¿Ïº®ÇÏÁö ¸øÇØ, Á¤Àü½Ã³ª ½Ã½ºÅÛ ºñÁ¤»ó Á¾·á½Ã ÃÖ±Ù µ¥ÀÌÅͳª ÀϺε¥ÀÌÅÍ°¡ À¯½ÇµÇ´Â °æ¿ì°¡ ÀÖ½À´Ï´Ù. 4. mSQLÀÇ °¡°Ý ¸¹Àº À̵éÀÌ mSQLÀº ¸®´ª½ºÀÇ ¸¹Àº GNU Softwareµéó·³ Free ÀÎÁÙ ¾Ë°í ÀÖ½À ´Ï´Ù. ÇÏÁö¸¸ mSQLÀº »ó¿ë SoftwareÀÔ´Ï´Ù. - ±³À°±â°ü(»ó¾÷Àû ±³À°±â°üÀº Á¦¿Ü) - ºñ»ó¾÷ÀûÀÎ ¿¬±¸¼Ò - µî·ÏµÈ ÀÚ¼±±â¾÷ - µî·ÏµÈ °øÀÍ´Üü - Çлý(ÀÏÀ» ÇÏÁö ¾Ê´Â ¼ø¼öÇÑ Çлý) ¸¸¾à À§¿¡ ÇØ´çµÈ´Ù¸é ¹«·á·Î »ç¿ëÇÒ¼ö ÀÖ½À´Ï´Ù. ÇÏÁö¸¸ À§¿¡ ÇØ´ç»çÇ×ÀÌ ¾ø´Ù¸é License¸¦ ±¸ÀÔÇÏ¿© »ç¿ëÇÏ¿©¾ß ÇÕ´Ï´Ù. Á¤ºÎ ±â°ü°ú »ó¾÷ÀûÀÎ ¿¬±¸ ±â°üµµ License ±¸ÀÔ ÇØ¾ß ÇÏ´Â ´ë»ó¿¡ Æ÷ÇԵ˴ϴÙ. ´ÜÀÏ License¿Í ¿©·¯°³¸¦ ¹Àº ¶óÀ̼¾½º°¡ Àִµ¥ ¿øÇÏ´Â ¼ö·®¿¡¼ °¡Àå °æÁ¦ÀûÀÎ License¸¦ ¼±Åà ±¸ÀÔÇϽñ⠹ٶø´Ï´Ù.5. mSQL ±¸ÀÔ ±¸ÀÔÀº mSQLÀ» ´Ù¿î ¹ÞÀº µÚ ¾ÐÃàÀ» Ç®¸é »ý¼ºµÈ msql-¹öÀü µð·ºÅ丮 ¹Ø¿¡ doc µð·ºÅ丮°¡ ÀÖ½À´Ï´Ù. ÀÌ ¾È¿¡ invoice ¹®¼ °¡ Àִµ¥ ÅؽºÆ®·Î´Â invoice.txt, ps ÆÄÀϷδ ¾ÐÃàµÈ ÇüÅ·Πinvoice.ps.gz °¡ ÀÖ½À´Ï´Ù. ÀÌ µÑ Áß Çϳª¸¦ ÀÌ¿ë Çϼż ³»¿ëÀ» ±âÀÔÇϽÅÈÄ ¸ÞÀÏ È¤Àº Æѽº·Î º¸³» ½Ã¸é µË´Ï´Ù. °áÀç ¼ö´ÜÀ¸·Î ´Â Master, Visa µîÀÇ ½Å¿ë Ä«µå¸¦ ÀÌ¿ëÇÑ °áÁ¦ ȤÀº ¼Û±Ý ¼öÇ¥¸¦ ÀÌ¿ëÇÑ ¹æ¹ýÀÌ ÀÖ½À´Ï´Ù. [invoice.txt ÀÇ ³»¿ë] H u g h e s T e c h n o l o g i e s P t y L t d P.O. Box 432 Main Beach, Qld 4217 Australia Fax : +61 7 5529 2299 Email : info@Hughes.com.au Mini SQL 2.0 Invoice ==================== Name ______________________________________________________ Organisation ______________________________________________________ Postal Address ______________________________________________________ ______________________________________________________ ______________________________________________________ E-Mail Address ______________________________________________________ Qty Item Unit Cost Sub Total +------+------------------------+--------------+--------------+ | | Single License | US $ 250 | | +------+------------------------+--------------+--------------+ | | 5 License Pack | US $ 1,190 | | +------+------------------------+--------------+--------------+ | | 10 License Pack | US $ 2,250 | | +------+------------------------+--------------+--------------+ | | 20 License Pack | US $ 4,250 | | +------+------------------------+--------------+--------------+ | | 50 License Pack | US $ 9,995 | | +------+------------------------+--------------+--------------+ | Sub Total | | +--------------+--------------+ 50% discount for registered | Discount | | users of mSQL 1.0 +--------------+--------------+ | Total | | +--------------+--------------+ Cheque enclosed [_] (see notes below for currency information) Please debit my [_] Mastercard [_] Visa the above total. Card Number ___________|___________|___________|__________ Name on Card _________________________ Expiry date ___/___ Signature _________________________ Date ______________ All credit card transactions are processed in Australian Dollars based on the US / Australian dollar exchange rate on the day of processing as published by Australia New Zealand Banking Corporation. The final amount shown on credit card statements may vary slightly due to the exchange rate used by your bank and any transaction fees imposed by your bank. Cheques, bank drafts and money orders in any currency may be used for payment only if the currency used is the native currency of the country (or US dollars). In particular, European Union currency is not acceptable in Australia. If non-US currency is to be used, please convert the invoice total from US dollars to your local currency. Discount only available if you PURCHASED the same number of copies of mSQL 1 6. mSQL ÃֽŹöÀü Download ¹Þ±â. ¿ÃÇØ Á߹ݺÎÅÍ mSQL ¼¹ö ´Ù¿î¹Þ´Â ¹ýÀÌ ¾à°£ º¯°æµÇ¾ú½À´Ï´Ù. ±×³É ´Ù¿îÀ» ¹ÞÀ»¼ö ¾ø°í ÀÎÁõÀ» °ÅÄ£´ÙÀ½¿¡¼¾ß Download ¹ÞÀ»¼ö ÀÖ½À´Ï´Ù. 1) mSQL ¼¹ö ȨÆäÀÌÁö·Î http://www.hughes.com.au ·Î ã¾Æ°©´Ï´Ù. mSQLÀÇ Á¦ÀÛ»çÀÎ Hughes Technologies ÀÇ ½Éº¼ »ç½¿ÀÌ ¸ÞÀÎ ÆäÀÌÁöºÎÅÍ ¹Ý°Ü ÁÝ´Ï´Ù. ÃֽŠ¹öÀüÀÌ 1999³â 8¿ù 23ÀÏ¿¡ ³ª¿Â 2.0.11 ¹öÀüÀÓÀ» ¾Ë¼ö ÀÖ½À´Ï´Ù. ÁÂÃø ¸Þ´º¿¡ PRODUCTS¸¦ ¼±ÅÃÇÕ´Ï´Ù. ¾Æ´Ï¸é ¹Ù·Î What's New¿¡¼ Download¸¦ ¼±ÅÃÇصµ µË´Ï´Ù. 2) À§ÀÇ °ÍÁß MiniSQLÀ» ¼±ÅÃÇÕ´Ï´Ù. 3) Current VersionÀ» ¼±ÅÃÇÕ´Ï´Ù. 4) Download Download¸¦ ¼±ÅÃÇÕ´Ï´Ù. 5) ÀÚ µåµð¾î ÀÎÁõÀ» ÇÏ´Â ºÎºÐÀÌ ³ª¿Ô½À´Ï´Ù. Á¦ÀÏ Ã³À½¿¡ What's New¿¡¼ Download¸¦ ¼±ÅÃÇϽźÐÀº ¹Ù·Î ÀÌȸé°ú ¸¸³ª°Ô µË´Ï´Ù. ¿©±â¼ ¿©·¯ºÐÀº ´Ù¿î·Îµå¸¦ ¹Þ±â À§ÇÑ ID¿Í Æнº¿öµå¸¦ ¹Þ¾Æ¾ß ÇϹǷΠRegister Do It! Register Me¿¡¼ Do ItÀ» Ŭ¸¯ÇÕ´Ï´Ù. 6) ÀÔ·Â ÆûÀÌ ³ª¿É´Ï´Ù. À§ÀÇ ÀÔ·ÂÆû¿¡¼ Â÷·Ê·Î ¿©·¯ºÐÀÇ À̸§, E-mail ÁÖ¼Ò¸¦ ÀÔ·ÂÇϼ¼¿ä. E-mail ÁÖ¼Ò´Â Áö±Ý ¹ÞÀ»¼ö ÀÖ´Â E-mail ÁÖ¼Ò¿©¾ß ÇÕ´Ï´Ù. ¿©·¯ºÐ ÀÇ E-mail ÁÖ¼Ò°¡ ID°¡ µÇ¸ç E-mail ÁÖ¼Ò·Î Æнº¿öµå¸¦ Àü¼ÛÇØÁֱ⠶§¹®ÀÔ´Ï´Ù. ³ª¶ó´Â Korea , Operating System ¿¡¼´Â Linux¸¦ ¼±ÅÃÇÕ´Ï´Ù. 7) ÀÔ·Â ³»¿ëÀ» È®ÀÎÇϽŠµÚ Register¸¦ Ŭ¸¯ÇÕ´Ï´Ù. ¹Ýµå½Ã E-mail ÁÖ¼Ò´Â Áö±Ý ¹ÞÀ»¼ö ÀÖ´Â ÁÖ¼Ò¿©¾ß ÇÕ´Ï´Ù. 8) ÀÌÁ¦ Return to Login Page¸¦ ´·¯¼ ´Ù½Ã ÀÎÁõ ÆäÀÌÁö·Î µ¹¾Æ°¡°í, E-mailÀ» È®ÀÎÇϽñ⠹ٶø´Ï´Ù. Huges.com.au registration À§¿Í °°Àº Á¦¸ñÀÇ E-mail ÀÌ µµÂøÇÏ¿´À» °Ì´Ï´Ù. E-mail ³»¿ëÀº ´ÙÀ½°ú °°½À´Ï´Ù. Thank you for registering with Hughes Technologies. Using the enclosed password you can download all the software products provided via our web site. All the products available from our site include a 14 day evaluation period. If you continue to use the software after the 14 day period then you must purchase a license for the package. Details of the licenses can be found in the README file of the package you download. To access the software archive, please use the following details Email Address : ¿©·¯ºÐÀÌÀÔ·ÂÇÑE-mailÁÖ¼Ò Password : ÇÒ´ç¹ÞÀºÆнº¿öµå ÀÌ·¸°Ô À§Ã³·³ Æнº¿öµå¸¦ ¾Ë·Á ÁÝ´Ï´Ù. ID´Â E-mail ÁÖ¼Ò, Æнº¿öµå´Â À§¿¡¼ ¾Ë·ÁÁØ Æнº¿öµå¸¦ »ç¿ëÇÏ¸é µË´Ï´Ù. 9) Email ÁÖ¼Ò¿Í Æнº¿öµå¸¦ ÀÔ·ÂÈÄ Login ¹öÆ°À» ´©¸¨´Ï´Ù. 10) À§Ã³·³ ´Ù¿î¹ÞÀ»¼ö ÀÖ´Â ¸ñ·ÏÀÌ È¸éÀÌ ¶å´Ï´Ù. ÃֽŹöÀüÀ» ¹Þ¾Æ¾ß °ÚÁö¿ä. MiniSQL 2.0.11 ÀÇ ¿À¸¥ÂÊ¿¡ ÀÖ´Â Download ¹ØÀÇ Æú´õ±×¸²À» Ŭ¸¯ÇÕ´Ï´Ù. 11) ±×·¯¸é À§Ã³·³ »ç¿ëÀÚ Á¤º¸¿Í ÆÄÀÏÀ̸§µîÀÌ ³ªÅ¸³³´Ï´Ù. File Server¸¦ °áÁ¤ ÇÏ°í, Send File ¹öÆ°À» ´©¸£¸é µÇ´Âµ¥, ±¹³»¿¡¼´Â File Server¿¡ µû¸¥ ¼ÓµµÂ÷ ÀÌ°¡ °ÅÀÇ ºñ½Á ºñ½Á ÇϹǷÎ, ±âº»Ä¡¸¦ »ç¿ëÇÏ¿© Send FileÀ» ´©¸¨´Ï´Ù. 12) ±×·¯¸é À§Ã³·³ ´Ù¿î·Îµå âÀÌ ¶å´Ï´Ù. ÀúÀå°ú È®ÀÎÀ» ´©¸¨´Ï´Ù. À§Ä¡¸¦ ÁöÁ¤ ÇÏ°í ÀúÀå ÇÕ´Ï´Ù. 13) ÀÌÁ¦ Download °úÁ¤ÀÌ ¿Ï·á µÇ¾ú½À´Ï´Ù. ÀÌÁ¦ ¼³Ä¡ °úÁ¤À¸·Î ³Ñ¾î °¡°Ú½À´Ï´Ù. 7. mSQL ¼³Ä¡ 1) ¹ÞÀº msql-2.0.11.tar.gz¸¦ ¼¹ö¿¡ Àü¼ÛÇÕ´Ï´Ù. ÀÌÇÏ ¸ðµç ¼³Ä¡´Â root ±ÇÇÑÀ¸·Î ÇÕ´Ï´Ù. 2) ¾Æ·¡ ó·³ µÑÁß Çϳª¸¦ ÀÔ·ÂÇÏ¿© ¾ÐÃàÀ» DZ´Ï´Ù. °á°ú´Â ¶È°°½À´Ï´Ù. - [root@minky minky]# zcat msql-2.0.11.tar.gz | tar -xvf - - [root@minky minky]# tar xfvz msql-2.0.11.tar.gz msql-2.0.11/ msql-2.0.11/INSTALL msql-2.0.11/BUGS msql-2.0.11/demos/ msql-2.0.11/demos/w3-msql/ msql-2.0.11/demos/w3-msql/bookmarks/ msql-2.0.11/demos/w3-msql/bookmarks/add.html msql-2.0.11/demos/w3-msql/bookmarks/README msql-2.0.11/demos/w3-msql/bookmarks/Welcome.html msql-2.0.11/demos/w3-msql/bookmarks/back.gif ............................. msql-2.0.11/src/w3-msql/Makefile msql-2.0.11/src/w3-msql/Makefile.tmpl msql-2.0.11/src/w3-msql/auth.c msql-2.0.11/src/w3-msql/http.c msql-2.0.11/src/w3-msql/lexer.c msql-2.0.11/src/w3-msql/mod_w3msql.c msql-2.0.11/src/w3-msql/modules.c msql-2.0.11/src/w3-msql/w3-auth.c msql-2.0.11/src/w3-msql/w3-msql.c [root@minky minky]# 3) ¾ÐÃàÇ®¸° msql-2.0.11 µð·ºÅ丮·Î À̵¿ÇÏ¿© make target À̶ó ÀÔ·ÂÇÕ´Ï´Ù. [root@minky minky]# cd msql-2.0.11 [root@minky msql-2.0.11]# ls BUGS INSTALL* MSQL_BOOK Makefile* README* README.sco* RELEASE_NOTES* demos/ doc/ misc/ scripts/ src/ [root@minky msql-2.0.11]# make target Making target directory for Linux-2.2.12-20-i686 Building directory tree. Adding common Adding conf Adding lang-common Adding lite Adding makedepend Adding makegen Adding msql Adding regexp Adding tests Adding tests/rtest.src Adding w3-msql Adding w3-msql/tests Adding sym-links .......................................................... .......................................................... ...................................................... Build of target directory for Linux-2.2.12-20-i686 complete [root@minky msql-2.0.11]# 4) make target ¸í·ÉÀ¸·Î targets µð·ºÅ丮 ¹Ø¿¡ ÇöÀç ¿î¿µÃ¼Á¦-Ä¿³Î¹öÀü-CPUÁ¾·ù ÇüÅÂÀÇ µð·ºÅ丮°¡ ¸¸µé¾î Áö°Ô µË´Ï´Ù. [root@minky msql-2.0.11]# cd targets [root@minky targets]# ls Linux-2.2.12-20-i686/ 5) ÀÌ µð·ºÅ丮 ¾È¿¡ µé¾î °¡½Å´ÙÀ½ ./setup ¸í·ÉÀ» ÀÔ·ÂÇϽñ⠹ٶø´Ï´Ù. ±×·¯¸é ÀÚµ¿À¸·Î ½Ã½ºÅÛ È¯°æ¿¡ ¸Â°Ô ÀÛ¾÷À» ÇÕ´Ï´Ù. [root@minky Linux-2.2.12-20-i686]# cd Linux-2.2.12-20kr-i586/ [root@minky Linux-2.2.12-20-i686]# ls Makefile@ common/ lang-common/ lite/ makegen/ regexp/ tests/ Makefile.tmpl@ conf/ lib/ makedepend/ msql/ setup@ w3-msql/ [root@minky Linux-2.2.12-20-i686]# ./setup Starting configuration of mSQL 2. creating cache ./config.cache checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking return type of signal handlers... void checking for ranlib... ranlib checking for bison... bison -y checking for sysconf... yes checking for strdup... yes checking for rindex... yes checking for random... yes checking for bcopy... yes checking for getdtablesize... yes checking for strsignal... yes checking for ftruncate... yes checking for setrlimit... yes checking for madvise... no ............................. checking for a working getrlimit. You're fine. checking for day light saving info. Yup, we'll use it. checking for HP-UX ranlib. Nope, it's OK to use ranlib. checking for Linux. Yup, it's Linux. Adding -rdynamic to the link flags. Also forcing msync for Linux. Ready to build mSQL. You may wish to check "site.mm" although the defaults should be fine. When you're ready, type "make all" to build the software [root@minky Linux-2.2.12-20-i686]# 6) À§ÀÇ ¸Þ½ÃÁö ó·³ make allÀ» ÀÔ·ÂÇÏ½Ã¸é µË´Ï´Ù. [root@minky Linux-2.2.12-20-i686]# make all Regenerating Makefile. ...................................................... Done. make[1]: Entering directory `/home/minky/msql-2.0.11/targets/Linux-2.2.12-20-i686' Starting make for mSQL-2 ............................. make[3]: Leaving directory `/home/minky/msql-2.0.11/targets/Linux-2.2.12-20-i686/lite' make[2]: Leaving directory `/home/minky/msql-2.0.11/targets/Linux-2.2.12-20-i686/lite' <-- [lite] done Make of mSQL-2 complete. You should now install mSQL-2 using make install make[1]: Leaving directory `/home/minky/msql-2.0.11/targets/Linux-2.2.12-20-i686' [root@minky Linux-2.2.12-20-i686]# 7) À§¿¡ ³ª¿Â ¸Þ½ÃÁö ó·³ make install À» ÀÔ·ÂÇÕ´Ï´Ù. [root@minky Linux-2.2.12-20-i686]# make install Starting install for mSQL-2 mkdir /usr/local/Hughes; chmod 0755 /usr/local/Hughes mkdir /usr/local/Hughes/bin; chmod 0755 /usr/local/Hughes/bin mkdir /usr/local/Hughes/include; chmod 0755 /usr/local/Hughes/include mkdir /usr/local/Hughes/include/common; chmod 0755 /usr/local/Hughes/include/common mkdir /usr/local/Hughes/lib; chmod 0755 /usr/local/Hughes/lib mkdir /usr/local/Hughes/msqldb; chmod 0755 /usr/local/Hughes/msqldb mkdir /usr/local/Hughes/msqldb/.tmp; chmod 0755 /usr/local/Hughes/msqldb/.tmp mkdir /usr/local/Hughes/doc; chmod 0755 /usr/local/Hughes/doc mkdir /usr/local/Hughes/www; chmod 0755 /usr/local/Hughes/www mkdir /usr/local/Hughes/misc; chmod 0755 /usr/local/Hughes/misc mkdir /usr/local/Hughes/makegen; chmod 0755 /usr/local/Hughes/makegen mkdir /usr/local/Hughes/modules; chmod 0755 /usr/local/Hughes/modules --> [common] directory ............................. Installation of mSQL-2 complete. ********* ** This is the commercial, production release of mSQL 2.0 ** Please see the README file in the top directory of the ** distribution for license information. ********* make[1]: Leaving directory `/home/minky/msql-2.0.11/targets/Linux-2.2.12-20-i686' [root@minky Linux-2.2.12-20-i686]# 8) mSQLÀÌ /usr/local/Hughes/ ¿¡ ¼³Ä¡µÇ¾ú½À´Ï´Ù. [root@minky Linux-2.2.12-20-i686]# cd /usr/local/Hughes [root@minky Hughes]# ls README* README.sco* bin/ doc/ include/ lib/ makegen/ misc/ modules/ msql.acl.sample* msql.conf msqldb/ www/ [root@minky Hughes]# 9) msql User¸¦ Ãß°¡ÇÏ°í /usr/local/Hughes/ µð·ºÅ丮ÀÇ ±ÇÇÑÀ» msql·Î ¹Ù²ß´Ï´Ù. [root@minky Linux-2.2.12-20-i686]# adduser msql [root@minky Linux-2.2.12-20-i686]# chown -R msql.msql /usr/local/Hughes 10) msql.conf ÆÄÀÏÀ» »óȲ¿¡ ¸Â°Ô ¼öÁ¤ÇÕ´Ï´Ù. ¡Ý msql.conf ÀÇ ³»¿ë msql.conf ´Â msql À» ¼³Á¤ÇÏ´Â ¼³Á¤ÆÄÀÏÀÔ´Ï´Ù. ¸¶Ä¡ ApacheÀÇ httpd.conf¿Í ºñ½ÁÇÑ ¿ªÈ°À» ÇÑ´Ù°í ÇÒ¼ö ÀÖ°Ú½À´Ï´Ù. ±×·¯³ª ApacheÀÇ httpd.conf ¿¡ ºñÇÏ¸é »ó´çÈ÷ ¼³Á¤ ÇÒ ³»¿ëÀÌ Àû½À´Ï´Ù. °Ô´Ù°¡ ¼öÁ¤ÇÒ °Íµµ ¸¹Áö ¾Ê½À´Ï´Ù. msql.conf ´Â /usr/local/Hughes/msql.conf ¿¡ À§Ä¡ÇÕ´Ï´Ù.
License Á¾·ù ´Ü°¡ ÃÑ °¡°Ý ´ÜÀÏ License US $250 US $250 5 Licens Pack US $238 US $1,190 10 Licens Pack US $225 US $2,250 20 Licens Pack US $212.5 US $4,250 50 Licens Pack US $199.9 US $9,995 [general] Inst_Dir = /usr/local/Hughes DB_Dir = %I/msqldb mSQL_User = msql Admin_User = root Pid_File = %I/msql2d.pid TCP_Port = 1114 UNIX_Port = %I/msql2.sock [system] Msync_Timer = 30 Host_Lookup = True Read_Only = False Remote_Access = False Local_Access = True #Query_Log = False #Query_Log_File = %I/query.log [w3-msql] Auth_Host = NULL Footer = True Force_Private = False #Force_Suffix = .msql À§ÀÇ ³»¿ëÁß Á¤»óÀûÀ¸·Î À§ÀÇ ¼³Ä¡°úÁ¤´ë·Î ¼³Ä¡ Çß´Ù¸é [genernal] ¼½¼ÇÀº ¼öÁ¤ÇÒ ÇÊ¿ä°¡ ¾ø½À´Ï´Ù. [w3-msql]Àº w3-msql ÆÐÅ°Áö¿Í °ü·ÃµÈ À̾߱â ÀÌÁö¸¸, ¿äÁòÀº PHPµî¿¡ ¹Ð·Á »ç¿ëµÇ´Â ÀÏÀÌ °ÅÀÇ ¾øÀ¸¹Ç·Î ´Ù·çÁö ¾Ê°Ú½À´Ï´Ù. [system] ºÎºÐ¸¸ ¿øÇÏ´Â ´ë·Î ¼³Á¤ÇÏ¸é µË´Ï´Ù. ¡Þ Msync_Timer = 30 mSQLÀº ºü¸¥ ¼Óµµ¸¦ À§Çؼ Mmap À̶ó´Â ±â¹ýÀ» ÀÌ¿ëÇÕ´Ï´Ù. ÀÌ ±â¹ýÀº ÇÏµå µð½ºÅ©¿¡ ÀÖ´Â ³»¿ëÀ» ¸Þ¸ð¸®·Î °¡Á®¿Í ¸Þ¸ð¸®¿¡¼ ó¸® »ç¿ëÇÏ´Â °ÍÀÔ´Ï´Ù. ½±°Ô »ý°¢ÇϽøé ij½¬±â¹ýÀ» ¿¬»óÇÏ½Ã¸é µÇ°Ú½À´Ï´Ù. Msysnc_Timer ¶ó°í ÇÏ´Â °ÍÀº ¸Þ¸ð¸®»ó¿¡ ÀÖ´Â ³»¿ëÀ» µð½ºÅ©¿¡ ÀúÀåÇÏ´Â ½Ã°£À» ¼³Á¤ÇÏ´Â °ÍÀÔ´Ï´Ù. ÀÌ ½Ã°£ÀÌ ±æ¸é µð½ºÅ©¸¦ ¸¹ÀÌ »ç¿ëÇÏÁö ¾Ê°í ¸Þ¸ð¸®¿¡¼ ¸¹Àº ÀÛ¾÷ÀÌ ÀÌ·ç¾î Áö¹Ç·Î ¼ÓµµÀÇ Çâ»óÀº °¡Á® ¿Ã¼ö ÀÖÁö¸¸ ½Ã½ºÅÛÀÇ ºñÁ¤»óÀûÀÎ Á¾·á, Á¤Áö µîÀÇ ÀÌÀ¯·Î Á¤»óÀûÀ¸·Î Á¾·á µÇÁö ¾ÊÀº °æ¿ì ¸Þ¸ð¸®ÀÇ ³»¿ë°ú µð½ºÅ©ÀÇ ³»¿ëÀÌ °°Áö ¾ÊÀ¸¹Ç·Î µ¥ÀÌÅÍÀÇ ºÐ½Ç, ¼Õ½ÇµîÀÌ ÀÏ¾î ³¯¼ö ÀÖ½À´Ï´Ù. ±×·¯¹Ç·Î ±âº» °ªÀÌ 30(ÃÊ)¸¦ ÀÌ¿ëÇÏÁö ¸»°í ª°Ô Çصΰųª 0 À¸·Î ÇØµÎ¾î¼ mSQL ¼¹ö°¡ °ü¸®ÇÏ´Â °ÍÀÌ ¾Æ´Ï¶ó ¸®´ª½º°¡ ½º½º·Î °ü¸® Çϵµ·Ï ¸Ã°Ü µÎ´Â °Íµµ ÇÑ ¹æ¹ýÀÔ´Ï´Ù. ¡Þ Host_Lookup = True Á¢¼ÓÇÏ´Â »ç¶÷, È£½ºÆ®°¡ IP ÁÖ¼ÒÀÎ °æ¿ì È£½ºÆ® ³×ÀÓÀ» ã¾Æ¼ ¾øÀ¸¸é Á¢¼ÓÀ» °ÅºÎ ÇÏ´Â ±â´ÉÀÔ´Ï´Ù. ±âº»°ªÀ¸·Î True¸¦ »ç¿ëÇÕ´Ï´Ù. ¡Þ Read_Only = False Read_Only ´Â DatabaseÀÇ ¼öÁ¤, »ý¼ºÀ» Çã¿ëÇÏÁö ¾Ê´Â ¼³Á¤ÀÔ´Ï´Ù. True·Î ÇØ³í ´Ù¸é Database¸¦ Àд °Í ¹Û¿¡ ÇÒ¼ö ¾ø½À´Ï´Ù. ±âº»°ªÀº FalseÀÔ´Ï´Ù. ¡Þ Remote_Access = False Remote_Access ´Â ¿ÜºÎ¿¡¼ÀÇ Á¢¼ÓÀ» Çã¿ëÇÒ°ÍÀÎÁö ´ëÇÑ ¼³Á¤ÀÔ´Ï´Ù. ±âº»°ªÀº FalseÀε¥ ÀÌ·¸°Ô ¼³Á¤ÇسõÀ¸¸é ¿ÜºÎ¿¡¼ Á¢¼ÓÀº ÇÒ¼ö ¾ø½À´Ï´Ù. ¡Þ Local_Access = True Local_Access ´Â ¼¹ö ³»ºÎ¿¡¼ÀÇ Á¢¼ÓÀ» Çã¿ëÇÒ°ÍÀÎÁö ´ëÇÑ ¼³Á¤ÀÔ´Ï´Ù. ±âº»°ªÀº TrueÀε¥ False·Î ¼³Á¤ÇÏ¸é ¼¹ö ³»ºÎ¿¡¼ÀÇ Á¢¼ÓÀº Çã¿ë ÇÏÁö ¾Ê½À´Ï´Ù. ¡Þ #Query_Log = False #Query_Log_File = %I/query.log Query_Log´Â mSQL ¼¹ö¿¡ ¿ä±¸ÇÏ´Â Äõ¸®µéÀ» Log ÆÄÀÏ·Î ÀÛ¼ºÇÒ°ÍÀÎÁö¸¦ ¼±ÅÃÇÏ ´Â ¼³Á¤ÀÔ´Ï´Ù. ±âº»Ä¡´Â False ÀÌ°í ¾Æ¿¹ ÁÖ¼®(#)ó¸® µÇ¾î ÀÖ½À´Ï´Ù. ¸¸¾à »ç¿ëÇÏ°íÀÚ ÇÑ´Ù¸é ÁÖ¼®(#)¸¦ Á¦°ÅÇÏ°í False¸¦ True·Î ¼öÁ¤ÇÏ½Ã°í ¹ØÀÇ ÀúÀå µÇ´Â ÆÄÀÏÀ» ÁöÁ¤ÇÏ´Â ¿É¼ÇÀÎ Query_Log_File ºÎºÐµµ ÁÖ¼®(#)󸮸¦ Á¦°Å ÇϽñ⠹ٶø´Ï´Ù. ±âº»Àº ¼³Ä¡µÈµð·ºÅ丮/query.log À̹ǷΠ/usr/local/Hughes/query.log °¡ µË´Ï´Ù. ¡Ý ÇÊ¿äÇÑ »çÇ×À» ¼öÁ¤ÇÏ°í ÀúÀåÇÕ´Ï´Ù. 11) ÀÌÁ¦ mSQL µ¥¸óÀ» ½ÇÇà ½Ãŵ´Ï´Ù. ¡Ý mSQL µ¥¸óÀº /usr/local/Hughes/bin/msql2d ÀÔ´Ï´Ù. ½ÇÇà ½Ãų¶§´Â &¸¦ ºÙ¿©¼ ¹é±×¶ó¿îµå·Î ½ÇÇàµÇµµ·Ï ÇØ¾ß ÇÕ´Ï´Ù. [root@minky bin]# /usr/local/Hughes/bin/msql2d & ȤÀº /usr/local/Hughes/bin ¿¡¼ ./msql2d & ·Î ½ÇÇà [root@minky bin]# ./msql2d & <½ÇÇà °á°ú ȸé> [1] 577 Mini SQL Version 2.0.11 Copyright (c) 1993-94 David J. Hughes Copyright (c) 1995-99 Hughes Technologies Pty Ltd. All rights reserved. Loading configuration from '/usr/local/Hughes/msql.conf'. Server process reconfigured to accept 200 connections. Server running as user 'msql'. [root@minky bin]# Server mode is Read/Write. [root@minky bin]# /usr ȤÀº /usr/local, /usr/loca/Hughes µð·ºÅ丮¿¡ msql À¯Àú°¡ Á¢±Ù ±ÇÇÑÀÌ ¾øÀ» ¶§´Â ¿¡·¯ ¸Þ½ÃÁö¸¦ Ãâ·Â ÇÕ´Ï´Ù. [root@minky bin]# ./msql2d & [3] 642 Mini SQL Version 2.0.11 Copyright (c) 1993-94 David J. Hughes Copyright (c) 1995-99 Hughes Technologies Pty Ltd. All rights reserved. Loading configuration from '/usr/local/Hughes/msql.conf'. Server process reconfigured to accept 200 connections. [root@minky bin]# Server running as user 'msql'. Server mode is Read/Write. Error! Can't stat '/usr/local/Hughes/msql2d.pid' [3]+ Exit 1 ./msql2d [root@minky bin]# Æ۹̼ÇÀ» msql·Î º¯°æ ÀÐÀ»¼ö ÀÖµµ·Ï ¼öÁ¤ÇϽñ⠹ٶø´Ï´Ù. 8. mSQL°ü¸® ÇÁ·Î±×·¥ »ç¿ë /usr/local/Hughes/bin ¿¡ º¸½Ã¸é ¿©·¯ ½ÇÇà ÆÄÀϵéÀÌ ÀÖ½À´Ï´Ù. À̵éÀÌ ¹Ù·Î mSQLÀ» °ü¸®, À¯Áö¿¡ ÇÊ¿äÇÑ À¯Æ¿¸®Æ¼ µéÀ̶ó°í »ý°¢ÇÏ½Ã¸é µË´Ï´Ù. À̵éÀº ÇÁ·Î±×·¥ ¸¶´Ù °¢°¢ÀÇ ¿ëµµ°¡ ÀÖ½À´Ï´Ù. °ü¸®ÇÏ´Â µ¥ ÇÊ¿äÇÑ ÇÁ·Î±×·¥°ú ¹æ¹ýÀ» ´ÙÀ½ ºÎºÐºÎÅÍ ´Ù·ç¾î º¸µµ·Ï ÇÏ°Ú½À´Ï´Ù. ¸ðµç °ü¸® ÇÁ·Î±×·¥À» »ç¿ëÇÏ ·Á¸é mSQL µ¥¸óÀÎ msql2d °¡ ½ÇÇà µÇ¾î ÀÖ¾î¾ß ÇÕ´Ï´Ù. ¡Ý Database °ü¸® °ü¸® Çϴµ¥´Â ÁÖ·Î msqladmin À̶ó´Â ÇÁ·Î±×·¥ÀÌ »ç¿ëµË´Ï´Ù. msqladmin ¸¸ Ä¡¸é ¸í·É°ú °£´ÜÇÑ »ç¿ë ¹ýÀ» ¾Ë·Á ÁÝ´Ï´Ù. ÀÌÁ¦ ÀÌ °ÍÀ» ÀÌ¿ëÇÏ¿© Database¸¦ °ü¸® Çغ¸µµ·Ï ÇÏ°Ú½À´Ï´Ù. msqladmin [-h host] [-f conf] [-q] À§¿Í °°Àº ¾ç½ÄÀ¸·Î »ç¿ëÇϴµ¥ , ¿É¼ÇÀº -h È£½ºÆ® ´Â ´Ù¸¥ ¼¹öÀÇ mSQLÀ» »ç¿ëÇÒ ¶§ ÁöÁ¤ÇÏ¿© »ç¿ëÇÕ´Ï´Ù. -f ´Â ´Ù¸¥ ¼³Á¤ÆÄÀÏÀ» ÀÌ¿ëÇÏ¿© ÀÛ¾÷ ÇÒ ¶§ ¼³Á¤ÆÄÀÏÀÇ °æ·Î¸¦ Àû¾î ÁÖ¸é µË´Ï´Ù. -q ´Â ÀÛ¾÷½Ã ´Ù½Ã ¹°¾î º¸Áö ¾Ê°í ÀÛ¾÷À» ÁøÇà ÇÕ´Ï´Ù. »èÁ¦ ÀÛ¾÷½Ã¿¡µµ ¹°¾î º¸Áö ¾ÊÀ¸¹Ç·Î ÁÖÀÇ Çؼ »ç¿ëÇϽñ⠹ٶø´Ï´Ù. ´Â »ç¿ëÇÒ ¸í·ÉÀ» ÀûÀ¸¸é µË´Ï´Ù. -h , -f ¿É¼ÇÀº ¸ðµç mSQL ÇÁ·Î±×·¥¿¡¼ °øÅëÀûÀ¸·Î »ç¿ëµË´Ï´Ù. ¡Þ Database »ý¼º msqladmin create »ý¼ºÇÒDatabaseÀ̸§ À§Ã³·³ Çϸé Database°¡ »õ·Î »ý¼ºµË´Ï´Ù. »ç½Ç DatabaseÀÇ »ý¼ºÀº ¼³Ä¡µÈ µð·ºÅ丮 /usr/local/Hughes¿¡¼ º¸¸é msqldb ¶ó´Â µð·ºÅ丮°¡ ÀÖ´Â µ¥ ¿©±â¿¡ µð·ºÅ丮 Çϳª¸¦ »ý¼ºÇÏ´Â °Í¿¡ ºÒ°ú ÇÕ´Ï´Ù. À§ÀÇ ÀÛ¾÷Àº msqldb µð·ºÅ丮¿¡¼ mkdir »ý¼ºÇÒDatabaseÀ̸§À» Çصµ ¶È°°Àº È¿°ú¸¦ º¼¼ö ÀÖ½À´Ï´Ù. <»ý¼º ȸé> [root@minky bin]# ./msqladmin create test Database "test" created. ¡Þ Database º¹»ç msqladmin copy ¿øº»DataBase »ý¼ºÇÒDataBase copy ¸í·ÉÀ¸·Î ¿øº»°ú ´ë»óÀ̸§À» Á¤ÇÏ¸é ¿øº» DB¿Í ¶È°°Àº DB°¡ »ý¼ºµË´Ï´Ù. ¡Þ Database À̵¿ msqladmin move À̵¿ÇÒDataBase »ý¼ºµÉDataBase ¡Þ Database »èÁ¦ msqladmin drop »èÁ¦ÇÒDatabaseÀ̸§ À§ÀÇ »ý¼º, º¹»ç, À̵¿Àº ½ÇÇàµÇ°í °£´ÜÈ÷ µÇ¾ú´Ù´Â ¸Þ½ÃÁö¸¸À» Ãâ·ÂÇϽø¸ DropÀÇ °æ¿ì¿¡´Â Á¤¸»·Î »èÁ¦ÇÒ°ÍÀÎÁö ¹¯½À´Ï´Ù. DatabaseÀÇ »èÁ¦ ¸í·ÉÀ» ½ÇÇàÇÏ¸é ¹é¾÷ ÇØ³í °ÍÀÌ ¾ø´Â ÀÌ»ó º¹±¸ ÇÒ ¹æ¹ýÀÌ ¾øÀ¸¹Ç·Î ½ÅÁßÈ÷ »ó¿äÇϽñ⠹ٶø´Ï´Ù. Àúµµ DatabaseÀ̸§À» Âø°¢ÇÏ°í Çѹø Drop ¹®À» À߸ø »ç¿ëÇÏ¿© ¼öõ¸íÀÇ Database¸¦ ³¯¸°ÀûÀÌ ÀÖ½À´Ï´Ù. ´ÙÇàÈ÷ ÁÖ±âÀûÀ¸·Î ¹é¾÷À» ¹Þ¾ÆµÐ Data·Î º¹±¸´Â ÇÏ¿´À¸³ª, ¾ÆÂñÇÑ ¼ø°£À̾ú½À´Ï´Ù. ¿©·¯ºÐµéµµ Drop ¸í·ÉÀº ¾ÆÁÖ ½ÅÁßÈ÷ »ç¿ëÇϽñ⠹ٶø´Ï´Ù. <»èÁ¦ ȸé> [root@minky bin]# ./msqladmin drop test Dropping the database is potentially a very bad thing to do. Any data stored in the database will be destroyed. Do you really want to drop the "test" database? [Y/N] y Database "test" dropped [root@minky bin]# ¡Þ mSQL ¼¹öÀÇ ÁßÁö msqladmin shutdown ¸í·ÉÀ¸·Î mSQL ¼¹ö¸¦ ÁßÁö ½ÃÅ°°í, mSQL ¼¹ö¸¦ Á¾·á ½Ãų¼ö ÀÖ½À´Ï´Ù. Àç ½ÃÀÛ ÇÏ°íÀÚ ÇÒ ¶§´Â À§¿¡¼ óÀ½ ±âµ¿ÇÒ ¶§ ó·³ /usr/local/Hughes/bin/msql2d & ¸í·ÉÀ¸·Î ½ÃÀÛ ÇØ¾ß ÇÕ´Ï´Ù. <Á¤Áö ȸé> [root@minky bin]# ./msqladmin shutdown Normal Server shutdown! mSQL Daemon Shutdown Complete. [1]+ Done ./msql2d [root@minky bin]# ¡Þ mSQL ¼¹ö Àç ½ÃÀÛ msqladmin reload ¸í·ÉÀ¸·Î mSQL ¼¹ö¸¦ Àç ½ÃÀÛ ½Ãų¼ö ÀÖ½À´Ï´Ù. ¼³Á¤ÆÄÀϵîÀÇ º¯°æÀ¸·Î º¯°æ»çÇ×À» ÀνĽÃÅ°±â À§ÇØ »ç¿ëÇϴµ¥, Àç½ÃÀÛ ±â´ÉÀÌ ¾øÀ¸¸é Á¾·á ½ÃÅ°°í »õ·Î ½ÇÇà½ÃÄÑ ½ÃÀÛ ½ÃÄÑ¾ß Çϳª mSQLÀº Àç½ÃÀÛ ±â´ÉÀ» Á¦°ø ÇϹǷΠ¼Õ½±°Ô ¼³Á¤ »çÇ× º¯°æÀ» ÀνĽÃų¼ö ÀÖ½À´Ï´Ù. msql2d µ¥¸óÀÇ PID¸¦ kill -1 PID³Ñ¹ö Çصµ µ¿ÀÏ ÇÕ´Ï´Ù. ¸¶Ä¡ ¾Æ¹« ¸í·Éµµ ³»¸®Áö ¾ÊÀº °Í ó·³ ¾Æ¹«°Íµµ Ãâ·ÂÇÏÁö ¾Ê½À´Ï´Ù. [root@minky bin]# ./msqladmin reload [root@minky bin]# ¡Þ mSQL ¼¹ö Version ¾Ë¾Æ³»±â. msqladmin version ¸í·ÉÀ¸·Î mSQLÀÇ ¹öÀü°ú »ý¼ºÇÒ ´ç½ÃÀÇ Ä¿³Î ¹öÀü ¹× °¢Á¾ Á¤º¸¸¦ ¾Ë¾Æº¼¼ö ÀÖ½À´Ï´Ù. [root@minky bin]# ./msqladmin version Version Details :- msqladmin version 2.0.11 mSQL server version 2.0.11 mSQL protocol version 23 mSQL connection Localhost via UNIX socket Target platform Linux-2.2.12-20kr-i686 Configuration Details :- Default config file /usr/local/Hughes/msql.conf TCP socket 1114 UNIX socket /usr/local/Hughes/msql2.sock mSQL user msql Admin user root Install directory /usr/local/Hughes PID file location /usr/local/Hughes/msql2d.pid Memory Sync Timer 0 Hostname Lookup True [root@minky bin]# ¡Þ mSQL ¼¹ö »óȲ º¸±â msqladmin stats ¸í·ÉÀ¸·Î ´Ù¾çÇÑ Á¤º¸¸¦ º¼¼ö ÀÖ½À´Ï´Ù. [root@minky bin]# ./msqladmin stats Server Statistics ----------------- Mini SQL Version 2.0.11 Copyright (c) 1993-94 David J. Hughes Copyright (c) 1995-99 Hughes Technologies Pty Ltd. All rights reserved. Config file : /usr/local/Hughes/msql.conf Max connections : 200 Cur connections : 1 Running as user : msql Server uptime : 0 days, 0 hours, 1 mins, 19 secs Connection count : 2 Query count : 0 Connection table : Sock Username Hostname Database Connect Idle Queries +-----+------------+-----------------+------------+---------+------+--------+ | 4 | root | UNIX Sock | No DB | 0H 0M | 0 | 1 | +-----+------------+-----------------+------------+---------+------+--------+ [root@minky bin]# Cur connections ´Â ÇöÀç mSQL ¼¹ö¿¡ Á¢¼ÓµÈ Á¢¼Ó ¼öÀÔ´Ï´Ù. Server uptime Àº Á¾·á, ´Ù¿îµÇÁö ¾Ê°í °è¼Ó Áö¼ÓµÈ ½Ã°£ÀÔ´Ï´Ù. Connection count ´Â Áö±Ý±îÁö Á¢¼ÓµÈ Ƚ¼öÀÔ´Ï´Ù. Query count ´Â Áö±Ý±îÁö ¿ä±¸µÈ ÁúÀÇ È½¼öÀÔ´Ï´Ù. ¡Ý msql.acl ÆÄÀÏ »ý¼º, ¼öÁ¤ msQL¿¡¼ Database ¿¡ Á¢¼Ó, ¼öÁ¤µîÀÇ ±ÇÇÑÀ» ºÎ¿© ÇÏ·Á¸é msql.acl ÆÄÀÏÀ» »ý¼ºÇØ¾ß ÇÕ´Ï´Ù. mSQL¿¡¼ ±âº»ÀûÀ¸·Î ¿¹Á¦ ÆÄÀÏ msql.acl.sampleÀ» Á¦°øÇÕ´Ï´Ù. msql.acl.sample ÆÄÀÏÀ» Âü°í ÇÏ¿© msql.acl ÆÄÀÏÀ» »óȲ ¸Â°Ô »ý¼ºÇÕ´Ï´Ù. ¡Þ msql.acl.sample ÆÄÀÏ ³»¿ë # Access control for mSQL # # Entries are of the form # database=test read=bambi,-root write=root host=* access=local,remote option=rfc931 database=minerva read=* write=minerva access=local ¡Þ msql.acl ÆÄÀÏ »ý¼º msql.acl ÆÄÀÏÀº Databas º°·Î Á¢±ÙÀ» Á¦ÇÑÇϰųª ±ÇÇÑÀ» Á¦¾î ÇÏ´Â ÆÄÀÏÀÔ´Ï´Ù. Á¤»çÇ×ÀÌ ¸î°¡Áö ¾øÀ¸¹Ç·Î, ½±°Ô ÀÌÇØ ÇϽǼö ÀÖ½À´Ï´Ù. database=test read=ÀÐÀ» ±ÇÇÑÀ» ÁÙ User ID write=¾µ ±ÇÇÑÀ» ÁÙ User ID host=Á¢¼ÓÀ» Çã¿ëÇÒ µµ¸ÞÀÎ À̸§ access=[local,remote] À§¿Í °°Àº ¹æ½ÄÀ¸·Î ¼³Á¤µË´Ï´Ù. - database read,write,host,access µîÀÇ ±ÇÇÑ°ú Á¢±ÙÀ» Á¦¾îÇÒ database À̸§À» Àû½À´Ï´Ù. ÇöÀç mSQL ¼¹ö ¾È¿¡ ÀÖ´Â database À̸§À̾î¾ß ÇÕ´Ï´Ù. - read= ÀÐÀ» ±ÇÇÑÀ» ÁÙ User ID¸¦ ÀûÀ¸¸é µË´Ï´Ù. ¿©·¯ IDÀÏ °æ¿ì, À¸·Î ±¸ºÐÇÏ¿© »ç¿ëÇÏ¸é µË´Ï´Ù. ex) read=msql,msql1,msql2 ¶ÇÇÑ -, *À» »ç¿ëÇÒ¼ö ÀÖ½À´Ï´Ù. * Àº ¸ðµÎ¸¦ ³ªÅ¸³»¸ç ¸ðµÎ¿¡°Ô ±ÇÇÑÀ» Áشٴ ¶æÀÔ´Ï´Ù. - User IDÇÏ¸é ±× User ID¸¸ Á¦¿ÜÇÏ°í ¶ó´Â ¶æÀÔ´Ï´Ù. ÀÌ µÎ°¡Áö¸¦ È°¿ëÇÏ¸é ¼±º°ÀûÀÎ ±ÇÇѺο©°¡ °¡´ÉÇØ Áý´Ï´Ù. ¿¹¸¦ µé¾î ¸ðµç »ç¿ëÀÚ¿¡°Ô ÁÙ¶§´Â : read=* , minky »ç¿ëÀÚ¸¦ Á¦¿ÜÇÑ ¸ðµÎ¿¡°Ô : read=*,-minky °°Àº½ÄÀ¸·Î »ç¿ëÇÏ½Ã¸é µË´Ï´Ù. - write= ¾µ ±ÇÇÑÀ» ÁÙ User ID¸¦ ÀûÀ¸¸é µË´Ï´Ù. read¿Í µ¿ÀÏÇÒ Çü½ÄÀ¸·Î ÀûÀ¸¸é µË´Ï´Ù. ¿©±â¼ writeÀÇ Àǹ̿¡´Â ¼öÁ¤, »èÁ¦µµ °¡´ÉÇÏ´Ù´Â ÀÇ¹Ì À̹ǷΠ½ÅÁßÈ÷ ±ÇÇÑÀ» Áֽñ⠹ٶø´Ï´Ù. Âü°í·Î MySQL¿¡¼´Â ¼öÁ¤, »èÁ¦, ¾²±â µîÀÇ º°·Î ±ÇÇÑ ºÎ¿©°¡ °¡´É ÇÕ´Ï´Ù. - host Á¢¼ÓÀ» Çã¶ôÇÒ µµ¸ÞÀÎ À̸§À» Àû½À´Ï´Ù. °èÁ¤¿¡°Ô ±ÇÇÑÀ» ÁÙ¶§ ó·³ * °ú - ¸¦ »ç¿ëÇÒ¼ö ÀÖ½À´Ï´Ù. - access=[local,remote] local, remote, µÑ´Ù ȤÀº Çϳª¸¸ »ç¿ëÇÒ¼ö ÀÖ½À´Ï´Ù. localÀº ³»ºÎ Á¢¼Ó¸¸À» Çã¿ëÇÑ´Ù´Â ¶æÀÌ°í, remote´Â ¿ÜºÎ, ¿ø°Ý Á¢¼ÓÀ» Çã¶ôÇÑ´Ù´Â ÀǹÌÀÔ´Ï´Ù. µÑ´Ù Àû°Å³ª »ý·«µÇ¸é ¸ðµÎ¿¡°Ô Çã¿ëµÈ´Ù´Â ¶æÀÔ´Ï´Ù. ±×·¯¸é ³»ºÎ, ¿ÜºÎ¿¡°Ôµµ Á¢¼ÓÀ» Çã¿ëÇÏÁö ¾Ê°í ½ÍÀ»¶§´Â? ±×·²¶§´Â msql µ¥¸óÀ» Á¾·á ½ÃÅ°½Ã±â ¹Ù¶ø´Ï´Ù. ¡Ý msql msqlÀº mSQL¼¹ö¿¡°Ô mSQL¿¡¼ Áö¿øÇÏ´Â SQL¸í·ÉÀ» ÀÌ¿ëÇÒ¼ö ÀÖ°Ô ÇØÁִ Ŭ¶óÀ̾ðÆ® ÇÁ·Î±×·¥À̶ó°í »ý°¢ÇÏ½Ã¸é µË´Ï´Ù. -f , -h : conf ÆÄÀÏ°ú, ¿ø°Ý È£½ºÆ®¸¦ Á¤ÇÒ¼ö ÀÖ´Â ¿É¼ÇÀÔ´Ï´Ù. database : ÀÛ¾÷ÇÒ DatabaseÀ̸§À» Àû½À´Ï´Ù. ¡Þ ¸í·É¾î »ç¿ë¹ý \q : msql ÇÁ·Î±×·¥À» Á¾·á ÇÒ ¶§ »ç¿ëÇÕ´Ï´Ù. \g : ÀÔ·ÂÇÑ SQL ¹®ÀåÀ» ½ÇÇàÇÒ ¶§ »ç¿ëÇÕ´Ï´Ù. ´Ù¸¥ SQLÀº ;¸¦ »ç¿ëÇϴµ¥ msqlÀº \g ¸¸À» »ç¿ëÇÑ´Ù´Â °Í¿¡ À¯ÀÇ ÇϽñ⠹ٶø´Ï´Ù. \e : ¿¡µðÅÍ·Î SQL¹®ÀåÀ» ÀÔ·Â, ¼öÁ¤ ÇÕ´Ï´Ù. ±âº»À¸·Î VI ÆíÁý±â°¡ »ç¿ëµË´Ï´Ù. \p : SQL ¹®Àå ÀÔ·ÂÈÄ ½ÇÇàȸéÀ» Ç¥½ÃÇÕ´Ï´Ù. ±âº»ÀûÀ¸·Î \g¿Í °°ÀÌ ¸¹ÀÌ »ç¿ëµË´Ï´Ù. msql ½ÃÀÛ È¸é. Help È¸é ¡Þ ±×·¯³ª ²À msql¿¡¼ SQL¹®À» ÀÔ·ÂÇÒ ÇÊ¿ä°¡ ¾ø°í, SQL¹®À» ÀÔ·ÂÇÑ text ÆÄÀÏ À» ÀÔ·Â ½Ãų¼ö ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¾î sql.txt ¿¡ ÀÛ¾÷ÇÒ SQL¹®À» ÀÔ·ÂÇß´Ù¸é msql test < sql.txt ÀÌ·±½ÄÀ¸·Îµµ »ç¿ëÇϽǼö ÀÖ½À´Ï´Ù. ¡Ý mSQL ±âŸ À¯Æ¿¸®Æ¼. ¡Þ relshow relshow´Â Database¸ñ·ÏÀ» º¸¿©Áְųª, Database¾ÈÀÇ Å×À̺íµé, Å×À̺í¾ÈÀÇ ÀÚ·á ÇüµéÀ» º¸¿© ÁÙ ¶§ »ç¿ëÇÕ´Ï´Ù. relshow ±×³É relshow¸¦ ½ÇÇà ½ÃÅ°¸é Database ¸ñ·ÏÀ» º¸¿© ÁÝ´Ï´Ù. relshow Database¸í ÀÎÀÚ·Î Database¸íÀ» ÁÖ¸é ±× Database ¾ÈÀÇ Å×ÀÌºí µéÀ» º¸¿© ÁÝ´Ï´Ù. relshow Database¸í Table¸í Database¸í°ú Table¸íÀ» ÀÎÀÚ·Î ÁÖ°í ½ÇÇà ½ÃÅ°¸é ÇØ´ç Database ¾ÈÀÇ Å×À̺íÀÇ ÀÚ·áÇü ¹× Å×ÀÌºí ±¸Á¶¸¦ º¸¿© ÁÝ´Ï´Ù. relshow Database¸í Table¸í Index¸í Database¸í, Table¸í, Index¸íÀ» ÀÎÀÚ·Î ½ÇÇà½ÃÅ°¸é ±× ÇØ´ç IndexÀÇ »óŸ¦ º¸¿© ÁÝ´Ï´Ù. ¡Þ msqldump msqldump´Â Database³ª TableÀÇ ÀÚ·á,±¸Á¶¸¦ SQL¹®À¸·Î ¹Ù·Î »ç¿ëµÉ¼ö ÀÖµµ·Ï Ãâ·ÂÇØÁÖ´Â À¯Æ¿¸®Æ¼ÀÔ´Ï´Ù. ¹é¾÷ ¿ëµµ³ª ´Ù¸¥ °÷À¸·Î À̽ĵîÀÇ ¸ñÀûÀ¸·Î »ç¿ëµÉ¼ö ÀÖÀ¸¸ç, ±×¿Ü¿¡µµ mSQLÀº alter ¸í·ÉÀ» Áö¿øÇÏÁö ¾ÊÀ¸¹Ç·Î ¼öµ¿À¸·Î Å×ÀÌºí ±¸Á¶µîÀ» º¯°æÇÒ ¶§ »ç¿ëÇÕ´Ï´Ù. ±×³É msqldump ¸¦ ½ÇÇàÇÏ¸é ¸¹Àº ¿É¼ÇÀÌ ³ªÅ¸³³´Ï´Ù. -h host , -f conf : ´Ù¸¥ mSQL ÇÁ·Î±×·¥°ú µ¿ÀÏÇÕ´Ï´Ù. -v : ÀÛ¾÷ ÁøÇà »çÇ×µî Á¤º¸¸¦ º¸¿© ÁÖ´Â ¿É¼ÇÀÔ´Ï´Ù. -t : ÀÚ·á´Â Dump ÇÏÁö ¾Ê°í Table ±¸Á¶¸¸ Ãâ·ÂÇÕ´Ï´Ù. -c : ÀڷḦ Dump ÇÒ ¶§´Â Insert¹®À¸·Î ¹Þ½À´Ï´Ù. À̶§ -c ¿É¼ÇÀ» »ç¿ëÇÏ¸é ¿À̸§±îÁö ´Ù »ç¿ëÇÏ¿© Ãâ·Â ÇÕ´Ï´Ù. -w :SQL ¹®¹ýÁß where¹® ¾ç½ÄÀ» -w °ú °°ÀÌ »ç¿ëÇϸé ÇØ´ç µÇ´Â ÀڷḸ Dump ÇÕ ´Ï´Ù. database : Database À̸§À» ÀûÀ¸¸é ±× Database Àüü¸¦ Dump ÇÕ´Ï´Ù. database table : Database ¾ÈÀÇ ÀûÀº Table¸¸ Dump ÇÕ´Ï´Ù. ¡Þ msqlimport/ msqlexport msqlimport ¿Í msqlexport ´Â Database³ª Å×À̺íÀ» ÁöÁ¤ÇÑ ±¸ºÐÀÚÀ» ÀÌ¿ëÇÏ¿© ÅؽºÆ® ÆÄÀÏ·Î ÀúÀå, ȤÀº ÅؽºÆ® ÆÄÀÏÀ» Å×À̺í·Î º¯È¯ÇØ ÁÖ´Â °ÍÀ» ÀÇ¹Ì ÇÕ´Ï´Ù. À̸¦ Àß ÀÌ¿ëÇϸé mSQL Database¸¦ Excell °°Àº ÇÁ·Î±×·¥¿¡¼µµ ÀÐÀ»¼ö ÀÖ½À´Ï´Ù. Excell ¿¡¼´Â , ·Î ±¸ºÐÇÑ csv ÆÄÀÏÀ» Áö¿øÇϱ⠶§¹®¿¡ ±¸ºÐÀÚ¸¦ , ·Î ÁöÁ¤ÇÑ´Ù¸é Excell ¿¡¼µµ ÀÐÀ»¼ö ÀÖ½À´Ï´Ù. ¡Þ ±×¿Ü¿¡ À¥¿ë ½ºÅ©¸³Æ® ¾ð¾î·Î »ç¿ëµÇ´Â w3-msql °ú Áö¿ø ¾ð¾î lite , ÀÎÁõ¿¡ »ç¿ëµÇ´Â w3-auth µîÀÌ ÀÖÀ¸³ª ¿ä±Ù·¡ »ç¿ëµÇÁö ¾Ê´Â Ãß¼¼ ÀÌ°í ´Ù¸¥ ¹®¼¿¡µµ À̺κÐÀº ÀÖÀ¸¹Ç·Î, ¼³¸íÀ» µû·Î ÇÏÁö ¾Ê°Ú½À´Ï´Ù. 9. mSQL ÀÚ·áÇü ¹× SQL ¸í·É ÀÌÁ¦ À§¿¡¼ ¼³Ä¡ÇÑ mSQL ¼¹ö¸¦ »ç¿ëÇϱâ À§ÇØ SQL ¹®¹ýÀ» ¹è¿ó´Ï´Ù. ¿©±â¼ ¿©·¯ºÐ¿¡°Ô ¸ðµç SQLÀ» °¡¸£Ä¡·Á°í ÇÏ´Â °ÍÀÌ ¾Æ´Õ´Ï´Ù. ¾î·Æ°Ô¸¸ ´À²¸Áö´Â SQLÀÌ ¾î¶² ÇÁ·Î±×·¡¹Ö ¾ð¾îº¸´Ùµµ ½±´Ù´Â °ÍÀ» ¸»Çϱâ À§ÇÔÀÔ´Ï´Ù. µû¶ó¼ ±âº»ÀûÀÎ ¹®¹ý¸¸À» ¹è¿ö º¸µµ·Ï Çϸç, Á»´õ ½Éµµ ÀÖ°Ô °øºÎÇÏ°íÀÚ ÇÑ´Ù¸é °ü·Ã Àü¹® ¼ÀûÀ» Âü°íÇϽñ⠹ٶø´Ï´Ù. SQL ¾ð¾îÀÇ Æ¯¼º´ë·Î ¾î¶»°Ô µ¥ÀÌÅ͸¦ ´Ù·ç´À³Ä º¸´Ù´Â ¾î¶² µ¥ÀÌÅ͸¦ ´Ù·ç´À³Ä°¡ Áß¿äÇÑ ¾ð¾îÀÔ´Ï´Ù. ÀÏ¹Ý ÇÁ·Î±×·¡¹Ö ¾ð¾î¸¦ ´Ù·çµíÀÌ »ý°¢ ÇÏÁö ¸»°í ±¸¹® Çϳª Çϳª¸¦ ¿Ü¿ì±â¸¸ Çصµ ¹Ù·Î »ç¿ëÇÒ¼ö ÀÖ´Â ¾ÆÁÖ ½¬¿î °ü°èÇü Database °ü¸® ¾ð¾îÀÔ´Ï´Ù. SQLÀº SQL¸í·É¾î ..... ; ÇüÅ·ΠÀÌ·ç¾î Áý´Ï´Ù. ¸ðµç SQL¹®ÀåÀº ³¡¿¡ ;¸¦ »ç¿ëÇÏ¿© SQL¹®ÀÇ ³¡À» ¾Ë¸³´Ï´Ù. mSQL¿¡¼´Â ; ´ë½Å \g¸¦ ÀÌ¿ëÇÕ´Ï´Ù. - Table »ý¼º °ü°èÇü Database (RDB)¿¡¼´Â ¸ðµç ÀڷḦ 2Â÷¿øÀÇ Ç¥·Î, Áï Table·Î °ü¸® ÇÕ´Ï´Ù´Ù. Microsoft»çÀÇ Excell À̳ª Lotus-123 ¿Í °°Àº ½ºÇÁ·¹ ½¬Æ®¸¦ »ý°¢ÇÏ½Ã¸é ½±½À´Ï´Ù. ÀÌ Table¸¦ »ç¿ëÇϱâ À§Çؼ´Â »ç¿ëÀÚ°¡ ¹Ì¸® TableÀ» ¸¸µé¾î Áà¾ß ÇÕ´Ï´Ù. ´ÙÀ½°ú °°Àº ¹®¹ýÀ¸·Î ¸¸µé ¼ö ÀÖ½À´Ï´Ù. ¡Ý CREATE CREATE TABLE »ý¼ºÇÒTABLE¸í ( ¿(æê)À̸§ ÀÚ·áÇü, ¿À̸§ ÀÚ·áÇü, ¿À̸§ ÀÚ·áÇü, .......... ¿À̸§ ÀÚ·áÇü )\g À§¿¡¼ ¿Àº ¿µ¾î·Î row°¡ ¾Æ´Ñ columnÀÇ ÀǹÌÀÔ´Ï´Ù. ÇϳªÀÇ ¼±¾ðÀÌ ³¡³ª¸é , Ç¥¸¦ ²À ÇØÁÖ¾î¼ ±¸ºÐÀ» ÇØÁà¾ß Çϸç, ¸¶Áö¸·¿¡´Â ÀûÁö ¾Ê¾Æ¾ß ÇÕ´Ï´Ù. ¡Ý Database, Table, ¿ À̸§ ±ÔÄ¢. »ç½Ç ¾Æ¹«·¸°Ô³ª Database, Table, ¿ À̸§À» ÁöÀ»¼ö ÀÖ´Ù¸é ¾î¼¸é »ó´çÈ÷ È¥¶õ ½º·¯¿ï¼öµµ ÀÖ½À´Ï´Ù. ¿©±â ¾Æ·¡¿Í °°ÀÌ SQL¿¡´Â Database, Table, ¿ À̸§À» »ç¿ëÇÏ´Â ±ÔÄ¢ÀÌ ÀÖ½À´Ï´Ù. Ç¥ÁØ SQLÀ» ±âÁØÀ¸·Î ¼³¸í ÇÏ°Ú½À´Ï´Ù. 1) 32ÀÚ¸¦ ÃÊ°úÇÒ¼ö ¾ø´Ù - RDBMS Á¾·ù¿¡ µû¶ó Ʋ¸³´Ï´Ù. Âü°í·Î MySQLÀº 64ÀÚ±îÁöÀÔ´Ï´Ù. (´Ü Database À̸§Àº 32ÀÚ ±îÁöÀÔ´Ï´Ù.) 2) À¯ÀÏÇØ¾ß ÇÑ´Ù. - µ¿ÀÏÇÑ À̸§ÀÇ Database, Table, ¿ À̸§ÀÌ °°ÀÌ Á¸Àç ÇÒ¼ö ¾ø½À´Ï´Ù. ¿¹¸¦ µé¾î test ¶ó´Â Database°¡ Àִµ¥ ¶Ç test¶ó´Â Database´Â ¸¸µé ¼ö ¾ø½À´Ï´Ù. ¶ÇÇÑ test ¶ó´Â TableÀÌ °°Àº Database¾È¿¡ Àִµ¥ ¶Ç test¶ó´Â À̸§ÀÇ TableÀ» ¸¸µé ¼ö ¾ø½À´Ï´Ù. ±×·¯³ª test ¶ó´Â Database¾È¿¡ test¶ó´Â TableÀº »ý¼º °¡´ÉÇÕ´Ï´Ù. °°Àº Database, Table, ¿ À̸§¿¡¼¸¸ °°Àº À̸§ÀÌ Á¸Àç ÇÒ¼ö ¾ø´Â °ÍÀÔ´Ï´Ù. 3) À̸§ÀÇ Ã¹±ÛÀÚ´Â ¿µ¹®ÀÚ ¾ËÆĺªÀ̾î¾ß ÇÑ´Ù. - MySQL¿¡¼´Â Á¶±Ý Ʋ¸³´Ï´Ù. ù¹®ÀÚ¿¡¼µµ ¼ýÀÚ¸¦ »ç¿ëÇÒ¼öµµ ÀÖ½À´Ï´Ù. 4) À̸§¿¡´Â ¼ýÀÚ _, #, $,Q¿Í °°Àº ±âÈ£µéÀ» »ç¿ëÇÒ¼ö ÀÖ´Ù. - / °ú .À» Á¦¿ÜÇÑ ¹®ÀÚ¸¦ »ç¿ëÇÒ¼ö ¾ø½À´Ï´Ù. 5) SQLÀÇ ¸í·É¾î ÇÔ¼ö¸íÀÌ µÉ¼ö ¾ø´Ù. Ex) SELECT, CREATE - ´ç¿¬È÷ SQL¿¡¼ ¹Ì¸® »ç¿ëÇÏ´Â ¸í·É¾î, ÇÔ¼ö¸íµîÀº »ç¿ëÇÒ¼ö ¾ø½À´Ï´Ù. ¡Ý °£´ÜÇÑ Å×ÀÌºí »ý¼º ¿¹Á¦ ÀÏ´Ü °£´ÜÇÏ°Ô Å×À̺í Çϳª¸¦ ¼³°è Çغ¸µµ·Ï ÇÏ°Ú½À´Ï´Ù. »ç¶÷µéÀÇ ID ¿Í À̸§, ³ªÀ̸¦ ÀúÀåÇÏ´Â Å×À̺íÀ» ¸¸µé°Ú½À´Ï´Ù. ¿ À̸§Àº ½±°Ô ¾Ë¼ö ÀÖµµ·Ï ID : user_id, À̸§ : user_name, ³ªÀÌ : user_age ÀÌ·±½ÄÀ¸·Î °áÁ¤ÇÏ°Ú½À´Ï ´Ù. ±æÀÌ¿Í ¿ëµµ¿¡ ¸Â°Ô ÀÚ·áÇüÀ» varchar(8), varchar(10), int ·Î °áÁ¤ÇÏ¸é ´ÙÀ½°ú °°Àº Çü½ÄÀ¸·Î ¸¸µé ¼ö ÀÖ½À´Ï´Ù. CREATE TABLE user ( user_id varchar(8), user_name varchar(10), user_age int ) À§ ó·³ ´Ù ÀÔ·ÂÇÏ°í \g¸¦ ÀÔ·ÂÇÏ°í ¸¦ Ä¡¸é Query OK. °¡ ¶³¾îÁö¸é¼ Á¤»ó ½ÇÇàµÇ¾úÀ½À» ¾Ë·Á ÁÝ´Ï´Ù. À§¸í·ÉÀ¸·Î »õ·Î¿î Ç¥ÀÇ Á¦¸ñÀ» Á¤Çß´Ù°í º¸½Ã¸é µË´Ï´Ù. ¡Ý Table º¯°æ. Table ±¸Á¶´Â óÀ½¿¡ ¼³°è¸¦ ÀßÇÏ¿©¾ß ÇÕ´Ï´Ù. ¾ÕÀ¸·ÎÀÇ È®Àåµµ ¿¹ÃøÀ» ÇÏ¿© ¿©À¯·Ó°Ô ÀÛ¼ºÇÏ´Â °ÍÀÌ ÁÁ½À´Ï´Ù. ÇÏÁö¸¸ Table »ý¼ºÀ» À߸ø ÇÏ¿´°Å³ª, ¿À» Çϳª ´õ Ãß°¡ ÇØ¾ß ÇÒ °æ¿ì°¡ ÀÏ¾î ³¯¼öµµ ÀÖ½À´Ï´Ù. ÀÌ·²°æ¿ì¿¡ ALTER ¸í·É µîÀ» ÀÌ¿ëÇÏ¿© ¼öÁ¤ÇÏ¿©¾ß Çϳª, mSQL¿¡¼´Â ALTER ¸í·É°°Àº Table ±¸Á¶¸¦ º¯°æÇÏ´Â ¸í·ÉÀ» Áö¿øÇÏÁö ¾Ê½À´Ï´Ù. µû¶ó¼ ±âÁ¸ÀÇ TableÀڷḦ Dump µîÀ¸·Î ¹ÞÀºÈÄ ÇÁ·Î±×·¥À» ÀÛ¼ºÇϰųª ¼öµ¿À¸·Î ÀÛ¾÷À» Çϼż ¼öÁ¤ ÈÄ ´Ù½Ã Insert ¸¦ ÇØ¾ß ÇÕ´Ï´Ù. ¡Ý ÀÚ·áÇü À§¿¡¼ ¿ÀÇ ÇüÅÂ¿Í Á¾·ù¸¦ ÁöÁ¤ÇÒ ¶§ »ç¿ëÇÏ´Â ÀÚ·áÇü¿¡ ´ëÇؼ ¾Ë¾Æ º¸°Ú½À´Ï´Ù. Database°¡ ÀÚ·áÀÇ Á¤È®ÇÑ Ã³¸®¸¦ ¸ñÇ¥·Î ÇÏ´Â ¸¸Å »ó´çÈ÷ ¸¹Àº ÀÚ·áÇüÀÌ ÀÖ½À´Ï´Ù. Perl °°Àº ÀϺΠÇÁ·Î±×·¡¹Ö ¾ð¾î´Â ÀÚ·áÇüÀ» ÁöÁ¤ÇÏÁö ¾Ê°í ¾Ë¾Æ¼ ÆÇ´ÜÇÏ¿© »ç¿ëÇϳª, Database¿¡¼´Â Á¤È®ÇÑ Ã³¸®¸¦ À§Çؼ ¾Ë¾Æ¼ Áö¿øÇÏÁö ¾Ê°í, »ç¿ëÀÚ°¡ ÀÏÀÏÀÌ »ç¿ëÇØ¾ß ÇÕ´Ï´Ù. C¾ð¾îµî ¿¡¼ º¯¼ö¸¦ ¼±¾ðÇÒ ¶§ »ç¿ëÇÏ´Â ÀÚ·áÇü°ú °ÅÀÇ ºñ½ÁÇÏ´Ù°í º¸½Ã¸é µË´Ï´Ù. ÀÚ·áÇüÀ» Å©°Ô ¼º°Ý¿¡ µû¶ó ¹®ÀÚÇü, ¼ýÀÚÇü, Ư¼öÇüÀ¸·Î ±¸ºÐÇÏ¿´½À´Ï´Ù. ¡Ý ¹®ÀÚÇü ¡Þ CHAR - ¹®ÀÚ¸¦ ÀúÀåÇÒ¶§ »ç¿ëÇÕ´Ï´Ù. CHAR(¼ýÀÚ) - ¼ýÀÚ´Â Å©±âÀ̸ç 255±îÁö »ç¿ëÇÒ¼ö ÀÖÀ¸¸ç ¼ýÀÚ¸¦ ÁöÁ¤ÇÏÁö ¾ÊÀ¸¸é 1ÀÚ·Î ÀνÄÇÕ´Ï´Ù. Ex) CHAR(10) - 10ÀÚ·Î ÁöÁ¤. Ex) CHAR() - 1ÀÚ·Î ÁöÁ¤. mSQL¿¡¼´Â ÃÖ´ë 2147483647±îÁö ±æÀ̸¦ ÁöÁ¤ÇÒ¼ö ÀÖ½À´Ï´Ù. ¡Þ TEXT ±¤¹üÀ§ÇÑ ±æÀÌÀÇ ¹®ÀÚ¸¦ Áö¿øÇÒ ¶§ »ç¿ë ÇÕ´Ï´Ù. CHARÇü¿¡ ºñÇØ ¼Óµµ°¡ ´À¸®¸ç, À妽º °Ë»ö, LIKE ¿É¼ÇµîÀ» Áö¿øÇÏÁö ¾Ê½À´Ï´Ù. ¡Ý ¼ýÀÚÇü ¡Þ INT Á¤¼ö¸¦ ÀúÀåÇϴµ¥ ¾²ÀÔ´Ï´Ù. ¡Þ REAL Á¤¼ö°¡ ¾Æ´Ñ ½Ç¼ö¸¦ ³ªÅ¸³¾ ¶§ »ç¿ëÇÕ´Ï´Ù. ¡Ý Ư¼öÇü ¹®ÀÚÇü°ú ¼ýÀÚ¸¦ ³ªÅ¸³»´Â ÀÚ·áÇü ¸»°íµµ ³¯Â¥, ½Ã°£, ÈÆóÀÇ Å©±â¸¦ ³ªÅ¸³»´Â ´ÜÀ§µéµµ ÀÖ½À´Ï´Ù. ¡Þ DATE ÀÏ-´Þ-4ÀÚ¸®¼ö¿¬µµ ¾ç½ÄÀ» »ç¿ëÇÕ´Ï´Ù. ¿¹¸¦ µé¾î 1999³â 11¿ù 24ÀÏÀ» ÀúÀåÇÒ ¶§ 24-11-1999 ó·³ »ç¿ëÇÕ´Ï´Ù. mSQL ¿¡¼´Â 1997³â 1¿ù 1ÀÏ ÀÏ °æ¿ì¿¡´Â 1-Jan-1997 °ú °°ÀÌ ´ÞÀº ¿µ¹® À̴ϼȷΠ³ªÅ¸ ³»¾î »ç¿ëÇÕ´Ï´Ù. ¡Þ TIME - ½Ã:ºÐ:ÃÊ Çü½ÄÀÇ ½Ã°£À» »ç¿ëÇÕ´Ï´Ù. ¿¹¸¦ µé¾î ¿ÀÈÄ 3½Ã 10ºÐ 27ÃÊ ´Â 15:10:27 ó·³ ³ªÅ¸³»¾î Áý´Ï´Ù. ¡Þ Money ¼Ò¼öÁ¡ ¾Æ·¡ µÑ° Â¥¸®±îÁö ó¸®ÇÏ´Â ÇüÀÔ´Ï´Ù. ¸¹ÀÌ »ç¿ëÇÏ´Â ÈÆóÀÎ ´Þ·¯, ¼¾Æ®µîÀ» À§ÇØ ¸¸µé¾îÁø ÇÔ¼öÀÔ´Ï´Ù. ¿¹¸¦ µé¾î $1.00 , $750.25´Â 1.00 , 750.25 µîÀ¸·Î ÀúÀåµË´Ï´Ù. ¡Ý Table¿¡ ÀڷḦ »ðÀÔÇÏ´Â INSERT ¡Þ Çü½Ä INSERT INTO TableÀ̸§ ( ¿ À̸§1, ¿ À̸§2, ... ) VALUES ( ¿1 °ª, ¿2 °ª, ... )\g À§¿Í °°Àº Çü½ÄÀ¸·Î ÀڷḦ »ðÀÔÇÕ´Ï´Ù. ²À 2ÁÙ¿¡ ¾µ ÇÊ¿ä´Â ¾ø½À´Ï´Ù. ÆíÀǸ¦ À§Çؼ À§¿¡´Â 2ÁÙ·Î ³ªÅ¸³»¾úÀ¸³ª ¸îÁÙ·Î ³ª´©¾î ½áµµ µÇ°í, ÇÑÁÙ·Î »ç¿ëÇÏ¿©µµ ¶È°°½À´Ï´Ù. À§¿¡¼ ( ¿ À̸§1, ¿ À̸§2, ... )À» »ý·« ÇÒ¼öµµ Àִµ¥ »ý·« Çϸé Table ±¸Á¶ ´ë·Î ¼ø¼´ë·Î µé¾î »ðÀԵ˴ϴÙ. »ý·«ÇÑ°Ô ¾Æ´Ï¶ó¸é ÁöÁ¤ÇÑ ¿À̸§¿¡ ÁöÁ¤ÇÑ °ªÀÌ »ðÀԵ˴ϴÙ. Ex) INSERT INTO user ( user_id , user_ name, user_age ) VALUES ( 'msql', 'Anony', 24 )\g VALUES °ªÀ» ÀûÀ»¶§ ¼ýÀÚ¸¦ Á¦¿ÜÇÏ°í´Â ÀüºÎ '¸¦ ½ÎÁà¾ß ÇÕ´Ï´Ù. »ý¼ºÇÒ¶§ ¼±¾ðµÈ ÀÚ·áÇü°ú´Â ´Ù¸¥ ÇüÅÂÀÇ ÀڷḦ ½áÁÖ¸é »ðÀÔµÇÁö ¾Ê½À´Ï´Ù. ¿¹¸¦ µé¾î ¼ýÀÚÇüÀ¸·Î ¼±¾ðÇÑ ¿¿¡ ¹®ÀÚ¸¦ »ðÀÔÇÏ·Á°í ÇÏ¸é ¿¡·¯°¡ ³³´Ï´Ù. »ý¼ºÇÒ¶§ ¼±¾ðµÈ ÀÚ·áÇüÀÇ Å©±âº¸´Ù Å« °ªÀ» ½áÁÖ¸é »ðÀÔÀÌ µÇÁö ¾Ê½À´Ï´Ù. ÀÌó·³ »ðÀÔµÈ Data´Â »õ·Î¿î ¿·Î Ãß°¡µÇ¾î Table·Î °ü¸® µÇ°Ô µË´Ï´Ù. ¡Ý SQLÀÇ Á¤¼ö SELECT ¡Þ SQL¿¡¼ °¡Àå ¸¹ÀÌ »ç¿ëµÇ´Â Keyword SELECT ÁÖ¾îÁø Á¶°Ç¿¡ µû¶ó °Ë»öÇÏ´Â ¸í·É¾îÀÔ´Ï´Ù. SQLÀÇ Áø°¡´Â ÀÌ SELECT¹®¿¡¼ ³ªÅ¸³´Ù°íµµ ÇÒ¼ö ÀÖ°Ú½À´Ï´Ù. Çü½Ä : SELECT ¿À̸§ FROM Å×À̺í¸í [WHERE Á¶°Ç] [ORDER BY ¿À̸§ ¹è¿¹æ¹ý]\g À§¿Í °°Àº Çü½ÄÀ¸·Î »ç¿ëµÇ¸ç Àüü À̸§À» °Ë»öÇÏ°íÀÚ ÇÒ¶§´Â ¿À̸§¿¡ * Ç¥½Ã ¸¦ »ç¿ëÇÕ´Ï´Ù. ¡Þ Example user Å×À̺íÀÇ ¸ðµç ¿ °Ë»ö. - select * from user \g user Å×À̺íÀÇ user_id ¿ °Ë»ö. - select user_id from user \g user Å×À̺íÀÇ user_id¿Í user_age ¿ °Ë»ö. - select user_id, user_age from user \g ¡Þ ORDER BY ¿À̸§ ¹è¿¹æ¹ý Á¤·Ä ÇÏ´Â ±âÁØÀÌ µÇ´Â ¿À̸§ °ú ¹è¿¹æ¹ý ÁöÁ¤ÇÕ´Ï´Ù. userÅ×À̺íÀÇ ¸ðµç ¿À» °Ë»öÇϴµ¥ user_id¸¦ ¿ª¼ø(³»¸²Â÷¼ø)À¸·Î °Ë»ö - select * from user ORDER BY user_id DESC\g ¼ø¼´ë·Î(¿À¸§Â÷¼ø) °Ë»öÀº ORDRE BY ¿À̸§ ASC ·Î »ç¿ëÇϰųª ASC¸¦ »ý·«ÇÏ¿© »ç¿ëÇÕ´Ï´Ù. - select * from user ORDER BY user_id DESC \g - select * from user ORDER BY user_id \g ¡Ý Á¶°Ç°ú ³í¸®¿¬»ê ¡Þ [WHERE Á¶°Ç] À§¿¡¼ SELECT¸¦ ´Üµ¶À¸·Î ¾µ°æ¿ì¿¡´Â ¸ðµç µ¥ÀÌÅ͸¦ °¡Á® ¿À¹Ç·Î ±×·¸°Ô Àǹ̰¡ Å©°Ô ¾ø½À´Ï´Ù. ¿øÇÏ´Â µ¥ÀÌÅÍ´Â ÇϳªÀÎ »óȲÀ̶ó¸é, ¾Æ´Ï¸é ¿øÇÏ´Â Á¶°ÇÀÇ µ¥ÀÌÅ͵鸸À» ¿øÇÑ´Ù¸é ÀÌ·² ¶§ ÇÊ¿äÇÑ °ÍÀÌ Á¶°Ç±¸¹®À̸ç WHERE¸¦ ÀÌ¿ëÇÏ¿© »ç¿ëÇÕ´Ï´Ù. Çü½Ä : WHERE ¿À̸§ ¿¬»êÀÚ µ¥ÀÌÅÍ »ç¿ë°¡´É ¿¬»êÀÚ <, >, =, <=, >=, <>, like, rlike, clike, .... µîÀ» »ç¿ëÇÒ¼ö ÀÖ½À´Ï´Ù. <, >, =, <=, >=, <> ´Â ÀÏ¹Ý ÀûÀÎ ºñ±³ °³³ä°ú °°À¸¸ç, like, rlike, clike µîÀº È®ÀåµÈ ºñ±³¿¡ »ç¿ëµË´Ï´Ù. Example userÅ×ÀÌºí¿¡¼ user_id°¡ msqlÀÎ »ç¶÷¸¸ °Ë»ö - select * from user WHERE user_id = 'msql' \g userÅ×ÀÌºí¿¡¼ ³ªÀÌ(user_age) °¡ 25 ÀÌ»óÀÎ »ç¶÷¸¸ °Ë»ö - select * from user WHERE user_age >= 25 \g ¡Þ AND, OR 2°¡Áö ÀÌ»ó Á¶°ÇÀ» º¹ÇÕ °Ë»ö, °áÇÕµîÀ» ÇØ¾ß ÇÒ ¶§ »ç¿ëµË´Ï´Ù. AND : ~ ÀÌ°í OR : ȤÀº À§¿Í °°Àº ¶æÀ¸·Î Á¶°Ç¿¡¼µµ »ç¿ëµË´Ï´Ù. WHERE Á¶°Ç A AND Á¶°Ç B - Á¶°Ç A ¿¡ ¸¸Á·ÇÏ¸é¼ Á¶°Ç B¿¡ ¸¸Á·ÇÏ´Â ÀڷḦ ¾ò°í ½ÍÀ»¶§... WHERE Á¶°Ç A OR Á¶°Ç B - Á¶°Ç A ¿Í Á¶°Ç B¿¡ ¸¸Á·ÇÏ´Â ÀڷḦ ¾ò°í ½ÍÀ»¶§.. Example userÅ×ÀÌºí¿¡¼ À̸§ÀÌ È«±æµ¿ ÀÌ°í user_id°¡ msql ÀÎ »ç¶÷¸¸ °Ë»ö. - select * from user WHERE user_name = 'È«±æµ¿' AND user_id = 'msql'; userÅ×ÀÌºí¿¡¼ À̸§ÀÌ È«±æµ¿ ÀÌ°í user_id°¡ msql ÀÎ »ç¶÷ °Ë»ö - select * from user WHERE user_name = 'È«±æµ¿' OR user_id = 'msql'; ¡Þ LIKE¿¬»êÀÚ ¿ÏÀüÈ÷ ¶È°°Áö °°Áö ¾Ê°í ¿øÇÏ´Â ¹®ÀÚ¿À» Æ÷ÇÔÇÑ, ÀϺΠÀÏÄ¡ÇÏ´Â Data¸¦ ¾ò°í ½ÍÀ» ¶§ »ç¿ëµÇ´Â ¿¬»êÀÚÀÔ´Ï´Ù. ¿¹¸¦ µé¾î À§ÀÇ °Ë»ö ¹æ¹ýÀ¸·Î´Â À̸§ÀÌ È«±æµ¿ÀÎ »ç¶÷Àº ãÀ»¼ö ÀÖÁö¸¸ È«¾¾ÀÎ »ç¶÷µé¸¸ ã´Â ´Ù´ÂÁö, À̸§¿¡ ±èÀÌ µé¾î°£ »ç¶÷µéÀ» ã´Â ´Ù´ÂÁö´Â ºÒ°¡´É ÇÕ´Ï´Ù. À̸¦ °¡´ÉÇÏ°Ô ÇØÁÖ´Â °ÍÀÌ LIKE¿¬»êÀÚÀÔ´Ï´Ù. ±âÃÊÀûÀ¸·Î ½±°Ô »ç¿ëÇÒ¼ö ÀÖ´Â ºÎºÐ¸¸ ¾Ë¾Æ º¸°Ú½À´Ï´Ù. ¿¬»êÀÚ : _ - ÇϳªÀÌ»óÀÇ ±ÛÀÚ°¡ ÀÏÄ¡ÇÔ % - ¸ðµç¹®ÀÚ \ - Ưº°ÇÑ ¹®ÀÚ¸¦ Á¦¿ÜÇÔ Example userÅ×ÀÌºí¿¡¼ À̸§Áß¿¡ À̾¾ÀÎ »ç¶÷µé¸¸ °Ë»ö. - select * from user WHERE user_name like 'ÀÌ%'; userÅ×ÀÌºí¿¡¼ id¿¡ ql°¡ µé¾î°¡´Â »ç¶÷µé¸¸ °Ë»ö. - select * from user WHERE user_id like '%ql%'; ¡Ý Data ¼öÁ¤ Data¸¦ ÇÊ¿ä¿¡ µû¶ó ¼öÁ¤ÇØ¾ß ÇÒ ¶§´Â UPDATE¸¦ »ç¿ëÇÏ¸é µË´Ï´Ù. ¡Þ Update ¹® Çü½Ä : UPDATE Å×À̺í¸í SET ¿À̸§1=°ª1 [,¿À̸§2=°ª2,....] WHERE Á¶°Ç°Ë»ö; WHERE Á¶°Ç °Ë»ö¿¡ ¸Â´Â Data¸¦ SET¿¡¼ ÁöÁ¤ÇÑ °ª(µé)·Î º¯°æÇÏ´Â ¿ªÇÒÀ» ÇÕ´Ï´Ù. ²À Çϳª¸¦ ¹Ù²Ù´Â °ÍÀÌ ¾Æ´Ï¶ó Á¶°Ç¿¡ ¸Â´Â ´Ù¼öÀÇ Çà, Data µéµµ º¯°æÀ» ÇÕ´Ï´Ù. Example userÅ×ÀÌºí¿¡¼ ID°¡ msql ÀÎ ÇàÀÇ ³ªÀ̸¦ 25·Î ¼öÁ¤ÇÏ°í ½ÍÀ»¶§. - UPDATE user SET user_age = 25 WHERE user_id='msql'; ¡Ý Data »èÁ¦ ÀϺΠ¿ÀÇ Data¸¦ ¼öÁ¤ÇÏ´Â °ÍÀÌ ¾Æ´Ï¶ó Data Çà ÀÚü¸¦ »èÁ¦ ÇÒ ¶§´Â Delete ¹®À» ÀÌ¿ëÇÕ´Ï´Ù. ÀÌ Delete ÀÛ¾÷¿¡´Â Yes,NoÀ» Çѹø ´õ ¹°¾îº¸´Â Confirm È®ÀÎÀ» ÇÏÁö ¾Ê°í ¹Ù·Î »èÁ¦ µÇ¹Ç·Î ÁÖÀǸ¦ ±âÇÏ¿©¼ ÀÛ¾÷À» ÇÏ¿©¾ß ÇÕ´Ï´Ù. ¹é¾÷À» ¹Þ¾Æ µÎÁö ¾Ê¾Ò´Ù¸é »èÁ¦ÇÑ µ¥ÀÌÅÍ´Â º¹±¸ÇÒ¼ö ¾ø½À´Ï´Ù. ÁÖÀÇ¿¡ ÁÖÀǸ¦ ÇϽñ⠹ٶø´Ï´Ù. ¡Þ Delete ¹® ¼³¸í Çü½Ä : DELETE FROM Å×À̺í¸í WHERE Á¶°Ç°Ë»ö; Á¶°Ç°Ë»öÇؼ Á¶°Ç¿¡ ¸Â´Â °ÍÀº ÇàÀ» ÀüºÎ »èÁ¦ Example userÅ×ÀÌºí¿¡¼ ID°¡ msqlÀÎ »ç¶÷ÀÇ ÀÚ·á »èÁ¦. - DELETE FROM user WHERE user_id='msql'; ¡Ý Table »èÁ¦ (Drop) Table ÀÚü¸¦ »èÁ¦ ÇÒ ¶§´Â Drop À̶ó´Â ±¸¹®À» ÀÌ¿ëÇÕ´Ï´Ù. Drop ¸í·Éµµ ´Ù½Ã È®ÀÎÀ» ÇÏÁö ¾Ê°í Áö¿ì¹Ç·Î ¸í·ÉÀ» ½ÇÇàÇÒ¶§´Â ÁÖÀÇ ÇϽñ⠹ٶø´Ï´Ù. ½Ç¼ö¸¦ ÇßÀ»¶§´Â Á¤¸» ´«¾ÕÀÌ Ä¯Ä¯ÇØÁý´Ï´Ù. À§¿¡¼µµ ¸î¹ø À̾߱⸦ ÇßÁö¸¸, Á¤¸» ÁÖÀÇÇϼ¼¿ä. ¡Þ Drop ¹® ¼³¸í Çü½Ä : DROP TABLE Å×À̺í¸í; ÀÔ·ÂÇÑ Å×À̺í¸íÀ» ¹Ù·Î »èÁ¦ ÇÕ´Ï´Ù. ¾È¿¡ Data°¡ ÀÖ´Â Áö ¾ø´ÂÁö, ÁøÂ¥ Áö¿ï°ÇÁö È®ÀÎÀ» ÇÏÁö ¾Ê°í ¹Ù·Î Áö¿ö ¹ö¸®¹Ç·Î Áö¿ì½Ã±â Àü¿¡ È®ÀÎÀ» ÇÏ½Ã°í ½ÇÇàÇϽñ⠹ٶø´Ï´Ù. Example - user Å×ÀÌºí »èÁ¦. drop table user; ¡Ý ÇÔ¼öµé.. SQL¿¡¼±´À Áö¿øµÇ´Â ÇÔ¼ö¸¦ ÅëÇؼ ¶Ç´Ù¸¥ °¡°ø ¾øÀ̵µ ÀÚüÀûÀ¸·Îµµ ¸¸Á·ÇÒ ¸¸ÇÑ Data¸¦ ¾Ë·ÁÁÝ´Ï´Ù. ±×·¯³ª mSQL¿¡¼´Â Á÷Á¢ÀûÀ¸·Î Áö¿øÇÏ´Â ÇÔ¼ö´Â ¾ø½À´Ï´Ù. ¡Ý Index .. Primary Key.. Index ¸¦ create ¸í·ÉÀ» ÀÌ¿ëÇÏ¿© »ý¼ºÀ» ÇÕ´Ï´Ù. Index ´Â ¿©·¯ °ªÁß¿¡¼ ¸¹ÀÌ »ç¿ëµÇ´Â ºÎºÐÀ» SQL ¼¹ö¿¡¼ º°µµ 󸮸¦ ÇÏ¿© ´õ¿í ºü¸£°Ô °á°ú¸¦ ó¸®Çϱâ À§Çؼ »ç¿ëÇÕ´Ï´Ù. ¸¹Àº °Ë»ö¿¡ »ç¿ëµÇ´Â ¿ À̶ó¸é! Ãß°¡ÇϽñ⠹ٶø´Ï´Ù. ¾Æ·¡¿Í °°Àº Çü½ÄÀ¸·Î user Å×À̺íÀÇ user_name , user_age ¿À» idx1 À̶ó´Â À̸§ÀÇ Index¸¦ »ý¼ºÇÒ¼ö ÀÖ½À´Ï´Ù. ÀÏ´Ü Index·Î ÁöÁ¤ÇØ ³õÀ¸½Ã¸é select³ª ±âŸ ±¸¹®½Ã mSQL ¼¹ö°¡ ¾Ë¾Æ¼ 󸮸¦ ÇϹǷΠÆí¸®ÇÕ´Ï´Ù. CREATE INDEX idx1 ON user ( user_name, user_age ) \g Primary Key ¶ó´Â °ÍÀº ÇÑ ¿¿¡¼ À¯ÀÏÇÏ°Ô Á¸ÇØ ÇØ¾ß ÇÏ´Â id °ªÀ̶óµçÁö Áֹεî·Ï¹øÈ£µîÀÇ °ªÀ» À̾߱â ÇÕ´Ï´Ù. ÀÌ´Â Index »ý¼º°ú ºñ½ÁÇϳª ¾Õ¿¡ UNIQUE ¶ó°í µ¡ºÙÀÌ´Â °ÍÀÌ Æ²¸³´Ï´Ù. ÀÌ·¸°Ô user_id ¿À» Primary Key·Î ¼³Á¤ ÇØÁÖ¸é user_id °ª¿¡ ÀÌ¹Ì msql °ªÀÌ Àִµ¥ ¶Ç msql °ªÀ» ½á³ÖÀ¸·Á °í ÇÏ¸é ¿¡·¯°¡ ³ª¸ç ½áÁöÁö ¾Ê½À´Ï´Ù. CREATE UNIQUE INDEX idx2 ON user ( user_id ) \g 10. FAQ & Tips ¡Ý FAQ. http://support.hughes.com.au/cgi-bin/hughes/faq À§¿¡¼ mSQL »çÀÌÆ®ÀÇ °ø½Ä FAQ¸¦ ¾òÀ»¼ö ÀÖ½À´Ï´Ù. mSQL Site ÀÇ FAQ¿Í´Â °ü°è ¾øÀÌ,Á¦°¡ ÁÖº¯¿¡¼ º¸°í µéÀº Áú¹®¿¡ ´ëÇÑ ´äº¯À» Á¶ÃÍÇÏ°Ô FAQ·Î Á¶±Ý ÷ºÎÇÕ´Ï´Ù. Q) mSQL ¿ë JDBC µå¶óÀ̹ö°¡ ÀÖ³ª¿ä? A) http://www.imaginary.com/Java/Soul/ ¿¡¼ ±¸ÇϽǼö ÀÖ½À´Ï´Ù. Q) mSQLÀº ¹«·á Àΰ¡¿ä? A) mSQLÀº Çо÷, ºñ¿µ¸® ¸ñÀûÀ¸·Î¸¸ ¹«·á·Î »ç¿ëµÉ¼ö ÀÖ½À´Ï´Ù. ÀÚ¼¼ÇÑ »çÇ×Àº ÀºÎºÐÀÇ ³»¿ëÀ» Âü°íÇϽñ⠹ٶø´Ï´Ù. Q) mSQL ¼¹ö°¡ ³»ºÎ¿¡¼´Â Á¢¼ÓÀÌ µÇ³ª ¿ÜºÎ¿¡¼´Â Á¢¼ÓÀÌ µÇÁö ¾Ê½À´Ï´Ù. A) Á¦°¡ À§¿¡¼ ¼³¸íÇÑ´ë·Î msql.conf ¿¡¼ Remote_Access = False·Î µÇ¾î ÀÖ´Â ºÎºÐÀ» True ·Î º¯°æÇϽðí Reload ÇϽñ⠹ٶø´Ï´Ù. ¡Ý Tips. - Linux ¼¹ö ½ÃÀÛÇÒ¶§ mSQL ¹Ù·Î ½ÃÀÛÇϱâ. 2°¡Áö ¹æ¹ýÀÌ ÀÖ½À´Ï´Ù. ù¹ø°, msql2d µ¥¸óÀÌ /usr/local/Hughes/bin/msql2dÀÇ °æ·ÎÀ϶§ ´ÙÀ½ ºÎºÐÀ» /etc/rc.d/rc.local ÈÀÏ¿¡. ³¡¿¡´Ù°¡ ±×³É Copy& Paste ÇϽñ⠹ٶø´Ï´Ù. if [ -x /usr/local/Hughes/bin/msql2d ] then echo "mSQL - Daemon Starting..." /usr/local/Hughes/bin/msql2d & echo "Done.." fi µÎ¹ø°, init ½ºÅ©¸³Æ®¸¦ Á¦ÀÛÇÏ¿© »ç¿ëÇÕ´Ï´Ù. ´ÙÀ½ÀÇ ³»¿ëÀ» /etc/rc.d/init.d/ ¿¡ msql À̶ó´Â À̸§À¸·Î ¸¸µå½Ã±â ¹Ù¶ø´Ï´Ù. --------------# /etc/rc.d/init.d/msql ³»¿ë #---------------------- #! /bin/sh case "$1" in start) echo -n "Start mSQL service: " /usr/local/Hughes/bin/msql2d & ;; stop) echo -n "Stopping mSQL service: " /usr/local/Hughes/bin/msqladmin shutdown sleep 2 echo ;; status) /usr/local/Hughes/bin/msqladmin stats ;; restart) echo -n "Restart mSQL service: " /usr/local/Hughes/bin/msqladmin reload ;; *) echo "Usage: msql {start|stop|status|restart}" exit 1 esac exit 0 --------------# /etc/rc.d/init.d/msql ³¡ #---------------------- ±×·± ´ÙÀ½ ´ÙÀ½ ¸í·ÉÀ» ½ÇÇà ÇÕ´Ï´Ù. ln -s /etc/rc.d/init.d/msql /etc/rc.d/rc3.d/S99msql ln -s /etc/rc.d/init.d/msql /etc/rc.d/rc6.d/K99msql ±×·¯¸é ½ÃÀÛ¶§ ÀÚµ¿À¸·Î ¸¶Áö¸·¿¡ msql À» ½ÇÇà ÇÕ´Ï´Ù. Âü°í·Î À§ ½ºÅ©¸³Æ®´Â ±âÁ¸ÀÇ ½ºÅ©¸³Æ®¸¦ Âü°í·Î Á¦°¡ Á¦ÀÛÇÑ°ÍÀÔ´Ï´Ù. °æ·Î¿Í »óȲ¿¡ ¸Â°Ô ¹Ù²Ù¾î¼ »ç¿ëÇϽñ⠹ٶø´Ï´Ù. ÇÏÁö¸¸ À§¿¡¼ Àú¶û °°ÀÌ ÇÑ°Íó·³ ¼³Ä¡¸¦ ÇÏ¼Ì´Ù¸é ¼öÁ¤¾øÀÌ »ç¿ëÇϽǼö ÀÖ½À´Ï´Ù. ½ÃÀÛ - /etc/rc.d/init.d/msql start Á¾·á - /etc/rc.d/init.d/msql stop Àç½ÃÀÛ - /etc/rc.d/init.d/msql restart Á¤º¸º¸±â - /etc/rc.d/init.d/msql status À§Ã³·³ »ç¿ëÇϽǼö ÀÖ½À´Ï´Ù. ¡Ý Mini SQL Logo ¾È³».
Small Mini SQL Logo Medium Mini SQL Logo Medium Mini SQL Logo With Hughes Technologies deer Small Button Medium Button "Built With" Button Small Lite Logo Medium Lite Logo
11. ³¡À¸·Î.. mSQL À» »ç¿ëÇϴµ¥ ÀÖ¾î¼ µµ¿òÀ» ÁÖ±â À§ÇÑ ¹®¼´Â ¿©±â¼ ¸¶¹«¸® Áþ½À´Ï´Ù. Á¶¸¸°£ ÇÁ·Î±×·¡¹Ö ¾ð¾î + mSQL ¹®¼¸¦ ¹èÆ÷Çϵµ·Ï ÇÏ°Ú½À´Ï´Ù. ¶ÇÇÑ ¿©±â¼ »ç¿ëµÈ À߸ø, Ãß°¡, ¼öÁ¤µîÀÇ ³»¿ëÀÌ ÀÖÀ¸½Ã´Ù¸é ¾ðÁ¦µçÁö msql@msql.co.kr ·Î ¸ÞÀÏ ÁÖ¼¼¿ä. ±×¸®°í ÀÌ ¹®¼´Â Áö¼ÓÀûÀ¸·Î ¾÷±×·¹ÀÌµå µË´Ï´Ù.