i am attempting to upload a .txt file into my sql database i just created. i was able to load several lines of data into the table using
LOAD DATA LOCAL INFILE '/pathto/file.txt' INTO TABLE mytable
--local-infile=1 -u mysqlname -p
--local-infile is a server and client parameter. It's not valid syntax as part of a statement such as LOAD DATA or INSERT statement.
You would specify server variables and options either in the appropriate sections of the my.cnf file, or as command line parameters to the MySQL program being executed.
For example, at the OS prompt...
# mysql -h myserverhost -u mysqlname -p --local-infile=1
That option has to be specified for the MySQL server.
If you are connecting as user@localhost, you don't need LOCAL. You can give the MySQL user (whichever OS user the mysql server is running under) read privilege on the file you want to load...
chmod ugo+r /mypath/myfile (and read execute on the directories in the path.
You only need LOCAL if the msyql user isn't @'localhost'.