Home > other >  Turn to the great god pymysql using load data infile error
Turn to the great god pymysql using load data infile error

Time:10-08

Want to use the load data infile method import mysql table data from the file:
The statement is as follows:
The load data local infile 'E:/TmpFile. TXT' replace into table Test4 character set utf8 fields terminated by ', 'escaped by' \ \ 'lines terminated by' \ r \ n '

Statements with Mysql console executes without problems, but with Mysql the execute method, will appear error message is:
(1064, "You have an error in your SQL syntax; Check the manual that corresponds to your MySQL server version for the right syntax to use near at line 1 \ '\' \ '")
If statement to remove escaped by '\ \', tip ERROR 1148 (42000) : The informs The command is not allowed with this MySQL version
  • Related