From owner-freebsd-questions@FreeBSD.ORG Wed Jan 6 16:59:43 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABAD4106568B for ; Wed, 6 Jan 2010 16:59:43 +0000 (UTC) (envelope-from fbsd.questions.list@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id 3BDE98FC0A for ; Wed, 6 Jan 2010 16:59:42 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 22so852684eye.9 for ; Wed, 06 Jan 2010 08:59:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=Xr8jV0qY/0jLkK4vAJhmsS9QMOOgNQVNjBrqQRSrTJI=; b=CtB7DaBDBhD7FKfmNtVg9Xe+jtwYXJMzYgGd3u/AmzKddQQJ+xvBRdWjq2NbWACBBc TivBNgQ7vkLz2ghWqSWUUEnwke6MGNTRBl+G8fKP5aa33tLa03kCkp+0iOuDzeAL3z0+ 5qCKOrSNvK6vPNLtDDWslBTqWkILwyRDZ74Lc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=t9g1AQdgDPfbf4GMhRJaQqZS10VhpbxYP/rc4xNUSl0nPT6Uw9In3JW08GO5qDgMiJ Tn0DqDvRRXywUNBRc1Zckn2dIsfYjnU2QKl5Wuf9fOgeRGY/NzHtKIgvdOiG/GwvMOdn aIQ+FBFsPKTR8VGSl6jjOGsuQssAyA6r+g2JI= Received: by 10.213.23.144 with SMTP id r16mr8320539ebb.41.1262797172849; Wed, 06 Jan 2010 08:59:32 -0800 (PST) Received: from ?192.168.2.2? (ip4da86a9a.direct-adsl.nl [77.168.106.154]) by mx.google.com with ESMTPS id 7sm2222477eyb.26.2010.01.06.08.59.30 (version=SSLv3 cipher=RC4-MD5); Wed, 06 Jan 2010 08:59:31 -0800 (PST) From: =?ISO-8859-1?Q?D=E1rio?= "P." To: Matthew Seaman In-Reply-To: <4B44B776.9050300@infracaninophile.co.uk> References: <4B44B376.2010005@midsummerdream.org> <4B44B776.9050300@infracaninophile.co.uk> Content-Type: text/plain; charset="UTF-8" Date: Wed, 06 Jan 2010 17:59:35 +0100 Message-ID: <1262797175.5561.9.camel@dasp-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: mysql not starting on boot X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 16:59:43 -0000 Qua, 2010-01-06 às 16:16 +0000, Matthew Seaman escreveu: > 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 looking > > at the mysql log I see: > > > > 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!: > > 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 have exactly the same problem, but with apache. It seems that the apache try to start before the network. > > 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? > > rcorder(8) > > 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. This will be useful for me too. Thank you.