Mertens,
Wednesday, August 28, 2002, 6:52:12 PM, you wrote:
MB> On Wed, 2002-08-28 at 16:51, Egor Egorov wrote:
>> Put into my.cnf file :
>> [mysql]
>> local-infile=1
>>
>> or start mysql client with --local-infile=1 option.
MB> I tried the first option and it works when use the following command to
MB> load the data-file:
MB> mysql> LOAD DATA LOCAL INFILE '/home/M8ram/testmysql/pet.txt' INTO TABLE
MB> pet;
MB> Query OK, 3 rows affected (0.19 sec)
MB> Records: 3 Deleted: 0 Skipped: 0 Warnings: 0
MB> But when I use the above command without the LOCAL option it displays
MB> the following error:
MB> mysql> LOAD DATA INFILE '/home/M8ram/testmysql/pet.txt' INTO TABLE pet;
MB> ERROR 1045: Access denied for user: 'M8ram@localhost' (Using password:
MB> NO)
MB> Is this 'normal behaviour'?
Yes, if you don't have FILE_priv.
If you use LOAD DATA INFILE (without LOCAL), MySQL reads file from
server host and user must have FILE_priv.
Note: FILE_priv is a global privilege.
MB> About the second suggestion: where should this file be located?
What file? pet.txt or my.cnf?
MB> Is it possible that it does not exist yet?
Yes.
MB> If so can I create a file named
MB> "my.cnf" with a text-editor (like KWrite) and put it in my home
MB> directory?
Yes, you can create it by yourself.
Depends on what options you want to specify in my.cnf you should put
this file into /etc/my.cnf or MYSQL_DATADIR/my.cnf or into home_dir/
Read some more info here:
http://www.mysql.com/doc/en/Option_files.html
MB> Thanks for the help!
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Egor Egorov
/ /|_/ / // /\ \/ /_/ / /__ [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