1. MYSQL 설치
mysql 버전 : mysql-5.0.51.tar.gz
mysql 설치경로 : /usr/local/server/mysql
mysql 유저 생성
useradd -M -s /bin/false mysql
./configure --prefix=/usr/local/server/mysql
--with-charset=utf8 --with-extra-charsets=all
make
make install
mysql 환경설정 파일 복사,
시작스크립트 복사
[root@localhost mysql-5.0.51]# pwd
/usr/local/src/APM/mysql-5.0.51
[root@localhost mysql-5.0.51]# cp
support-files/my-huge.cnf /etc/my.cnf
[root@localhost mysql-5.0.51]# cp
support-files/mysql.server /etc/init.d/mysqld
[root@localhost mysql-5.0.51]# chmod 755
/etc/init.d/mysqld
[root@localhost mysql-5.0.51]# chkconfig
--add mysqld
[root@localhost mysql-5.0.51]# chkconfig
--list mysqld
mysqld 0:해제 1:해제 2:활성 3:활성
4:활성 5:활성 6:해제
[root@localhost mysql-5.0.51]# chkconfig
--level 24 mysqld off
[root@localhost mysql-5.0.51]# chkconfig
--list mysqld
mysqld 0:해제 1:해제 2:해제 3:활성
4:해제 5:활성 6:해제
[root@localhost mysql-5.0.51]#
mysql 데이터베이스 초기화 및
디렉토리 퍼미션 설정
[root@localhost mysql-5.0.51]# cd /usr/local/server/mysql/
[root@localhost mysql]# chown -R mysql .
[root@localhost mysql]# chgrp -R mysql .
[root@localhost mysql]# bin/mysql_install_db
--user=mysql
[root@localhost mysql]# chown -R root .
[root@localhost mysql]# chown -R mysql var
[root@localhost mysql]# /etc/init.d/mysqld
start
Starting MySQL & |