I am trying to retrieve my data from MySQL to be used in python. But it prints out TypeError: 'NoneType' object is not iterable
The server log shows that Access denied for user 'root'@'localhost' (using password: NO)
This is the server log . Thanks in advance!
Edit: This is the python code
import pandas as pd
user, pw, host, db = 'root', '12345', '127.0.0.1', 'ca2database'
cnx = mysql.connector.connect(user=user, password=pw, host=host, database=db)
cursor = cnx.cursor()
df= pd.read_sql('SELECT * FROM student', con=cnx)
print(df)
cursor.close()
cnx.close()
and this is the data in the sql