/etc 밑에 my.cnf가 없을 시 어떤 .cnf 파일을 읽어옵니까?
지금 HP-UX 장비입니다.
binary로 설치를 하였습니다.
설치 디폴트를 /usr/local 이 아닌 /var/opt 로 설정을
하였습니다.
root 환경 파일에 mysql 관련하여 패스는 잡혀있습니다.
/etc/group에도 mysql 그룹에 root 잡혀있습니다.
root@localhost> find / -name my.cnf -print 로 찾아보았지만
없습니다.
.my.cnf, my.ini, .my.ini 등 없습니다.
그런데 아무 디렉토리에서 myslqd_safe --user=root &로 띄웠을
때 아래와 같이 에러가 납니다.
STOPPING server from pid file
/var/opt/mysql/data/smsc2.pid
060109 13:47:12 mysqld ended
[1] + Done mysqld_safe
--user=root &
|
위와 같을 시
shell> cd $MYSQL
shell> bin/mysqld_safe --user=root &
|
이렇게 띄워야 가능합니다.
그래서 support-files/ 밑에 있는 mysql.server 파일을
/etc/my.cnf로 복사한 후
실행하면 다음과 같은 에러가 납니다.
smsc2:root> mysqld_safe --user=root &
[1] 7056
smsc2:root> error: Found option without preceding group
in config file: /etc/my.cnf at line: 42
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file:
/etc/my.cnf at line: 42
Fatal error in defaults handling. Program aborted
Starting mysqld daemon with databases from
/var/opt/mysql/data
STOPPING server from pid file
/var/opt/mysql/data/smsc2.pid
060109 14:07:15 mysqld ended
[1] + Done mysqld_safe --user=root
&
|
41 줄은
basedir=
이렇게 비워져 있습니다.
그래서 basedir=/var/opt/mysql
이렇게 변경 후 실행하여도 역시 위와 같은 에러가 났습니다.
그래서 mysqd_safe 명령어 스크립트에서 basedir 및 datadir을
/usr/local/mysql 에서 /var/opt/mysql으로 변경한 후
mysqld_safe --user=root &로 띄워도 프로세스가 죽지
않습니다.
|