473,545 Members | 2,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

LOAD DATA INFILE issue

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
5 1883
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 logincredential s (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 ReadWriteExecut e 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
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
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*******@attgl obal.net
=============== ===
Jun 7 '06 #4
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2630
by: Pieter Van Waeyenberge | last post by:
Hello i have most recent php & mysql versions running on a linuxmachine i want to use LOAD DATA LOCAL INFILE and pass it from php to mysql. - the file i load is given with full path and the directory is readble - On MySQL local-infile = ON - From PHP i connect using client flag (128) to allow passing a file over that connection:...
14
9728
by: Bruce A. Julseth | last post by:
When I execute this SQL statement in my PHP code, I get an error "File '.\Address.txt' not found (Errcode: 2)" $File = addslashes(".\Address.txt"); $SQL = "Load Data InFile \"" . $File . "\" into table addresses"; $result = mysql_query($SQL) or die(mysql_error()); The file is located in the same directory as my .PHP file. How do I...
3
4501
by: Otto | last post by:
Hello to all I have a problem how to write correctly a PHP string. I did the following import with the help of PHPMyAdmin: Nombre d'enregistrements insérés : 364 (traitement: 0.0553 sec.) requête SQL: LOAD DATA LOCAL INFILE '/tmp/phpVfO8r8' INTO TABLE `fncid`
3
2956
by: hall | last post by:
I have a problem with my design of a templatized class. I'm trying to figure out how to load and save the data inside it, but can't. My class looks like this ------------------------------------ template <class tType> class Foo { private: tType data;
0
6672
by: Donald Tyler | last post by:
Then the only way you can do it that I can think of is to write a PHP script to do basically what PHPMyAdmin is trying to do but without the LOCAL in there. However to do that you would need to be able to place the PHP file on the server, and I guess you probably can't do that either. Talk about catch 22... The only other way I can think...
1
4052
by: Jami Bradley | last post by:
HI all, For the past several months we have been using LOAD DATA LOCAL INFILE to bulk load tables within Perl modules. Recently, someone thought it would be a good idea to upgrade the Solaris machines - I'm thinking it wasn't that good an idea :-( We are now running MySQL 4.0.18 and the DBI version is 1.35. Now, our scripts are failing...
1
16054
by: Ray in HK | last post by:
What are the differences between LOAD DATA INFILE and LOAD DATA LOCAL INFILE ? I found some web hosting company do not allow using LOAD DATA INFILE but allow LOAD DATA LOCAL INFILE. The reason is for the sake of security. What does that mean ?
3
2739
by: nsh | last post by:
mailing.database.mysql, comp.lang.php subject: does "LOAD DATA" EVER work?!? I've tried EVERYTHING! version info: my isp is running my web page on a linux box with php ver. 4.4.1 according to phpinfo, the "mysql api client is ver. 4.0.25" - I have no idea how this relates, if at all, to the mysql engine's version. background:
0
2152
by: lanesbalik | last post by:
hi all, right now i'm trying to migrate from db2 running under linux to mysql v5.1. i manage to export out the db2 structure & data into a del (ascii) file. but when i try to load the data from the del file to mysql table, it generate an error. below is the load data infile syntax i use =
0
7428
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7685
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7941
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7452
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6014
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5354
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3485
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1916
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1039
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.