PDA

View Full Version : How do I upload data from a textfile into mySQL?


djeaux
6-18-03, 12:39 PM
Using phpMyAdmin, I've created a database structure matching the fields in my data file. The data file is in tab delimited format with \N in the null fields.

I go to the "Insert data from a textfile into table" screen, specify the data file for upload, change to the \t for tab, etc. & attempt to insert the data. But I'm getting this error:


Error

SQL-query :

LOAD DATA LOCAL INFILE '/var/tmp/phpCdoYns' INTO TABLE `bdbdb_main` FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'

MySQL said:

The used command is not allowed with this MySQL version



OK. I realize that I really need to take my sorry backside to the nearest Barnes & Nobles (30 miles away) & begin RTFMing. But in the meantime, what am I doing wrong here?

Any clues?

TIA,
Joe

djeaux
6-18-03, 01:13 PM
... mySQL Front imported it straight from my Access database.