| 用途 | 服务生命周期管理 |
|---|---|
| 命令 | systemctl start/stop/restart/status mysqld |
| 自启 | systemctl enable/disable mysqld |
常用操作
常用操作
systemctl status mysqld
systemctl restart mysqld
systemctl enable mysqld
systemctl stop mysqld && systemctl start mysqld宝塔环境
宝塔环境
/etc/init.d/mysqld restart
bt 1 # 面板菜单(交互式)重启会断开全部连接并可能触发崩溃恢复;生产建议先切走流量、确认无大事务与备份任务在跑。