Have 'cron' run the normal "mysql" init script (should have come with the
distribution). The script already checks to see if there's a "mysql" process
already running (and issues a "A mysqld process already exists" message).
Your 'cron' entry should look like:
00,10,20,30,40,50 * * * * /home/me/scripts/mysql start > /dev/null 2>
/home/me/logs/mysql_errors
Gary Bickford wrote:
> I have a 'normal user' mysql setup on a server not my own - I have no
> root access and they won't add mysql to the server's startup scripts.
>
> I need a way to have the daemon start up when the server is rebooted.
> I do have access to cron jobs, so I thought I might build a script
> that fires every five minutes or so, looks to see if mysql is already
> running, and if not tries to fire it up. (It runs under my userid)
>
> Has anyone else already done this? Can I borrow a copy of your
> script? I can do a fairly simple one if need be, but if someone else
> has already done this it would save me some time, and yours is
> probably better than mine would be anyway!!
>
> I suppose it might be worthwhile to also use this as a watchdog and
> send me email if it fails to start.
>
> Thanks in advance
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php