By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,114 Members | 1,574 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,114 IT Pros & Developers. It's quick & easy.

LOAD DATA INFILE issue

P: n/a
Hi, im facing a problem here. First of all here is my program
requirement. I got a .csv file with thousands of records inside, i need
to import them into my mysql database. So i tried using load data
infile on my pc using localhost everything goes fine, but when i change
the connection to my server, it seems tat the connection cant be
done... so wat went wrong?

Jun 7 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Justin wrote:
Hi, im facing a problem here. First of all here is my program
requirement. I got a .csv file with thousands of records inside, i need
to import them into my mysql database. So i tried using load data
infile on my pc using localhost everything goes fine, but when i change
the connection to my server, it seems tat the connection cant be
done... so wat went wrong?


Hi,

I guess LOAD DATA INFILE is a mysql command that loads data from a file into
the db, right?
If that is working on server1 and not on server2, I guess server2 uses
different logincredentials (different username or password).
OR you have a problem with readpermissions.
Can the mySQL user READ the .csv file?

*nix
chmod the csv file to 777 if this a one time action.
If you need to do this a lot, set the ReadWriteExecute to the csv file to a
more appropriate (restricted) level.

W$
Get the properties->security and make sure the file can be read by the
process that runs mysql.

Regards,
Erwin Moller
Jun 7 '06 #2

P: n/a
Justin wrote:
Hi, im facing a problem here. First of all here is my program
requirement. I got a .csv file with thousands of records inside, i
need to import them into my mysql database. So i tried using load data
infile on my pc using localhost everything goes fine, but when i
change the connection to my server, it seems tat the connection cant
be done... so wat went wrong?


Maybe your server only allows MySQL connections from localhost. This is
quite common.
Jun 7 '06 #3

P: n/a
Justin wrote:
Hi, im facing a problem here. First of all here is my program
requirement. I got a .csv file with thousands of records inside, i need
to import them into my mysql database. So i tried using load data
infile on my pc using localhost everything goes fine, but when i change
the connection to my server, it seems tat the connection cant be
done... so wat went wrong?


Maybe you should try a mysql newsgroup such as comp.databases.mysql.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 7 '06 #4

P: n/a
On Wed, 07 Jun 2006 02:20:19 -0700, Justin wrote:
Hi, im facing a problem here. First of all here is my program
requirement. I got a .csv file with thousands of records inside, i need
to import them into my mysql database. So i tried using load data infile
on my pc using localhost everything goes fine, but when i change the
connection to my server, it seems tat the connection cant be done... so
wat went wrong?


Could be any number of things from a network issue to a database
permissions issue. Are you getting any specific error message?

--
The USA Patriot Act is the most unpatriotic act in American history.
Feingold-Obama '08 - Because the Constitution isn't history,
It's the law.

Jun 7 '06 #5

P: n/a
thanx. i fixed the problem eventually... there was an mysql error code
2 i think. it couldn read the csv file at first... so i uploaded the
csv file into the ftp and tried for a few times and it was done... i
think i was lucky though... so wat's the diff between load data local
infile and load data infile??

Ivan Marsh wrote:
On Wed, 07 Jun 2006 02:20:19 -0700, Justin wrote:
Hi, im facing a problem here. First of all here is my program
requirement. I got a .csv file with thousands of records inside, i need
to import them into my mysql database. So i tried using load data infile
on my pc using localhost everything goes fine, but when i change the
connection to my server, it seems tat the connection cant be done... so
wat went wrong?


Could be any number of things from a network issue to a database
permissions issue. Are you getting any specific error message?

--
The USA Patriot Act is the most unpatriotic act in American history.
Feingold-Obama '08 - Because the Constitution isn't history,
It's the law.


Jun 9 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.