강좌
클라우드/리눅스에 관한 강좌입니다.
리눅스 분류

데몬 스크립트 파일 : /etc/rc.d/init.d/mysqld

작성자 정보

  • 구돌 작성
  • 작성일

컨텐츠 정보

본문

데몬 스크립트 파일 : /etc/rc.d/init.d/mysqld

 

여러분들께서도 너무나 잘 아시는 MySQL 데이터베이스를 실행(중지)시키는 스크립트입니다. 

 

 

 

 

이 스크립트에 관련된 명령어들은 이 책의 mysql명령어편을 참조하시기 바랍니다. 

 

 

 

 

사용옵션 : start|stop|status|condrestart|restart

 

설정파일       : /etc/my.cnf

PID파일        : /var/run/mysqld/mysqld.pid

데이터저장위치 : /var/lib/mysql

 

스크립트 사용예

[root@command init.d]# /etc/rc.d/init.d/mysqld stop

Stopping MySQL:  [  OK  ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/mysqld start

Starting MySQL:  [  OK  ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/mysqld restart

Stopping MySQL:  [  OK  ]

Starting MySQL:  [  OK  ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/mysqld status

mysqld (pid 2234) is running...

[root@command init.d]#

[root@command init.d]# ps -ef | grep mysqld

root      2209     1  0 23:06 pts/0    00:00:00 /bin/sh /usr/bin/safe_mysqld --defaults-file=/etc/my.cnf

mysql     2234  2209  0 23:06 pts/0    00:00:00 [mysqld]

root      2248  1993  0 23:06 pts/0    00:00:00 grep mysqld

[root@command init.d]#

 

 

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,032 명
  • 현재 강좌수 :  35,773 개
  • 현재 접속자 :  200 명