wait for mysql availability

abi abi at abinet.ru
Sat Jun 11 11:14:46 UTC 2016


That's zoneminder and it doesn't survive mysql restart :-]

On 11.06.2016 13:54, Kurt Jaeger wrote:
> Hi!
>
>> 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 second one is much better. The daemon should retry anyway if
> the mysql connection is not available. Otherwise, how does it
> cope if the mysql database is restarted ?
>



More information about the freebsd-ports mailing list