mysql not starting on boot
m.seaman at infracaninophile.co.uk
Wed Jan 6 16:17:06 UTC 2010
> Since I upgraded to FreBSD 8.0, I'm noticing that mysql isn't starting
> on boot anymore. It starts fine once the system has booted, and looking
> at the mysql log I see:
> 100105 17:46:56 mysqld_safe Starting mysqld daemon with databases from
> 100105 17:46:56 [ERROR] Can't start server: cannot resolve hostname!:
> Unknown er
> ror: 0
> 100105 17:46:56 [ERROR] Aborting
> I use dhcp and ddns in my network, so I'm guessing that mysql is
> attempting to start before the networking has stabilized. Is there a
> way to make mysql be the last thing started at boot?
MySQL will be happy if it can work out what the hostname of the machine
is. You say you're using ddns? If that means your machines are pushing
a hostname up to the DHCP server while they ask it for an IP number, then
there should be no problem.
You can simply set the hostname in /etc/rc.conf -- it doesn't really
matter if the machine thinks its name is one thing, and the IPs on its
network interfaces resolve to something else (at least, not for the
purposes of running mysql.). The thing you'ld have to look out for are
the host part of usernames in grants of permissions to users.
> I tried adding:
> # REQUIRE: NETWORKING
> To the init script, but that didn't seem to have any effect. Is there a
> tool that will run through all the init scripts and tell you the order
> of startup?
You might also find it beneficial to use 'SYNCDHCP' instead of plain 'DHCP'
in ifconfig_XXY lines in /etc/rc.conf -- this will cause the boot process to
block on getting an IP for the interface, rather than the default action of
backgrounding that process and trying to start everything else up.
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 259 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100106/e6c0b099/signature.pgp
More information about the freebsd-questions