Prevent Mysql starting at boot
Luis Paulo
luis.barbas at gmail.com
Wed Apr 28 07:22:40 UTC 2010
2010/4/28 刘勇泰 <lytric at gmail.com>:
> Thanks for you links, they are worthy to be read. Maybe the directory layout
> of lucid is different from karmic's? I got /etc/init.d AND /etc/init . The
> former contains init scripts and the latter contains init daemon job
> configuration(see manpage init(5)).
>
> The content of my /etc/init/mysql.conf is:
>
> # MySQL Service
>
> description "MySQL Server"
> author "Mario Limonciello <superm1 at ubuntu.com>"
>
> start on (net-device-up
> and local-filesystems)
> stop on runlevel [016]
>
> respawn
>
> env HOME=/etc/mysql
> umask 007
>
> pre-start script
> #Sanity checks
> [ -r $HOME/my.cnf ]
> [ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d
> /var/run/mysqld
> LC_ALL=C BLOCKSIZE= df --portability /var/lib/mysql/. | tail -n 1 | awk
> '{ exit ($4<4096) }'
> end script
>
> exec /usr/sbin/mysqld
>
> post-start script
> while ! /usr/bin/mysqladmin --defaults-file=$HOME/debian.cnf ping
> do
> sleep 1
> done
> exec $HOME/debian-start
> end script
>
> It causes mysql starting when network device and locale file system are
> ready. At first I only removed init script symbolic links in /etc/rc*.d, it
> didn't work. And now I also commented out the "start on" lines in
> mysql.conf, it's done.
>
> On 2010-04-28 02:31 +0100,Luis Paulo wrote:
> At /etc/init there are no configuration files, only scripts (usualy
> refered as init scripts).
> Configuration files should be in /etc. Right?
Ahh. Ok. I meant /etc/init.d, I didn't even knew about /etc/init,
sorry. But I have it on karmic, yes. Not on hardy.
I need a refresh on upstart, I see.
Thanks, and thank you also, Nils
More information about the ubuntu-users
mailing list