I cannot understand what is going on. The following code below works well to add date from the pandas dataframe to mysql table.
# add date to the database for