Date: Wed, 06 Jan 2010 16:16:54 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: lists@midsummerdream.org Cc: freebsd-questions@freebsd.org Subject: Re: mysql not starting on boot Message-ID: <4B44B776.9050300@infracaninophile.co.uk> In-Reply-To: <4B44B376.2010005@midsummerdream.org> References: <4B44B376.2010005@midsummerdream.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2CB73EA3F5C3867F0F20F347 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Rob wrote: > 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 lookin= g=20 > at the mysql log I see: >=20 > 100105 17:46:56 mysqld_safe Starting mysqld daemon with databases from = > /var/db/m > ysql > 100105 17:46:56 [ERROR] Can't start server: cannot resolve hostname!:=20 > Unknown er > ror: 0 > 100105 17:46:56 [ERROR] Aborting >=20 > I use dhcp and ddns in my network, so I'm guessing that mysql is=20 > attempting to start before the networking has stabilized. Is there a=20 > 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. =20 > I tried adding: >=20 > # REQUIRE: NETWORKING >=20 > To the init script, but that didn't seem to have any effect. Is there = a=20 > tool that will run through all the init scripts and tell you the order = > of startup? rcorder(8) You might also find it beneficial to use 'SYNCDHCP' instead of plain 'DHC= P' 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. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig2CB73EA3F5C3867F0F20F347 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAktEt3wACgkQ8Mjk52CukIznKwCgk5KkRkn2goAeJ7L/zYzYgzNY 7YUAnREASgJivJ64gOTeetzU6GWOI1JT =+mqU -----END PGP SIGNATURE----- --------------enig2CB73EA3F5C3867F0F20F347--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B44B776.9050300>