mysql: reconnect on connection error