Kloadut/dokku-md-dockerfiles — pull request #2 by Mordred (2014-07-03 18:25:42+00:00)
Title: Fixed database initialization

Hi,

you have hardcoded sleep 8 at https://github.com/Kloadut/dokku-md-dockerfiles/blob/master/start_mariadb.sh#L11

This is not good solution, because when the machine is currently slower, the password will not be set and next commands will print:
```ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'```
because the server is not ready.

Instead of hardcoded 8s sleep I used sleep loop which detects when the connection can be made