ubuntu设置mysql开机启动_ubuntu16.04开机启动mysql

ubuntu16.04开机启动mysql:

1、执行sysv-rc-conf --level 2345 mysql on,如果提示没有sysv-rc-conf命令,先下载

下载命令:sudo apt-get install sysv-rc-conf

2、查看服务列表sysv-rc-conf --list mysql,如果看到2345都是on,则设置成功

root@192:/home/bigdata# sysv-rc-conf --list mysql

mysql 0:off1:off2:on3:on4:on5:on6:off

3、重启reboot,检验msyql是否已经重启,ps -ef|grep mysql,如出现下图,说明重启成功

root@192:/home/bigdata# ps -ef|grep mysql

mysql 24747 1 0 10月18 ? 00:01:18 /usr/sbin/mysqld

root 24858 20869 0 10月18 pts/8 00:00:00 sudo mysql_secure_installation

root 24859 24858 0 10月18 pts/8 00:00:00 mysql_secure_installation

root 54018 20869 0 10:47 pts/8 00:00:00 vi /etc/mysql/my.cnf

root 54123 54102 0 10:49 pts/9 00:00:00 grep --color=auto mysql

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值