I have the following code written in python, id is an auto increment field and the data type for sample is nvarchar(45). I want to insert the content of the file into my table; the data is unstructured:
db = MySQLdb.connect("localhost", "root", "Mydatabases#0", "myblog")
cursor = db.cursor()
cursor.execute("insert into mytable (id,sample) values (DEFAULT ,LOAD_FILE('C:/Discharge_Summary/sample_648.txt'))")
db.commit()
db.close()
I do not see any error, but when I select * from my table, I see null for sample field!!! why it cannot load the file content into MySql?
The screenshot shows that I have all required permissions...