在linux中配置MySQL自动启动

chkconfig --level 345 mysqld on

使用上面的命令配置mysql开发自启动,我们用 systemctl list-unit-files查看系统服务:

systemctl list-unit-files  

我们可以看到mysqld服务已经被允许自启动

关闭自启动:

chkconfig --level 345 mysqld off  

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注