Jerry, Thursday, August 01, 2002, 7:13:04 PM, you wrote: JA> As a newcomer to MySql, I have struggled through the install and am 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 "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 Because you specified "local-infile=1" only in the [mysqld] section. mysql command-line client doesn't read this section of my.ini. It reads sections [mysql] and [client]. To enable LOAD DATA LOCAL you 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 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 explain JA> why? Why path should be picked from my.ini file? ;) You used LOAD DATA LOCAL, that means that data file is read from client host. How does MySQL server know where is file located on the client host? Besides if you don't specify full path to your file MySQL is looking for a file in the current database directory (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