implementing mysqldb