first commit
This commit is contained in:
27
mysqld.service
Normal file
27
mysqld.service
Normal file
@@ -0,0 +1,27 @@
|
||||
[Unit]
|
||||
Description=MySQL Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=mysql
|
||||
Group=mysql
|
||||
|
||||
# 直接使用 mysqld
|
||||
ExecStart=/usr/local/mysql/bin/mysqld --defaults-file=/etc/my.cnf
|
||||
ExecStop=/usr/local/mysql/bin/mysqladmin shutdown
|
||||
|
||||
# 重启策略
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
|
||||
# 超时设置
|
||||
TimeoutStartSec=300
|
||||
TimeoutStopSec=60
|
||||
|
||||
# 资源限制
|
||||
LimitNOFILE=65536
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user