Configure MySQLdb connection