 <p>you missed this part i think</p> <pre><code>conn = mysql.connector.MySQLConnection(host='localhost',port='8051', database='example', user='root', password='tiger') cursor = conn.cursor() if conn.is_connected(): print('Connected to MySQL database') cursor.execute(""" SELECT * FROM album """) # fetch all of the rows from the query data = cursor.fetchall () # print the rows for row in data : print row[1] </code></pre>