Load To Technical Architect

[Linux] Mysql Service 등록 본문

DB/mysql

[Linux] Mysql Service 등록

고지식한청춘 2020. 6. 11. 17:31
728x90

Mysql 서비스 등록

 

1. Service 파일 생성

$ vi /usr/lib/systemd/system/mysql.service

 

[Unit]

Description=MySQL Community Server

After=network.target

After=syslog.target



[Install]

WantedBy=multi-user.target

Alias=mysql.service



[Service]

User=mysql

Group=mysql





# Start main service

ExecStart=/usr/local/mysql/bin/mysqld_safe --user=mysql



# Give up if ping don't get an answer

TimeoutSec=300

PrivateTmp=false

 

 

2. systemctl daemon 재시작

# systemctl daemon-reload

 

 

◎ 정상적으로 Service가 등록되었는지 확인

$ systemctl status mysql

728x90

'DB > mysql' 카테고리의 다른 글

[Linux] Mysql Replication  (2) 2020.06.16
[Linux] Mysql Federated  (0) 2020.06.16
[Linux] Mysql Tomcat 연동  (2) 2020.06.15
[Linux] Mysql 5.7.20 Compile  (0) 2020.06.11
Comments