mysql(8.0.28)设置开机自启动
生活随笔
收集整理的这篇文章主要介绍了
mysql(8.0.28)设置开机自启动
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
1.安装完mysql后在/etc/rc.d/init.d会自动生成个mysql文件
[root@dev init.d]# ls functions mysql netconsole network README [root@dev init.d]# pwd /etc/rc.d/init.d [root@dev init.d]#如果没有mysql文件则需要将安装mysql目录下的mysql.server文件复制到/etc/rc.d/init.d,并赋予执行权限
[root@dev support-files]# ls mysqld_multi.server mysql-log-rotate mysql.server [root@dev support-files]# pwd /opt/mysql/support-files [root@dev support-files]# cp /opt/mysql/support-files/mysql.server /etc/rc.d/init.d/mysql [root@dev support-files]# chmod +x /etc/rc.d/init.d/mysql2.添加为服务
[root@dev support-files]# chkconfig --add mysql3.查看服务2,3,4,5 开着则添加成功
[root@dev support-files]# chkconfig --list注:该输出结果只显示 SysV 服务,并不包含 原生 systemd 服务。SysV 配置数据 可能被原生 systemd 配置覆盖。 要列出 systemd 服务,请执行 'systemctl list-unit-files'。查看在具体 target 启用的服务请执行'systemctl list-dependencies [target]'。mysql 0:关 1:关 2:开 3:开 4:开 5:开 6:关 netconsole 0:关 1:关 2:关 3:关 4:关 5:关 6:关 network 0:关 1:关 2:开 3:开 4:开 5:开 6:关4.重启验证
总结
以上是生活随笔为你收集整理的mysql(8.0.28)设置开机自启动的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 常见二维码上那些奇怪的图案是什么
- 下一篇: SQL Server Note [vay