From owner-freebsd-ports@freebsd.org Sat Jun 11 16:40:53 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85F96AEF5D6 for ; Sat, 11 Jun 2016 16:40:53 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 7715D2558 for ; Sat, 11 Jun 2016 16:40:53 +0000 (UTC) (envelope-from freebsd@grem.de) Received: by mailman.ysv.freebsd.org (Postfix) id 72916AEF5D4; Sat, 11 Jun 2016 16:40:53 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70050AEF5D3 for ; Sat, 11 Jun 2016 16:40:53 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id B90172555 for ; Sat, 11 Jun 2016 16:40:52 +0000 (UTC) (envelope-from freebsd@grem.de) Received: (qmail 8494 invoked by uid 89); 11 Jun 2016 16:40:51 -0000 Received: from unknown (HELO ?192.168.250.192?) (mg@grem.de@88.217.181.157) by mail.grem.de with ESMTPA; 11 Jun 2016 16:40:51 -0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: wait for mysql availability From: Michael Gmelin X-Mailer: iPhone Mail (13F69) In-Reply-To: <11C24D0E7B6E9F7E2D80B5C3@atuin.in.mat.cc> Date: Sat, 11 Jun 2016 18:40:50 +0200 Cc: abi , ports@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <20A7440D-80E1-4E2A-BAC4-713DC97CB949@grem.de> References: <575BEC94.70209@abinet.ru> <11C24D0E7B6E9F7E2D80B5C3@atuin.in.mat.cc> To: Mathieu Arnold X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2016 16:40:53 -0000 > On 11 Jun 2016, at 08:11, Mathieu Arnold wrote: >=20 >=20 >=20 > +--On 11 juin 2016 13:48:52 +0300 abi wrote: > | Hello, > |=20 > | I have a daemon depended on mysql database, however > | REQUIRE: mysql > | is not enough as mysql databases are not available immediately after > | mysql start, so my daemon fails to start. > |=20 > | Are there any way to check mysql availability that would by mysql setup > | agnostic? > |=20 > | I have 2 ideas: use sleep() or standalone script using application > | credentials in prestart. >=20 > The mysql server should be ready to use after its rc script returns, you > should open a PR with mysql for this to be fixed. >=20 >=20 There's a difference between starting MySQL and it becoming available to cli= ents, e.g. when innodb is recovering from a crash, which can take a long tim= e and is not necessarily something you want to wait for on boot. - m