Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading data into a table 1

Status
Not open for further replies.

MerB

Programmer
Mar 4, 2004
1
ZA
Hello, I wonder if anyone can help. I have to load some data into a table (several tables actually). I obviously don't want to/can't insert the records one-by-one. I'm running mySQL versoin 4.0.13. Apparently I can't use the 'LOAD DATA LOCAL INFILE' with this version. Surely there should be another way of doing it?
 
The "LOCAL" keyword is probably what's giving you problems.

When you use "LOCAL" in "LOAD DATA LOCAL INFILE...", MySQL will attempt to transmit the datafile to the server through your MySQL client connection. In order for this to happen, the MySQL server and the MySQL client must both be configured to allow this. Unless your MySQL installation is local, you may not have this option.

Instead, you can write your datafile to the MySQL server's filesystem, then load the file using "LOAD DATA INFILE" (no "LOCAL").

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top