Fixed database initialization

Fixed problem when root password is set before the server is ready
Merge pull request #2 from Mordred/patch-1

Fixed database initialization