Reconnect mysql server on connection lost error