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 Բ ſ  Ǳ...

   ; ø, ׷쿡 Ͻðų,  ȣȸ Ͻø
     Ƿִ  е ֽ ̴ϴ.