
时间:2015-06-28 00:00 来源:IT猫扑网|http://www.itmop.com/ 作者:网管联盟 我要评论(0)
取消自动启动
linux:/etc/init.d&>root@sean-linux:/etc/init.d# service mysql stop
* Stopping MySQL database server mysqld [ OK ]
root@sean-linux:/etc/init.d# update-rc.d -f mysql remove
Removing any system startup links for /etc/init.d/mysql ...
/etc/rc0.d/K21mysql
/etc/rc1.d/K21mysql
/etc/rc2.d/S19mysql
/etc/rc3.d/S19mysql
/etc/rc4.d/S19mysql
/etc/rc5.d/S19mysql
/etc/rc6.d/K21mysql
手动启动
root@sean-linux:/etc/init.d# service mysql start
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
手动停止
root@sean-linux:/etc/init.d# service mysql stop
* Stopping MySQL database server mysqld [ OK ]
添加自动启动
root@sean-linux:/etc/init.d# update-rc.d -f mysql defaults
Adding system startup for /etc/init.d/mysql ...
/etc/rc0.d/K20mysql -> ../init.d/mysql
/etc/rc1.d/K20mysql -> ../init.d/mysql
/etc/rc6.d/K20mysql -> ../init.d/mysql
/etc/rc2.d/S20mysql -> ../init.d/mysql
/etc/rc3.d/S20mysql -> ../init.d/mysql
/etc/rc4.d/S20mysql -> ../init.d/mysql
/etc/rc5.d/S20mysql -> ../init.d/mysql
root@sean-linux:/etc/init.d#
----------------------------------------------------------------------------
补充
Ubuntu 取消 Apache及MySQL等自启动
1. 装个 sysv-conf-rc
2. sudo update-rc.d -f mysql remove 删除mysql随机器启动的服务
sudo update-rc.d -f apache2 remove 删除apache2随机器启动的服务
3. 查看/etc/rc2.d/里面的apache和mysql启动脚本,通常都是两个阿拉伯数字后再接一个英文字母,再加脚本名称。英文字母是S的都是会自动启动的,K则相反。所以只要找到apache和mysql的启动脚本,把S改成K就可以了。
关键词标签:Ubuntu,MySQL
相关阅读 Xbox Game Pass 10款MySQL数据库客户端图形界面管理工具推荐 MySQL常用维护管理工具 MySQL数据库启动失败1067进程意外终止的解决办法总结 MySQL故障:got error 127 when reading table 的错误的原因及解决办法 MySQL CPU 占用 100% 的解决过程
热门文章
10款MySQL数据库客户端图形界面管理工具推荐
MySQL常用维护管理工具
使用命令行监控MYSQL
MySQL安装指南大盘点
mssql数据导入MySQL数据库实操
数据库技巧——MySQL十大优化技巧
人气排行 10款MySQL数据库客户端图形界面管理工具推荐 MySQL数据库启动失败1067进程意外终止的解决办法总结 Mysql 1045错误解决办法 MySQL服务器进程CPU占用100%解决办法 MySQL导出导入命令的用例 MySQL连接字符串的实际操作步骤汇总 MySQL无法启动、无法停止各种解决方法总结 三种常用的MySQL建表语句 Mysql清空表的实现方法 MySQL故障:got error 127 when reading table 的错误的原因及解决办法 查看MySQL数据库表的命令介绍 Foxpro到MySQL的数据转换技术介绍
查看所有0条评论>>