This question would map just as well to "import data infile".
I have some dumps from one server I'm trying to populate tables on another server. The dumps look similar to:
INSERT INTO hits VALUES (33,'2000-07-10 14:38:34','7','enCoDedCookIe','','6x.2xx.IP.addr','yes','full');
OK, the problem I'm having is with the SingleQuotes enclosing the fields.
If I use:
mysqlimport -u username -p --local --fields-terminated-by=',' -v db-name "path/to/dumpfile"
I get all the rows, but the single quotes come in as data and will undoubtedly screw up my calls where I expect INTs.
If I use:
mysqlimport -u username -p --local --fields-terminated-by=',' --fields-optionally-enclosed-by="'" -v db-name "path/to/dumpfile"
The fields come in perfectly, but I get exactly 50% of the lines in the dump file. No kidding. 172 lines in the dump-file and I get 86 records in the table. 36 lines brings in 18 rows.
Anyone seen this behavior or have any thoughts?
RH Linux 6.2
PHP4(01?)
MySQL 3.22.32
TIA,
/Joe