Jump to content

problem with using "load data local infile" in MyS


stchong

Recommended Posts

my mysql is 4.0.12.

I am using mysqld-max-nt...

I have check for information in mysql\'s web site,but still can not solve the problem! still can not use load data local infile...

every time it shows me the same error message:

ERROR 1148: The used command is not allowed with this MySQL version

 

I have tried two ways

1. in the command line of mysql

mysql --local-infile=1 -u root -p

I also tried.....

mysql --local-infile=0 -u root -p

but all can not

 

2. modify the my.ini

set-variable=local-infile=1

I also tried

set-variable=local-infile=0

but all still can not

 

so what\'t the problem????

Help me, please...

Tahnks a lot

Link to comment
Share on other sites

I have found that you need to include information about the delimiters if you are working in a Windows environment. I use TABs to delinieate fields and then I use the following command:

 

load data infile \'d:/test.txt\' 

into table test 

fields terminated by \'t\'

lines terminated by \'rn\';

 

Notice the need to specify the Carriage Return, New Line combination. Without it this doesn\'twork.

 

Alternatively have you tried

load data local infile ... 

?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.