On 2007/09/19 16:28, Tomas wrote: > That's an excelent idea. I will use 'pkill mysqld'. But instead > of 'sleep 10' myabe it's better to check every second if mysqld.sock > exists?
I would choose to limit the maximum time, in case mysqld deadlocks. I think "pgrep mysqld" is a safer test than mysqld.sock (unless you've read mysql code and determined that the control socket is only removed after the tables have been flushed).