Reinitialize MySQL connection if it's been closed