Add auto reconnect for mysql