Prevent Mysql starting at boot

刘勇泰 lytric at gmail.com
Wed Apr 28 02:40:28 UTC 2010


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:

> Read your last post.
> Do you have /etc/init/mysql.conf file?
> 
> At /etc/init there are no configuration files, only scripts (usualy
> refered as init scripts).
> Configuration files should be in /etc. Right?
> 
> I'm not using lucid (yet), sorry if my help is limited.
> 
> A good reading from LSB
> (http://www.linuxfoundation.org/collaborate/workgroups/lsb) about
> System initialization
> http://refspecs.linux-foundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/tocsysinit.html
> 
> Regards
> Luis
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100428/19927969/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: 这是信件的数字签名部分
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100428/19927969/attachment.sig>


More information about the ubuntu-users mailing list