MySQL 3.22.21 ¼³Ä¡ °¡À̵å(1999/04/16) - Á¤Á¾°©(hipon@kitel.co.kr) ------------------------------------------------------------------------- 1. µé¾î°¡±â Àü¿¡.. ----------------- % ÀÌ ¹®¼­´Â MySQL¿¡ ÀÖ´Â ¿µ¹® Install ¹®¼­¸¦ ¹ÙÅÁÀ¸·Î Á¦À۵Ǿú½À´Ï´Ù. % º¸´Ù ÀÚ¼¼ÇÑ »çÇ×Àº MySQLȨÆäÀÌÁö¸¦ ¹æ¹®ÇϽðųª, ÇÁ·Î±×·¥ ¼Ò½ºÀÇ % Install ·ùÀÇ ÆÄÀÏÀ» ÂüÁ¶ÇϽñ⠹ٶø´Ï´Ù. % ÇÁ·Î±×·¥À» ¼³Ä¡Çϰųª ½ÇÇàÇÒ¶§ Áß¿äÇÑ°Ç ÇÁ·Î±×·¥À» ¸¸µç Á¦ÀÛÀÚ°¡ ÇÁ·Î±×·¥¿¡ ÇÔ²² ³Ö¾îÁØ ¹®¼­ Áï, READMEÆÄÀÏÀ» Àо´Â °ÍÀÔ´Ï´Ù. % ÀÌ ¹®¼­´Â MySQLÀÇ ±âº»ÀûÀÎ ¼³Ä¡ ¹× Çѱۻç¿ë¹ý, ±×¸®°í ¸ÕÀú ¼³Ä¡ÇØ º» ÇÊÀÚ°¡ ÀüÇÏ°í ½ÍÀº ÆÁÀÌ ÁÖµÈ ³»¿ëÀ¸·Î ±¸¼ºµÇ¾î ÀÖ½À´Ï´Ù. % ±×·¯¹Ç·Î, ÀÌ ¹®¼­ º¸´Ù ÀÚ¼¼ÇÑ Á¤º¸¸¦ ¾Ë°í ½ÍÀ¸½Ã¸é ÇÔ²² Æ÷ÇԵǾî ÀÖ´Â REAME Á¾·ùÀÇ ÆÄÀÏÀ» ÇÔ²² ÀÐ¾î º¼°ÍÀ» Àû±Ø ±ÇÇÕ´Ï´Ù. % ÀÌ ¹®¼­´Â ÆíÀÇ»ó °æ¾î¸¦ »ý·«Çß½À´Ï´Ù. ÀÌÁ¡ ¾çÇعٶø´Ï´Ù. 1.1 ÇÊÀÚ ¼³Ä¡ Hardware Á¤º¸ (¾Æ·¡´Â ÇÊÀÚÀÇ °æ¿ìÀÌ°í, MySQLÀº ¸®´ª½º°¡ ¼³Ä¡µÇ´Â 386ÀÌ»óÀÇ ÄÄÇ»ÅÍÀÌ¸é ¼³Ä¡°¡´ÉÇÏ´Ù.) Computer : SAMSUNG Magic Station M6000 CPU : Intel Pentium II 300 Mhz (512KB Internal Cache) RAM : SAMSUNG SDRAM 64MB VIDEO : ATI 3D Rage Pro (Korean) - AGP 4MB SOUND : ESS ES1689 AudioDrive at 0x220 irq 5 dma 1,5 MOUSE : Microsoft IntelliMouseSEJIN PS/2 type FDD : SAMSUNG 3.5" 1.44MB HDD : FUJITSU MPC3043AT, 4125MB, CHS=525/255/63, UDMA :... WINDOWS 98 SAMSUNG WN310820A (1.08GB), 1030MB, CHS=523/64/63, DMA :... LINUX CDROM : SAMSUNG CD-ROM SCR-3232 VM103, ATAPI 32X CDROM drive NETWORK : 3COM 3c900b TPO , IRQ 3 MODEM : SAMSUNG LTV90 (56Kbps) MONITOR : SAMSUNG 17" Magic Monitor, CKG7507L(D), :... Syncmaster 700M(s) 1.2 ÇÊÀÚ ¼³Ä¡ Software Á¤º¸ OS : ALzzA RedHat Linux 5.2 (Kernel 2.2.5) XFree86 : XFree86-3.3.3.1-3kr Netscape : Netscape-4.0.8-2kr glibc : glibc-2.0.7-29 Webserver : Apache-1.3.4-1kr PHP : PHP3-3.0.6-2 flex : flex-2.5.4a-4 Database : MySQL 3.22.21 ; Âü°í·Î ÇÊÀÚ´Â Apache + PHP + MySQL ¿¬µ¿Çؼ­ ÀÛ¾÷ÇÑ´Ù. ; ¾ËÂ¥ ·¹µåÇÞ 5.2 »ç¿ëÀÚ¶ó¸é Apache¿Í PHP°¡ ±âº»À¸·Î ¼³Ä¡µÇ¾î ÀÖ°í, MySQL ȨÆäÀÌÁö¿¡¼­ MySQL rpm¹öÀüÀ» ¹Þ¾Æ¼­ ¼³Ä¡ÇÏ¸é ¹Ù·Î »ç¿ëÀÌ °¡´ÉÇÏ´Ù. ; ƯÈ÷ PHP´Â MySQL°ú PostgreSQLÀ» ¿¬µ¿°¡´ÉÇÏ°Ô²û Aphache ¼­¹ö¿¡ ¸ðµâÈ­ µÇ¾îÀÖ´Ù. ; ±×·¯¹Ç·Î MySQLÀ̳ª PostgreSQLÀ» ÀÌ¿ëÇÏ¿© µ¥ÀÌÅͺ£À̽º¸¦ ±¸Ãà ÇÏ·Á´Â ÀÌ¿ëÀÚ´Â Apache³ª PHP¸¦ ´Ù½Ã ¼³Ä¡ÇÒ ÇÊ¿ä°¡ ¾øÀÌ ±×´ë·Î »ç¿ëÇÏ¸é µÇ°í, µ¥ÀÌŸº£À̽º(MySQL)¸¸ ¼³Ä¡ ¶Ç´Â ¾÷±×·¹À̵å ÇØÁØ´Ù. 1.3 ¼³Ä¡ ¿ä±¸»çÇ× (º» °¡À̵å´Â ¸®´ª½º¸¦ ±âÁØÀ¸·Î ¼³¸íÇÑ´Ù.) ¾ÐÃà Åø : GNU gunzip GNU tar ÄÄÆÄÀÏ·¯ : ANSI C++ compiler. gcc 2.8.1 ÀÌ»ó, egcs 1.0.2 ÀÌ»ó gcc 2.7.x ¹öÀüÀº ¹ö±×°¡ ÀÖÀ¸¹Ç·Î MySQLÀ» ¼³Ä¡Çϱâ À§Çؼ­´Â ²À 2.8.x ¹öÀüÀ¸·Î ¾÷±×·¹À̵åÇÏÀÚ. %% ¸Å¿ì Áß¿äÇϹǷΠ¹öÀüÈ®ÀÎÀ» ²À ÇÏÀÚ. Make Åø : GNU make 3.75 ÀÌ»ó 1.4 RPM ¼³Ä¡ ·¹µåÇÞ ¸®´ª½º »ç¿ëÀÚ¶ó¸é RPMÀ¸·Î ¼³Ä¡ÇÒ ¼ö ÀÖ´Ù. 1.4.1 RPM °¡Á®¿À±â http://www.mysql.com¿¡¼­ ÃֽŹöÀü(3.22.21)À» °¡Á®¿Â´Ù. ȨÆäÀÌÁö¿¡ º¸¸é ¿©·¯°³ÀÇ rpmÀÌ Àִµ¥, ±×Áß¿¡¼­ Binary RPM containing the server for i386 machines. Binary RPM containing client programs for i386 machines. Binary RPM containing include files and libraries for development for i386 machines ÀÌ ¼¼°¡Áö¸¦ ´Ù¿î·Îµå ÇÑ´Ù. Ȥ½Ã º¥Ä¡¸¶Å©ÀÚ·áµµ ÇÊ¿äÇÑ´Ù¸é (»ç½Ç ÀÌ°Ç ÇÊ¿ä¾øÀ½) Binary RPM containing benchmarks/tests using Perl DBI for i386 machines. À̰͵µ ´Ù¿î·ÎµåÇÑ´Ù. 1.4.2 RPM ¼³Ä¡ À§ ¼¼°¡Áö¸¦ Â÷·Ê·Î ¼³Ä¡ÇÑ´Ù. shell> rpm -Uvh MySQL-3.22.21-1.i386.rpm shell> rpm -Uvh MySQL-client-3.22.21-1.i386.rpm shell> rpm -Uvh MySQL-devel-3.22.21-1.i386.rpm º¥Ä¡¸¶Å©°¡ ÇÊ¿äÇÏ¸é º¥Ä¡¸¶Å©µµ ¼³Ä¡. 1.4.3 ¼³Ä¡ ³¡ RPMÀº ÀÌ·¸°Ô °£´ÜÇÏ°Ô ÇÁ·Î±×·¥À» ¼³Ä¡ÇÒ ¼ö ÀÖ´Ù. ±×·¯³ª, Á»´õ °í±ÞÀûÀÎ »ç¾çÀ» ¿øÇϰųª DBMS¸¦ ÃÖÀûÈ­ Çϰųª.. ÇÑ±Û ¸Þ¼¼Áö¿Í ÇÑ±Û Å×À̺íÀ» »ç¿ëÇÏ°íÀÚ ÇÑ´Ù¸é.. ¼Ò½º¸¦ ¹Þ¾Æ¼­ ¼³Ä¡Çؾ߸¸ ÇÑ´Ù. 2. ¼³Ä¡ ½ÃÀÛ ------------ 2.1 MySQL ÃֽŹöÀü °¡Á®¿À±â ȨÆäÀÌÁö : http://www.mysql.com ÇöÀç±îÁö(1999/04/16) ÃֽŹöÀü : 3.22.21 2.2 ¸ðµç ¼³Ä¡´Â root °èÁ¤À¸·Î.. 2.3 °¡Á®¿Â ¼Ò½º Ç®±â shell> gunzip < mysql-3.22.21.tar.gz | tar xvf - ¶Ç´Â GNU tar ¶ó¸é, ¾Æ·¡¿Í °°ÀÌ Çغ¸ÀÚ. shell> tar xzvf mysql-3.22.21.tar.gz RPM ¼Ò½º¸¦ °¡Á®¿Ô´Ù¸é.. shell> rpm -Uvh MySQL-3.22.21-1.src.rpm 2.4 »ý¼ºµÈ µð·ºÅ丮·Î À̵¿ shell> cd mysql-3.22.21 2.5 ȯ°æ¼³Á¤À» ÇÑ´Ù. (´ëºÎºÐÀº ȯ°æ¼³Á¤ ¾øÀÌ ±×³É Çصµ ¹«¸®°¡ ¾ø´Ù. ´Ù¸¸, ÇѱÛÀ» »ç¿ëÇÏ°íÀÚ ÇÒ¶§´Â Çѱ۰ü·Ã ¿É¼Ç ÂüÁ¶) shell> ./configure ¶Ç´Â ÇѱÛÀ» Áö¿øÇÏ·Á¸é shell> ./configure --with-charset=euc_kr ** ȯ°æ¼³Á¤ ¿É¼Ç ÀÚ¼¼ÇÑ È¯°æ¼³Á¤ÀÌ ÇÊ¿äÇÏ´Ù¸é, ¾Æ·¡¿Í °°ÀÌ Çغ»´Ù. shell> ./configure --help ÀÌÁ¦ ¿É¼Ç¿¡ ´ëÇؼ­ ÇϳªÇϳª »ìÆ캸ÀÚ. (Çѱۻç¿ë¹ýµµ ÀÖÀ¸´Ï Á¶¸ñÁ¶¸ñ »ìÆ캻´Ù.) 2.5.1 Ŭ¶óÀ̾ðÆ® ÇÁ·Î±×·¥¸¸À¸·Î »ç¿ëÇÒ ¶§ (¼­¹ö ±â´É¾øÀÌ Å¬¶óÀ̾ðÆ®·Î¸¸ »ç¿ëÇÒ ¶§) shell> ./configure --without-server 2.5.2 ¼³Ä¡µð·ºÅ丮¸¦ º¯°æÇÏ°íÀÚ ÇÒ ¶§ (¼³Ä¡ ½ºÅ©¸³Æ®°¡ ±âº»ÀûÀ¸·Î ¼³Ä¡ÇÏ´Â µð·ºÅ丮°¡ ¾Æ´Ñ »ç¿ëÀÚ°¡ µð·ºÅ丮¸¦ ¹Ù²Ù°íÀÚ ÇÒ¶§ »ç¿ë ±âº»ÀûÀ¸·Î '/usr/local'¿¡ ÇÁ·Î±×·¥ÀÌ ¼³Ä¡µÇ°í '/usr/local/var'¿¡ µ¥ÀÌŸº£À̽ºÆÄÀÏÀÌ ³²´Â´Ù.) shell> ./configure --prefix=/usr/local/mysql ==> ±âº» ¼³Ä¡µð·ºÅ丮¸¦ '/usr/local/mysql'·Î º¯°æ shell> ./configure --prefix=/usr/local \ --localstatedir=/usr/local/mysql/data ==> ±âº» ¼³Ä¡µð·ºÅ丮¸¦ '/usr/local'·Î ÇÏ°í, µ¥ÀÌŸº£À̽º µð·ºÅ丮¸¦ '/usr/local/mysql/data'·Î º¯°æ 2.5.3 ¼ÒÄÏ µð·ºÅ丮 º¯°æ (±âº»°ªÀº `/tmp' or `/var/run') shell> ./configure --with-unix-socket-path=/path/to/socket/dir ==> `/path/to/socket/dir' ¹Ýµå½Ã Àý´ë°æ·ÎÀ̾î¾ß ÇÑ´Ù. 2.5.4 compile statically-linked (Á¤ÀûÀûÀ¸·Î ÇÁ·Î±×·¥À» ÄÄÆÄÀÏ) shell> ./configure --with-client-ldflags=-all-static \ --with-mysqld-ldflags=-all-static 2.5.5 libg++ À̳ª libstdc++ÀÌ ¾øÀÌ gcc¸¸ »ç¿ëÇÒ¶§ shell> CC=gcc CXX=gcc ./configure 2.5.6 'DEFAULT' Çʵ带 »ç¿ëÇÏÁö ¾Êµµ·Ï ÇÏ·Á¸é shell> CXXFLAGS=-DDONT_USE_DEFAULT_FIELDS ./configure 2.5.7 ´Ù±¹¾î Áö¿ø (ÇÑ±Û Áö¿ø Çʵ¶) MySQLÀº ±âº»ÀûÀ¸·Î charsetÀÌ ISO-8859-1(Latin1) ÀÌ´Ù. ´Ù±¹¾î¸¦ Áö¿øÇÏ·Á¸é charset¿É¼ÇÀ» »ç¿ëÇÑ´Ù. ƯÈ÷, Çѱ¹¾î Áö¿øÄÚµå´Â EUC_KRÀÌ´Ù. shell> ./configure --with-charset=CHARSET shell> ./configure --with-charset=euc_kr ==> ¸Þ¼¼Áö ¹× µ¥ÀÌŸº£À̽º, Çʵå ÇÑ±Û »ç¿ë ** CHARSET Áö¿øÄÚµå `CHARSET' may be one of `big5', `cp1251', `cp1257', `czech', `danish',`dec8', `dos', `euc_kr', `german1', `hebrew', `hp8', `hungarian', `koi8_ru', `koi8_ukr', `latin1', `latin2', `sjis', `swe7', `tis620', `ujis', `usa7', `win1251' or `win1251ukr'. * character set¼³Á¤ÇÑ ´ÙÀ½ ´Ù½Ã º¯°æÇÏ·Á¸é ¾Æ·¡¿Í °°Àº ¸í·ÉÀ» ÁØ ´ÙÀ½ './configure' ¸¦ ´Ù½Ã ½ÇÇàÇÑ´Ù. shell> make distclean * ¼­¹ö¿Í Ŭ¶óÀ̾ðÆ®°£¿¡ characters¸¦ º¯°æÇÏ·Á¸é `SET OPTION CHARACTER SET' 2.5.8 µð¹ö±ëÄÚµå ¿É¼Ç shell> ./configure --with-debug 2.5.9 °­Á¦·Î MIT-pthreads¸¦ ½ÇÇàÇÒ¶§ shell> ./configure --with-mit-threads 2.6 ¸¸¾à ȯ°æ¼³Á¤¿¡ ¹®Á¦°¡ ÀÖ´Ù¸é shell> rm config.cache shell> make clean À§ µÎºÐÀåÀ» ½ÇÇàÇϰųª ¶Ç´Â ´ÙÀ½°ú °°ÀÌ ÇÑ´Ù. shell> make distclean ±×¸®°í ³ª¼­ ȯ°æ¼³Á¤À» »õ·ÎÇÑ´Ù. 2.7 ÄÄÆÄÀÏÇÑ´Ù. (¹Ýµå½Ã root·Î ÇÒ°Í!) shell> make ÄÄÆÄÀϽà `sql_yacc.cc' ºÎºÐ¿¡¼­ ´ÙÀ½°ú °°Àº ¿¡·¯°¡ ³­´Ù¸é Internal compiler error: program cc1plus got fatal signal 11 or Out of virtual memory or Virtual memory exhausted ÀÌ ¹®Á¦´Â 'gcc'°¡ huge amouts ¸Þ¸ð¸®¸¦ ¿ä±¸Çϱ⠶§¹®ÀÌ´Ù. ÀÌ·²¶§´Â ȯ°æ¼³Á¤¿¡¼­ ´ÙÀ½°ú °°Àº ¿É¼ÇÀ» ÁÖ°í ´Ù½Ã ÄÄÆÄÀÏ ÇÑ´Ù. shell> ./configure --with-low-memory %% ¿©±â¿¡¼­ À­ºÎºÐ¿¡¼­ ¼³¸íÇÑ°Å¿Í °°ÀÌ ÇöÀç¹öÀüÀÇ MySQLÀº gcc ÄÄÆÄÀÏ·¯ ¹öÀüÀÌ ¹Ýµå½Ã 2.8.x ÀÌ»óÀ̾î¾ß ÇÑ´Ù. 2.7.x ¹öÀüÀ̶ó¸é, ¹Ýµå½Ã ¾÷±×·¹À̵å ÇÑ´Ù. È®ÀÎÀº gcc --versionÀ¸·Î ÇÒ ¼ö ÀÖ´Ù. shell> gcc --version 2.8.x %% ¸¸¾à 2.7.x ¹öÀü´ëÀÇ gcc ÄÄÆÄÀÏ·¯¸¦ »ç¿ëÇÑ´Ù¸é makeÇÒ¶§.. 'no target'À̶ó´Â ¿¡·¯¸Þ¼¼Áö°¡ ³¯ °ÍÀÌ´Ù.. ÀÌ°Ç ¹°·Ð ./configure°¡ ÀûÀýÈ÷ ¼öÇàµÇÁö ¾Ê¾Æ¼­ÀÌ´Ù. 'no target' À̶ó´Â ¿¡·¯´Â MakefileÀÌ Á¸ÀçÇÏÁö ¾ÊÀ»¶§ »ý±ä´Ù. ./configure °¡ Á¦´ë·Î ¼öÇàÀÌ µÇ¾î¾ß¸¸ MakefileÀÌ »ý±ä´Ù. ´ÙÀ½Àº gcc 2.7.x ¹öÀü´ë¸¦ »ç¿ëÇÒ¶§ ./configure ¼öÇà½Ã ¿¡·¯¸Þ¼¼ÁöÀÌ´Ù. shell> gcc --version 2.7.2.3 shell> ./configure loading cache ./config.cache checking host system type... i586-pc-linux-gnu checking target system type... i586-pc-linux-gnu checking build system type... i586-pc-linux-gnu checking for a BSD compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking whether make sets ${MAKE}... yes checking for working aclocal... found checking for working autoconf... found checking for working automake... found checking for working autoheader... found checking for working makeinfo... found checking whether to enable maintainer-specific portions of Makefiles... no checking whether build environment is sane... yes checking whether make sets ${MAKE}... (cached) yes 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 for c++... no checking for g++... no checking for gcc... gcc checking whether the C++ compiler (gcc ) works... no configure: error: installation or configuration problem: C++ compiler cannot create executables. Ȥ½Ã, ÀÌ°Í°ú ºñ½ÁÇÑ ¸Þ¼¼Áö°¡ ³ª¿À¸é gcc ¹öÀüÀ» 2.8.x ÀÌ»ó »ç¿ëÇÑ´Ù. 2.8 ÀνºÅçÀ» ÇÑ´Ù. (¿ª½Ã root·Î) shell> make install 2.9 Perl Áö¿ø Perl `DBD'/`DBI' client code ´Â Perl 5.004 ÀÌÈÄ ¹öÀüÀ» »ç¿ëÇؾßÇÑ´Ù. Perl °ü·Ã ÇÁ·Î±×·¥ ¼¼°¡Áö¸¦ ´Ù¿î·ÎµåÇÑ´Ù. ('Data-Dumper', 'DBI', 'Msql-Mysql-modules') 'Data-Dumper', 'DBI', 'Msql-Mysql-modules' À» ¼ø¼­´ë·Î ¼³Ä¡ÇÑ´Ù. 2.9.1 ¿ì¼± ¾ÐÃàµÈ ÆÐÅ°Áö¸¦ Ǭ´Ù. shell> gunzip < Data-Dumper-VERSION.tar.gz | tar xvf - GNU tar¸¦ »ç¿ëÇÑ´Ù¸é shell> tar xzvf Data-Dumper-VERSION.tar.gz ÀÌ·¸°Ô Çϸé `Data-Dumper-VERSION' µð·ºÅ丮°¡ »ý±ä´Ù. 2.9.2 »ý¼ºµÈ µð·ºÅ丮·Î À̵¿ shell> cd Data-Dumper-VERSION 2.9.3 ÄÄÆÄÀÏ ÇÏ°í ¼³Ä¡ shell> perl Makefile.PL shell> make shell> make test shell> make install 2.9.4 Å×½ºÆ® make test´Â ƯÈ÷ Áß¿äÇÏ´Ù. ¸ðµç ¸ðµâÀ» °ËÁõÇϱ⠶§¹®ÀÌ´Ù. 2.9.5 ³ª¸ÓÁöÁö µÎ°³ ÆÐÅ°Áö ¼³Ä¡ ³ª¸ÓÁö 'DBI', 'Msql-Mysql-modules'¸¦ À§¿Í °°Àº ¹æ¹ýÀ¸·Î ¼³Ä¡ÇÑ´Ù. 2.10 µ¥ÀÌŸº£À̽º ¼³Ä¡ ¼³Ä¡°¡ ³¡³­ÈÄ ¾Æ·¡¿Í °°Àº ¸í·ÉÀ» Çѹø¸¸ ÇÑ´Ù. shell> ./scripts/mysql_install_db ÀÌ ¸í·ÉÀº ¼³Ä¡ÈÄ ´Ü Çѹø¸¸ ÇÏ´Â ¸í·ÉÀ¸·Î ±âÃÊÅ×À̺í 6°³°¡ ¼³Ä¡µÈ´Ù. (`user', `db', `host', `tables_priv', `columns_priv' and `func') 2.11 MySQL ¼­¹ö ½ÃÀÛ ¿ì¼± MySQLÀÌ ¼³Ä¡µÈ µð·ºÅ丮·Î À̵¿ÇÑ´Ù. shell> cd mysql_installation_directory ±×¸®°í ³ª¼­ ¾Æ·¡¿Í °°Àº ¸í·ÉÀ» ÁØ´Ù. shell> bin/safe_mysqld & 2.12 ¿¡·¯ ¾øÀÌ ½ÇÇàµÇ¸é.. ¾Æ·¡¿Í °°Àº ¸í·ÉÀ» ³»·Á¼­ ¼³Ä¡µÈ ÇÁ·Î±×·¥À» °ËÁõÇØ º»´Ù. (¾ÕÀ¸·Î BINDIR À̶õ MySQLÀÌ ¼³Ä¡µÈ µð·ºÅ丮Áß binµð·ºÅ丮¸¦ ¸»ÇÔ ¿¹¸¦ µé¾î MySQLÀÌ '/usr/local'¿¡ ¼³Ä¡Ä¡µÇ¾ú´Ù¸é BINDIRÀº '/usr/local/bin'ÀÌ µÈ´Ù.) ¼³Ä¡µÈ MySQLÀÇ ¹öÀüÀ» ¾Ë¾Æº»´Ù. (MySQLÀÇ ¼³Ä¡µÈ µð·ºÅ丮¿¡¼­ bin µð·ºÅ丮¿¡ ÀÖ´Â 'mysqladmin' ½ÇÇà) shell> BINDIR/mysqladmin version ±×·¯¸é ¾Æ·¡¿Í ºñ½ÁÇÑ È­¸éÀÌ ³ª¿Ã °ÍÀÌ´Ù. mysqladmin Ver 6.3 Distrib 3.22.21-1, for pc-linux-gnu on i686 TCX Datakonsult AB, by Monty Server version 3.22.21-1 Protocol version 10 Connection Localhost via UNIX socket TCP port 3306 UNIX socket /tmp/mysql.sock Uptime: 16 sec Running threads: 1 Questions: 20 Reloads: 2 Open tables: 3 ±×¸®°í ´Ù·¡¿Í °°Àº ¸í·Éµµ Çѹø Çغ»´Ù. shell> BINDIR/mysqladmin variables 2.13 MySQL ¼­¹ö¸¦ ÁßÁöÇØ º»´Ù. shell> BINDIR/mysqladmin -u root shutdown 2.14 safe_mysqld·Î ¼­¹ö¸¦ Àç½ÃÀÛÇغ»´Ù. shell> BINDIR/safe_mysqld --log & 2.15 °£´ÜÇÑ µ¥ÀÌŸº£À̽º Å×½ºÆ®¸¦ ÇÑ´Ù. ¾Æ·¡¿Í °°Àº ¸í·ÉÀ» Çغ»´Ù. shell> BINDIR/mysqlshow +-----------+ | Databases | +-----------+ | mysql | +-----------+ shell> BINDIR/mysqlshow mysql Database: mysql +--------------+ | Tables | +--------------+ | columns_priv | | db | | func | | host | | tables_priv | | user | +--------------+ shell> BINDIR/mysql -e "select host,db,user from db" mysql +------+--------+------+ | host | db | user | +------+--------+------+ | % | test | | | % | test_% | | +------+--------+------+ 2.16 º¥Ä¡¸¶Å© Å×½ºÆ®¸¦ Çغ»´Ù. (¿É¼Ç) º¥Ä¡¸¶Å©¿¡ °ü½ÉÀÌ ÀÖ´Â »ç¶÷Àº ´ÙÀ½°ú °°Àº ¸í·É¾î·Î Å×½ºÆ® Çغ¸ÀÚ. shell> cd sql-bench shell> run-all-tests ¸¸¾à¿¡ sql-bench µð·ºÅ丮°¡ ¾ø´Ù¸é, rpm ÆÐÅ°Áö¸¦ ÀÌ¿ëÇغ¸ÀÚ. (mysqlȨÆäÀÌÁö¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù.) 2.17 ÀÚµ¿À¸·Î MySQL ¼­¹ö ½ÃÀÛ°ú Á¾·á MySQL ¼­¹öÀÇ start¿Í stop argument·Î ½ÃÀÛ°ú Á¾·á¸¦ ÇÒ ¼ö ÀÖ´Ù. shell> mysql.server start shell> mysql.server stop ºÎÆðú µ¿½Ã¿¡ MySQL ¼­¹ö¸¦ ½ÃÀÛÇÏ·Á¸é ·¹µåÇÞ ¸®´ª½ºÀÇ °æ¿ì `/etc/rc.d/rc.local' ÆÄÀÏ¿¡ ¾Æ·¡¿Í °°ÀÌ ÇÑÁÙÀ» »ðÀÔÇÑ´Ù. (µð·ºÅ丮¸¦ ¼³Ä¡µÈ µð·ºÅ丮¸¦ Á¤È®È÷ Àû¾îÁØ´Ù.) /bin/sh -c 'cd /usr/local/mysql ; ./bin/safe_mysqld &' ¶ÇÇÑ, mysql.server¸¦ »ç¿ëÇÏ¿©.. mysql.server start & mysql.server °¡ ½ÇÇàµÇ¸é µÎ°³ÀÇ ÇÁ·Î¼¼¼­°¡ ½ÇÇàµË´Ï´Ù. (µð·ºÅ丮´Â ¼³Ä¡°æ·Î¿¡ µû¶ó ´Þ¶óÁú ¼ö ÀÖ½À´Ï´Ù) /usr/bin/safe_mysqld /usr/bin/libexec/mysqld * ÇÑ±Û »ç¿ë ÆÁ (mysql.server ÆÄÀÏÀ» ¼öÁ¤ÇÏ¹Ç·Î½á º°´Ù¸¥ ¿É¼Ç¾øÀÌ ÇѱÛÀ» »ç¿ë ÇÒ ¼ö ÀÖ´Ù. ÀÌ °æ¿ì 2.18ÀýÀÇ ÇÑ±Û »ç¿ë¹ýÀº °Ç³Ê¶Ú´Ù.) mysql.server¸¦ vi ¿¡µðÅÍ µîÀ¸·Î ¿­¾î¼­ 'mysqld' ¸¦ ½ÇÇà½ÃÅ°´Â ºÎºÐÀ» ¸ðµÎ ã¾Æ¼­ 'mysqld --language=korean' ·Î ¹Ù²ãÁØ´Ù. ¾Æ¸¶ 2~3 ±ºµ¥ Âë µÉ°ÍÀÌ´Ù. 2.18 MySQL ¼­¹ö ¿É¼Ç MySQL ¼­¹ö´Â ´ÙÀ½ ¼¼°¡Áö µð·ºÅ丮¿¡ ¿É¼ÇÀ» Àû¾îÁÙ ¼ö ÀÖ´Ù. *µð·ºÅ丮* *»ç¿ë¸ñÀû* `/etc/my.cnf' ±Û·Î¹ú ¿É¼Ç `DATADIR/my.cnf' ¼­¹ö-½ºÆå ¿É¼Ç `~/.my.cnf' »ç¿ëÀÚ-½ºÆå ¿É¼Ç * ÀüÇüÀûÀ¸·Î `/etc/my.cnf' ÆÄÀÏÀº ´ÙÀ½°ú °°´Ù. [mysqld] datadir=/usr/local/mysql/var socket=/tmp/mysqld.sock port=3306 [mysql.server] user=mysql basedir=/usr/local/mysql `mysql.server' ½ºÅ©¸³Æ®´Â `user', `datadir', `basedir', `bindir' and `pid-file' ÀÇ º¯¼ö¸¦ °¡Áø´Ù. * ÆÄÀÏ ¿É¼Ç #ÁÖ¼® - ÁÖ¼® ¶óÀÎÀº `#' or `;' ·Î ½ÃÀÛÇÑ´Ù. [group] - ¿É¼ÇÀ» ÁÖ°íÀÚÇÏ´Â ÇÁ·Î±×·¥À̳ª ±×·ìÀÇ À̸§ option - ÇÁ·Î±×·¥ ½ÇÇà½Ã --option ÀûÀ» ³»¿ë option=value - ÇÁ·Î±×·¥ ½ÇÇà½Ã --option=value ÀûÀ» ³»¿ë set-variable = variable=value - ÇÁ·Î±×·¥ ½ÇÇà½Ã --set-variable variable=value ¿¡ ÀûÀ» ³»¿ë * ÀüÇüÀûÀÎ ±Û·Î¹ú ¿É¼Ç ÆÄÀÏ ¿¹ : [client] port=3306 socket=/tmp/mysql.sock [mysqld] port=3306 socket=/tmp/mysql.sock set-variable = key_buffer=16M set-variable = max_allowed_packet=1M [mysqldump] quick * ÀüÇüÀûÀÎ »ç¿ëÀÚ ¿É¼Ç ÆÄÀÏ ¿¹ : [client] # The following password will be sent to all standard MySQL clients password=my_password [mysql] no-auto-rehash * ÇÑ±Û ¸Þ¼¼Áö¿Í ÇÑ±Û ÇʵåµîÀ» »ç¿ëÇÏ·Á¸é.. (2.17¿¡¼­ Çѱۻç¿ë¹ýÀ» Çß´Ù¸é ¾Æ·¡ ºÎºÐÀº °Ç³Ê¶Ü) (./configure --with-charset=euc_kr ·Î ÄÄÆÄÀÏ ÇßÀ»°æ¿ì) [myslqd] ¼Æ¼Ç¿¡ ¾Æ·¡¿Í °°Àº ÇÑ ÁÙÀ» ³Ö´Â´Ù. language=korean * ¶Ç´Â mysqld ½ÇÇàÇÒ¶§ ¿É¼ÇÀ» Á༭ ½ÇÇà mysql --langueage=korean 3. ÄÄÆÄÀÏ ¹æ¹ý ¿ä¾à 3.1 ¼Ò½º¸¦ ¹Þ¾Æ¼­ Ǭ´Ù. 3.2 »ý¼ºµÈ µð·ºÅ丮·Î À̵¿ÇÏ¿© ¾Æ·¡ ¸í·ÉÀ¸·Î ȯ°æ¼³Á¤À» ÇÑ´Ù. shell> ./configure ¸¸¾à ÇÑ±Û ¸Þ¼¼Áö³ª Çʵ带 »ç¿ëÇÏ·Á¸é.. shell> ./configure --with-charset=euc_kr 3.3 ÄÄÆÄÀÏ ÇÑ´Ù. shell> make 3.4 ¼³Ä¡ÇÑ´Ù. shell> make install 3.5 µ¥ÀÌŸº£À̽º ÃʱâÈ­ (óÀ½ Çѹø) shell> ./scripts/mysql_install_db 3.6 '/etc/rc.d/rc.local' ÆÄÀÏ¿¡ ´ÙÀ½ ÇÑÁÙ »ðÀÔ (µð·ºÅ丮´Â ¼³Ä¡½Ã ¼³Á¤¿¡ µû¶ó ´Þ¶óÁú ¼ö ÀÖ´Ù.) /usr/bin/mysql.server start & 3.7 ÇÑ±Û ¸Þ·¯ ¸Þ¼¼Áö ¹× ÇÑ±Û ÇÊµå »ç¿ë ÆÁ mysql.server ÆÄÀÏÀ» ¿­¾î¼­ ´ÙÀ½ ³»¿ëÀ» ¼öÁ¤ (2~3±ºµ¥ Á¤µµ µÊ) ==> 'mysqld' ºÎºÐÀ» mysqld --language=korean ¶Ç´Â, ¿É¼Ç ¼³Á¤ÆÄÀÏ 'my.cnf'¿¡ ´ÙÀ½ ³»¿ëÀ» »ðÀÔ ==> [myslqd] ¼Æ¼Ç¿¡ ¾Æ·¡¿Í °°Àº ÇÑ ÁÙÀ» ³Ö´Â´Ù. language=korean 4. Ãß°¡ÀûÀ¸·Î ÇÒ ÀÏ ------------------- ; Áú¹®À̳ª ¹ö±× ȤÀº Çǵå¹éÀÌ ÀÖÀ¸¸é, ¿ì¼± ¼Ò½º³ª ȨÆäÀÌÁö»óÀÇ ¹®¼­¸¦ Àо¶ó. ; ¶ÇÇÑ, http://www.mysql.com À» ÀÚÁÖ ¹æ¹®ÇÏ¿© ÃÖ½ÅÀÇ Á¤º¸¸¦ ¾òÀÚ. ; ÀÌ ¹®¼­´Â MySQLÀÇ »ç¿ë¹ýÀ» ´Ù·é ¹®¼­°¡ ¾Æ´Ï¹Ç·Î, »ç¿ë¹ýÀº HOW-TO ¹®¼­µîÀ» ÂüÁ¶ ¹Ù¶õ´Ù. 5. ¸¶Ä¡¸é¼­ ----------- ; ÀÌ»óÀ¸·Î ¸ðµç ¼³Ä¡°¡ ³¡³µ½À´Ï´Ù. ; MySQL°ú ÇÔ²² Áñ°Å¿î ¸®´ª½ÌÀÌ µÇ±æ... ; Áú¹®ÀÖÀ¸½Ã¸é, ´º½º±×·ì¿¡ Æ÷½ºÆÃÇϽðųª, °¢ µ¿È£È¸µî¿¡ Áú¹®ÇÏ½Ã¸é ½Ç·ÂÀÖ´Â ¸¹Àº ºÐµéÀÌ µµ¿ÍÁÖ½Ç °Ì´Ï´Ù.