>>>>> "Javier" == Javier Vegas <javier@stripped> writes:
Javier> Vivek Khera wrote:
>> >>>>> "JV" == Javier Vegas <javier@stripped> writes:
JV> Again, I dont care so much that it crashes, but is not supposed to
JV> and restart itself?
>> If it crashes, it should restart. If it exits cleanly, it will not
>> restart under the assumption that it was told to shutdown.
Javier> I may have found why it is not restarting when crashing:
Javier> Looking through the safe_mysqld script, it assumes the pid_file
Javier> is $DATADIR/`/bin/hostname`.pid , which in my case is
Javier> (/bin/hostaname gives machine.domain.com).
Javier> However, looking in the var directory, the file that contains the pid is
Javier> actually called
Javier> /usr/local/mysql/var/machine.pid (to make things even more confusing,
Javier> the error log is
Javier> called usr/local/mysql/var/machine.domain.com.pid)
Javier> So when mysqld crashes, safe_mysqld looks for
Javier> does not find it, assumes it was shut down cleanly, and goes away.
Javier> So it seems there is some discrepancy between how the hostname is
Javier> obtained when starting
Javier> mysqld and when safe_mysqld is monitoring.
Javier> As a temporary fix, I created
Javier> /usr/local/mysql/var/machine.domain.com.pid as a
Javier> symbolic link to /usr/local/mysql/var/machine.pid.
Javier> Does this sound reasonable, or am I totally off?
The proper way is probably to edit /etc/hosts to get your host names right.
Anyway, you can change safe_mysqld to use the --pid-file argument to
mysqld to force it to use the same file name as safe_mysqld.