Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: LOAD DATA LOCAL INFILE not working

by tobyink (Abbot)
on Nov 15, 2012 at 07:09 UTC ( #1003942=note: print w/replies, xml ) Need Help??


in reply to LOAD DATA LOCAL INFILE not working

Are the temp file, the CGI script and the database all on the same computer?

What user is the database running as? What are he permissions on the temp file?

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Replies are listed 'Best First'.
Re^2: LOAD DATA LOCAL INFILE not working
by Anonymous Monk on Nov 15, 2012 at 14:05 UTC

    Yes, all the files are on the same unix server. For the database I do not have admin rights but have all other privileges. My file permission is -rw-r--r-- temp.txt

    user@localhost:~$ perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[call +er(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do' Monkey say Monkey do

      Hi, Its working now. I was opening temp.txt to write data and then load the contents into the database. LOAD DATA LOCAL INFILE failed to upload because I did not CLOSE temp.txt before uploading into the database. Thanks for the help!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003942]
help
Chatterbox?
[Corion]: ... and also a visit to my godson+family of course :)
Corion orders some gifts online :)
[ambrus]: We're spending Christmas and the week after at my brother's place. First time ever, because the last four years they could came home instead.
[ambrus]: robby_dobby: wait what? Glasgow? isn't that one of the most boring towns ever?
[marto]: ambrus: no :)
[robby_dobby]: ambrus: Dunno. marto is from Glasgow. I'm in London and I say London is quite colourful, but boring :-)

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2017-12-15 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (431 votes). Check out past polls.

    Notices?