ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Install Mysql (binary version)
    └ Mysql 2007. 1. 5. 15:56
    Install Mysql (binary version)

    Manual (매뉴얼대로만 하면 왕 쉽다.ㅡㅡ;;)
    [willow@localhost mysql]$ cat /usr/local/mysql/INSTALL-BINARY

    The basic commands that you must execute to install and use a MySQL
    binary distribution are:
        shell> groupadd mysql
        shell> useradd -g mysql mysql
        shell> cd /usr/local
        shell> gunzip < /PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf -
        shell> ln -s FULL-PATH-TO-MYSQL-VERSION-OS mysql
        shell> cd mysql
        shell> scripts/mysql_install_db --user=mysql
        shell> chown -R root  .
        shell> chown -R mysql data
        shell> chgrp -R mysql .
        shell> bin/mysqld_safe --user=mysql &
    For versions of MySQL older than 4.0, substitute `bin/safe_mysqld' for
    `bin/mysqld_safe' in the final command.

    1. Download

    - The Standard binaries are recommended for most users
    출처 : http://dev.mysql.com/downloads/mysql/4.1.html

    [root@willow willow]# wget http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-standard-4.1.22-pc-linux-gnu-i686.tar.gz/from/http://mysql.holywar.net/

    2. unzip & mv

    [willow@localhost mysql]$ tar -xzvf mysql-standard-4.1.22-pc-linux-gnu-i686-glibc23.tar.gz
    [willow@localhost mysql]$ mv mysql-standard-4.1.22-pc-linux-gnu-i686-glibc23 mysql
    [willow@localhost mysql]$ mv mysql /usr/local/

    3. install DB&table

    [root@localhost mysql]# /usr/local/mysql/scripts/mysql_install_db --user=mysql
    Installing all prepared tables
    Fill help tables
    To start mysqld at boot time you have to copy support-files/mysql.server
    to the right place for your system
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    ./bin/mysqladmin -u root password 'new-password'
    ./bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
    See the manual for more instructions.
    You can start the MySQL daemon with:
    cd . ; ./bin/mysqld_safe &
    You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
    cd sql-bench ; perl run-all-tests
    Please report any problems with the ./bin/mysqlbug script!
    The latest information about MySQL is available on the web at
    http://www.mysql.com
    Support MySQL by buying support/licenses at http://shop.mysql.com

    4. Create Group&User

    [root@localhost mysql]# groupadd mysql
    [root@localhost mysql]# useradd -g mysql mysql
    [root@localhost mysql]# passwd mysql

    5. Chown
    [root@localhost local]# chown -R root:mysql /usr/local/mysql
    [root@localhost mysql]# chown -R mysql:mysql usr/local/mysql/data
    drwxr-x---    4 mysql    mysql        4096 12월  8 21:27 data

    6. Run~
    [root@localhost mysql]# /usr/local/mysql/bin/mysqld_safe --user=mysql &
    [1] 4847

    7. Tip~
    - mysql auto start ~
    [root@localhost mysql]# cp /usr/local/mysql/bin/mysql.server /etc/rc.d/init.d/


    p.s. 평소 소스파일 컴파일해서 사용하다가 바이너리로 함 깔아봤당

    '└ Mysql' 카테고리의 다른 글

    Mysql Triggers  (0) 2007.11.21
    Install Mysql (source version)  (0) 2007.07.10
    MySQL DataBase 서버 튜닝 - Connection과 Memory  (0) 2007.04.27

    댓글

Designed by Tistory.