Connect to mysql database using python with MySQLdb cursor