这个Mysql为什么会自启动了

为当前最终发行版之前的所有版本提供支持
回复
OoZOooz
帖子: 8
注册时间: 2011-04-17 16:42
送出感谢: 0
接收感谢: 0

这个Mysql为什么会自启动了

#1

帖子 OoZOooz » 2011-04-21 21:30

我装好Mysql后,发现Mysql自启动了。我查不出它在哪里设置的。请高手帮我看一下:
我的runlevel是2

代码: 全选

linux@linux-desktop:/etc$ ls rc*
rc.local

rc0.d:
K20winbind    S10unattended-upgrades  S30urandom       S40umountfs
K74bluetooth  S15wpa-ifupdown         S31umountnfs.sh  S60umountroot
README        S20sendsigs             S35networking    S90halt

rc1.d:
K15pulseaudio    K20rsync              K20winbind    README        S70pppd-dns
K20acpi-support  K20saned              K74bluetooth  S30killprocs  S90single
K20kerneloops    K20speech-dispatcher  K80cups       S70dns-clean

rc2.d:
README                S25bluetooth   S70dns-clean       S99ondemand
S20fancontrol         S50cups        S70pppd-dns        S99rc.local
S20kerneloops         S50pulseaudio  S90binfmt-support
S20speech-dispatcher  S50rsync       S99acpi-support
S20winbind            S50saned       S99grub-common

rc3.d:
README                S25bluetooth   S70dns-clean       S99ondemand
S20fancontrol         S50cups        S70pppd-dns        S99rc.local
S20kerneloops         S50pulseaudio  S90binfmt-support
S20speech-dispatcher  S50rsync       S99acpi-support
S20winbind            S50saned       S99grub-common

rc4.d:
README                S25bluetooth   S70dns-clean       S99ondemand
S20fancontrol         S50cups        S70pppd-dns        S99rc.local
S20kerneloops         S50pulseaudio  S90binfmt-support
S20speech-dispatcher  S50rsync       S99acpi-support
S20winbind            S50saned       S99grub-common

rc5.d:
README                S25bluetooth   S70dns-clean       S99ondemand
S20fancontrol         S50cups        S70pppd-dns        S99rc.local
S20kerneloops         S50pulseaudio  S90binfmt-support
S20speech-dispatcher  S50rsync       S99acpi-support
S20winbind            S50saned       S99grub-common

rc6.d:
K20winbind    S10unattended-upgrades  S30urandom       S40umountfs
K74bluetooth  S15wpa-ifupdown         S31umountnfs.sh  S60umountroot
README        S20sendsigs             S35networking    S90reboot

rcS.d:
README          S25brltty    S47lm-sensors  S70screen-cleanup
S13pcmciautils  S37apparmor  S55urandom     S70x11-common

头像
退避九舍
帖子: 741
注册时间: 2010-08-08 20:02
系统: Ubuntu 12.04
送出感谢: 0
接收感谢: 1 次

Re: 这个Mysql为什么会自启动了

#2

帖子 退避九舍 » 2011-04-21 22:34

代码: 全选

修改/etc/init/mysql.conf
将其中的
start on (net-device-up
          and local-filesystems
	  and runlevel [2345])
改为
start on (net-device-up
          and local-filesystems
	  and runlevel [345])
即吧2345中的2去掉
退避九舍:富贵不能淫,贫贱不能移,威武不能屈:坚持ubuntu不动摇!
头像
xieshaohu
帖子: 1565
注册时间: 2007-10-24 20:20
来自: 北京、海淀
送出感谢: 0
接收感谢: 1 次
联系:

Re: 这个Mysql为什么会自启动了

#3

帖子 xieshaohu » 2011-04-22 11:08

我直接注释掉了这三行。

代码: 全选

#start on (net-device-up
#          and local-filesystems
#	  and runlevel [2345])
Dell Vostro 1500, T7300/4GB/WD5000BEVT/nVidia 8400GM, Ubuntu 10.04 x86_64/VMware 7(Win7)
我的博客:http://xieshaohu.wordpress.com/
OoZOooz
帖子: 8
注册时间: 2011-04-17 16:42
送出感谢: 0
接收感谢: 0

Re: 这个Mysql为什么会自启动了

#4

帖子 OoZOooz » 2011-04-22 12:59

明白了,原来启动时不仅仅加载rcX.d,init首先会去执行/etc/init/*.conf的脚本部分.
谢谢!
回复

回到 “老旧版本支持”