MySQL reconnect if db has gone away