So I will preface this by saying that I'm not all that skilled in MySQL (or regular SQL for that matter), but I'm trying to load data from a .txt file into my table that I keep for ticket sales. When I do that using:
LOAD DATA LOCAL INFILE '/path/presales1.txt' INTO TABLE presales
I get the '>
prompter. And I have no idea what to do. I tried looking up solutions and the one I thought would work was:
--local-infile[=1];
because that is straight out the MySQL handbook. It didn't work (nor did any variation on it…such as local-infile=1;
, local-infile=1
etc….)
Did I miss a simple step? My version of MySQL is 5.7
Best Answer
Watch carefully, everything is up my sleeve.
Notice that my first line has a quote, but not the matching quote. When I hit return; it prompted me with
'>
-- That's the clue that I need to balance the quotes. Eventually, I did so, and the query terminated.Look around, I suspect there is a stray quote on the preceding or following line. Or the quotes around the filename aren't really the same.