systemctl stop tidb-3306.service 可以成功,也可以start成功,但是端口并没有起来。
tidb-3306.service
[Unit]
Description=tidb service
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
LimitNOFILE=1000000
LimitSTACK=10485760
User=tidb
ExecStart=/bin/bash -c '/data1/deploy/scripts/run_tidb.sh'
Restart=always
RestartSec=15s
[Install]
WantedBy=multi-user.target
cat /data1/deploy/scripts/run_tidb.sh
#!/bin/bash
set -e
# WARNING: This file was auto-generated. Do not edit!
# All your edit might be overwritten!
DEPLOY_DIR=/data1/deploy
cd "${DEPLOY_DIR}" || exit 1
exec env GODEBUG=madvdontneed=1 bin/tidb-server \
-P 3306 \
--status="10080" \
--host="0.0.0.0" \
--advertise-address="10.10.5.28" \
--store="tikv" \
--initialize-insecure \
--path="10.10.5.29:2379,10.10.5.28:2379,10.10.5.33:2379" \
--log-slow-query="/data1/deploy/log/tidb_slow_query.log" \
--config=conf/tidb.toml \
--log-file="/data1/deploy/log/tidb.log" 2>> "/data1/deploy/log/tidb_stderr.log"