Hello Jerry, Friday, August 02, 2002, 3:48:03 PM, you wrote: JA> Victoria, JA> Thanks for your response. Possibly you can clarify something for me. You JA> say that LOAD DATA LOCAL means that data file is read from client host. JA> What exactly is the client host in this case?
Host from which you connect to the MySQL server. As I understand you connect from from the same box where MySQL server is running. JA> I'll also have to try to put JA> the input file in the menagerie directory and see if I can refer to it JA> simply as 'pet.txt'. Please excuse my ignorance of this environment. After JA> 30 years of dealing only with MVS, this is a very strange place. Sorry, it's not clear enough for me. What do you mean "menagerie directory"? I've already written that you can use 'pet.txt' in LOAD DATA statement if file pet.txt is located in the current database dir otherwise you must specify full path to the file. PS: Please, don't send me answers, send answers in the mailing list. JA> Thanks, JA> Jerry JA> -----Original Message----- JA> From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]] JA> Sent: Friday, August 02, 2002 7:52 AM JA> To: [EMAIL PROTECTED] JA> Subject: Re: various questions about my.ini /or my.cnf JA> Jerry, JA> Thursday, August 01, 2002, 7:13:04 PM, you wrote: JA>> As a newcomer to MySql, I have struggled through the install and am JA> working JA>> my way through the tutorial. JA>> My environment: JA>> Win2000 JA>> MySql version 3.23.51-nt JA>> My.ini: JA>> [mysqld] JA>> # set basedir to installation path, e.g., c:/mysql JA>> basedir=c:/mysql JA>> # set datadir to location of data directory, JA>> # e.g., c:/mysql/data or d:/mydata/data JA>> datadir=c:/mysql/data JA>> # turn load data local option on JA>> local-infile=1 JA>> I am attempting to load table = menagerie from a text file name JA> "pet.txt". JA>> To make this work I have had to do the following: JA>> 1. Include local-infile=1 option on the login to mysql. Why is this not JA>> picked from My.ini? JA>> C:\mysql\bin>mysql -u jarkema -p --local-infile=1 JA> Because you specified "local-infile=1" only in the [mysqld] section. JA> mysql command-line client doesn't read this section of my.ini. It JA> reads sections [mysql] and [client]. To enable LOAD DATA LOCAL you JA> should put local-infile=1 for client and for server. JA>> 2. Fully qualify the input file on the load data command. Why is the JA> data JA>> path not being picked up from My.ini? mysql>> load data local infile "c:/mysql/data/pet.txt" into table pet; JA>> If I don't fully qualify the input file name I get: JA>> mysql> load data local infile "pet.txt" into table pet; JA>> ERROR: File 'pet.txt' not found (Errcode: 2) JA>> It doesn't appear that my.ini is being used by mysql. Can anyone JA> explain JA>> why? JA> Why path should be picked from my.ini file? ;) JA> You used LOAD DATA LOCAL, that means that data file is read from JA> client host. How does MySQL server know where is file located on the JA> client host? JA> Besides if you don't specify full path to your file MySQL is looking JA> for a file in the current database directory JA> (c:/mysql/data/database_dir), not in the MySQL data dir (c:/mysql/data). -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php