I needed to shutdown mysql in order to move the database to a bigger partition..
from looking at /etc/init.d/mysql it says :
$ECHO “Rather than invoking init scripts through /etc/init.d, use the service(8)”
$ECHO “utility, e.g. service $INITSCRIPT $COMMAND”
so I enterd this commend :
root@prog:/etc/init.d# service mysql stop
mysql stop/waiting
It appears to have shut it down – but is this the best way to stuff mysql (or anything else)?
also, when I issue this command, mysql is still listed, but does is not running :
root@prog:/etc/init.d# service –status-all | grep mysql
[ ? ] mysql
so I guess service does not list stuff actually running, but ‘may potentially be run’?
Don
The service command is the best current method for most daemons, however you need to be careful with MySQL. The MySQL engine is generally bad at shutting down, and you should start by restricting access to it by turning off any services which may be writing to a database during the shutdown. There are also solutions such as percona server which have changed the shutdown and restart code to be much safer.