|
|
Cannot find file in MySQL
|
|
|
|
Fresh-Faced Recruit
Join Date: Jul 2012
Status:
Offline
|
|
Everyone,
I am trying to load a file into MySQL DB using the load statement and I keep getting the rror the file is not found, The command is as follows:
load data local infile '/usr/local/mysql-5.5.25a-osx10.6-x86/data/npidata_20050523-20120729.csv' into table nppes_data
fields terminated by ','
enclosed by '"'
lines terminated by '\r\n'
IGNORE 1 LINES;
Why does it not find the file. I do a GETINFO on the file and have copied the full path name and it still does not work. Thanx in advance.
Jerry
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status:
Offline
|
|
Could be file permissions. Does mysql have read access? Do you?
try moving the file to your home folder
Also, you could use Sequel Pro to import the data using a nice GUI - you can avoid some command line headaches. http://www.sequelpro.com/
|
You can take the dude out of So Cal, but you can't take the dude outta the dude, dude!
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jul 2012
Status:
Offline
|
|
I change the file permissions from ./usr/* to have read/write. Got the same error. Then I just pointed towards
fthe file in the download folder and got the same results of not found.
Jerry
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jul 2012
Status:
Offline
|
|
set everyone to have read/write priv.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status:
Offline
|
|
are you using mysql or mysqlimport ? try mysqlimport
see this: https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.0/+bug/244406
or try setting the file owner to mysql
|
You can take the dude out of So Cal, but you can't take the dude outta the dude, dude!
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by ballj35
set everyone to have read/write priv.
But don't do this if you wish to keep your setup secure.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by Gavin
are you using mysql or mysqlimport ? try mysqlimport
see this: https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.0/+bug/244406
or try setting the file owner to mysql
As long as the file you are trying to read is world readable and the parent directories aren't blocking access, permissions shouldn't be the problem...
ballj35: can you paste in your entire command you are running as well as the entire error message?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|