MySQL 开机自启动

MySQL 开机自启动

chkconfig add mysqld

如果是CentOS 7

chkconfig  --add mysqld

或者

echo "/usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf &" >>/etc/rc.local

需要给 /etc/rc.local 文件赋予执行的权限

chmod +x /etc/rc.d/rc.local

原文地址:https://www.cnblogs.com/liang545621/p/7518188.html