PDA

View Full Version : load data local infile 'path/file' into table file


don
01-26-2008, 11:26 PM
I'm using mysql from an ssh connection and created my first table. I'm now following a Mysql online tutorial and trying to fill my table with this command:

mysql> LOAD DATA LOCAL INFILE '/filename' into table mytable;

This is not working because mysql can not find this file. Should this file be on my computer or should it be uploaded to my bluehost directories?

sXi
01-27-2008, 06:58 AM
You'll require FILE privileges to run that command and the file needs to be in your home directory.

LOAD DATA LOCAL INFILE '/filename' INTO TABLE mytable

don
01-27-2008, 11:23 AM
Ok - that worked fine - load data local infile '~/pet.txt' into table pet;