python - mysql query not working
问题 I am trying to load data into a MySQL table with the following Python script: conn = connect_db() cursor = conn.cursor() cursor.execute( "LOAD DATA LOCAL INFILE " + jobsummaryfile + " INTO TABLE daily_job_summary " + "FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (@col1, @col2, @col3, @col4) " + "set jobname=@col1, queue=@col2, maphours=@col3, reducehours=@col4, date=" + date + ", pipeline=" + pipeline_name + ", grid=" + grid ) I am getting the following error: _mysql_exceptions