Minor refactoring of mysqlconnect