I encountered this same issue a few years ago when using the Go mysql driver, and the simple fix was calling db.Ping() before doing a query, which checks the connection and allows the query to proceed.
It's still a performance penalty, but it moves the round trip to a 99% latency situation instead of an every query situation.