wait for mysql availability

abi abi at abinet.ru
Sat Jun 11 17:52:11 UTC 2016


Yep, that's innodb. It can warm up less than a second, but it's enough 
sometimes. Actually, from my point of view, mysql loader should return 
control after it's properly initialized. I doubt every port maintainer 
must invent their own bicycle if port depends on mysql.

On 11.06.2016 19:40, Michael Gmelin wrote:
>
>> On 11 Jun 2016, at 08:11, Mathieu Arnold <mat at FreeBSD.org> wrote:
>>
>>
>>
>> +--On 11 juin 2016 13:48:52 +0300 abi <abi at abinet.ru> wrote:
>> | Hello,
>> |
>> | 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.
>> |
>> | Are there any way to check mysql availability that would by mysql setup
>> | agnostic?
>> |
>> | I have 2 ideas: use sleep() or standalone script using application
>> | credentials in prestart.
>>
>> 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.
>>
>>
> There's a difference between starting MySQL and it becoming available to clients, e.g. when innodb is recovering from a crash, which can take a long time and is not necessarily something you want to wait for on boot.
>
> - m
>
>



More information about the freebsd-ports mailing list