Skip navigation links

MySQL Forums :: Newbie :: How to load text or sql file into mysql commandLine?


Advanced Search

Re: How to load text or sql file into mysql commandLine?
Posted by: John seito ()
Date: October 27, 2007 12:17PM

I created a text file called "addresses.txt" and I tried saving it to the mysql folders where I have installed mySQL and I run this code

Code ------ LOAD DATA LOCAL INFILE "addresses.txt" INTO TABLE phoneList;

in command line and hoping that it this txt file's data would insert into my phoneList table, but I received an error from command line saying can't find addresses.txt file.

After you said I can store the file anywhere on my system but I need to show the path and I did just that. I use that same text file save it in the htdocs folder in C: drive and went to command Line and enter this code

Code ---- LOAD DATA LOCAL INFILE "c:\Apache\htdocs\addresses.txt" INTO TABLE phoneList;

this code doesn't work either.

Maybe there is a syntax error with the code and path?

Thanks,

Options: ReplyQuote


Subject Written By Posted
How to load text or sql file into mysql commandLine? John seito 10/27/2007 07:50AM
Re: How to load text or sql file into mysql commandLine? Guelphdad Lake 10/27/2007 11:23AM
Re: How to load text or sql file into mysql commandLine? John seito 10/27/2007 12:17PM
Re: How to load text or sql file into mysql commandLine? Guelphdad Lake 10/27/2007 04:31PM
Re: How to load text or sql file into mysql commandLine? John seito 10/27/2007 05:21PM
Re: How to load text or sql file into mysql commandLine? Guelphdad Lake 10/27/2007 06:40PM
Re: How to load text or sql file into mysql commandLine? John seito 10/27/2007 10:32PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.