Linux DB

MySQL-5.5 설치하기

2012.04.27 08:18

호스트웨이 조회 수:14304

 MySQL-5.5 설치하기

1. cmake 설치
  # wget
http://www.cmake.org/files/v2.8/cmake-2.8.8.tar.gz
  # tar zxvf cmake-2.8.8.tar.gz
  # cd cmake-2.8.8
  # ./bootstrap && make && make install

2. MySQL 설치
  # wget "
http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.23.tar.gz/from/http://ftp.iij.ad.jp/pub/db/mysql/"
  # tar zxvf mysql-5.5.23.tar.gz
  # cd mysql-5.5.23
  # cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8
     -DWITH_EXTRA_CHARSETS=all -DDEFAULT_COLLATION=utf8_general_ci
     -DWITH_INNOBASE_STORAGE_ENGINE=1

   #make && make install

3. MySQL 설정
  # useradd -s /bin/false mysql
  # cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
  # vi /etc/my.cnf

 [client] 하단에 아래 라인 추가
 default-character-set=utf8

 [mysqld] 하단에 아래 라인 추가
 max_connect_errors = 1000
 max_connections = 1000
 max_user_connections = 1000

 character-set-server=utf8
 collation-server=utf8_general_ci
 init_connect=set collation_connection=utf8_general_ci
 init_connect=set names utf8
 character-set-client-handshake=TRUE
 skip-character-set-client-handshake

  # cd /usr/local/mysql
  # scripts/mysql_install_db --user=mysql
  # chown -R mysql.mysql data

4. MySQL 구동
  # /usr/local/mysql/support-files/mysql.server start