krish – 起死回生 [Wake up from death & return to life.]

September 4, 2011

Stop MySQL from auto starting in Ubuntu

Filed under: GNU/Linux — krish @ 12:44 am
Tags: , , , , , ,

That’s right.

If you’ve tried using update-rc.d and sysv-rc-conf and STILL see mysql process starting up!

krish@shenron:~$ ls -ltr /etc/rc?.d | grep mysql
krish@shenron:~$ ps aux | grep mysql | grep -v grep
mysql     1172  0.0  1.1 177888 18996 ?        Ssl  Sep03   0:01 /usr/sbin/mysqld
krish@shenron:~$ WTF!!!

Here’s where it matters and how to stop mysql from auto starting:

krish@shenron:~$ grep -A3 "start on" /etc/init/mysql.conf
start on (net-device-up
          and local-filesystems
	  and runlevel [2345])
stop on runlevel [016]

Just comment out the 3 lines for “start on” to make it

krish@shenron:~$ grep -A3 "start on" /etc/init/mysql.conf
#start on (net-device-up
#          and local-filesystems
#          and runlevel [2345])
stop on runlevel [016]

Reboot and check:

krish@shenron:~$ sudo init 6
About these ads

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Please leave a Reply / Discuss this topic here :)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: