I have recently been stumped by this too, so your question finally made me sit down and look into upstart.
Most solutions I have found won't work properly, because they suggest making changes that will cause the service to fail to start.
This is not what you want because you still want the service to start when called manually.
I have come to the conclusion that you can't use upstart like sysvinit. You have to think event based.
So what you want to do is cause MySQL to not try to start on any change to run level, or specifically run level 2, which is the run level Ubuntu runs in (by default although apart from 0 and 6 they all now appear to be the same).
The configuration (what used to be called an init script) is now /etc/init/mysql.conf and not /etc/init.d/mysql
The bit that starts the service is
Code:
start on (net-device-up
and local-filesystems)
In other words, when the network devices start and the disks are mounted, start MySQL.
Okay, so that is always.
You need to comment out those lines, otherwise MySQL will always start on boot.
However you do still need a "start on" section so use this instead:
start on runlevel [!0123456]
That is ( in words), start MySQL when the run level is not 0,1,2,3,4,5 or 6.
Okay so that is never.
You now are in the situation when MySQL will never start automatically by upstart, and you have not had to rename any configurations or in any other way break MySQL as a service and you can still start MySQL manually using
Code:
service mysql start
The documentation on this is scarce, so any feedback would be appreciated.
Thanks to :
http://old.nabble.com/Start-stop-ser...d26272954.html