Fixed crash on start. Implemented MySQL auto-reconnect.