Table of Contents
Mysql 5.1.x 설치#
- static 컴파일된 mysql을 사용 한다.
유져의 추가#
groupadd mysql useradd -g mysql mysql
설치된 mysql 체크#
- /etc/my.cnf 파일이 있을시 제거 하도록 한다.
mysql 다운로드와 설치#
- (32비트) 다운로드 <5.1.37>
wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.37-linux-i686-glibc23.tar.gz tar -xvzf mysql-5.1.37-linux-i686-glibc23.tar.gz mv mysql-5.1.37-linux-i686-glibc23 /usr/local ln -s /usr/local/mysql-5.1.37-linux-i686-glibc23 /usr/local/mysql
- (64비트) 다운로드 <5.1.37>
wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.37-linux-x86_64-glibc23.tar.gz tar -xvzf mysql-5.1.37-linux-x86_64-glibc23.tar.gz mv mysql-5.1.37-linux-x86_64-glibc23 /usr/local ln -s /usr/local/mysql-5.1.37-linux-x86_64-glibc23 /usr/local/mysql
초기화#
cd /usr/local/mysql scripts/mysql_install_db chown -R root . chown -R mysql data chgrp -R mysql .
mysql 실행 테스트#
./bin/mysqld_safe --log-error=error & bin/mysql ./bin/mysqladmin shutdown ps -ef | grep mysql mysql 살아있는지 여부체크
환경설정 파일 복사(시스템 메모리 1~2GB 기준)#
cp ./support-files/my-huge.cnf ./my.cnf
- mysql 실행 -> 접속테스트 -> 프로세스 확인후 kill
./bin/mysqld_safe --user=mysql --log-error=error & ./bin/mysql ./bin/mysqladmin shutdown #mysql 살아있는지 여부체크 ps -ef | grep mysql
부팅시 자동 실행#
cp support-files/mysql.server /etc/init.d/mysqld vi /etc/init.d/mysqld <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< basedir=/usr/local/mysql datadir=/usr/local/mysql/data >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> chkconfig --add mysqld chkconfig --list mysqld
Add new attachment
Only authorized users are allowed to upload new attachments.