Msql problem

Status
Not open for further replies.

losser

New member
Apr 15, 2008
62
1
0
I need to upload large csv files. any way to easily do this? I am talking about files bigger than the 30 sec. timeout and the file size limit
 


I guess I could use navicat if I could figure out how to set it up on shared hosting I do have a script to do it your way kyle but it will be just as labor intensive.

I would not care if it took a few hours to upload but having to change each file would take forever.
 
hmmm, i thought the upload was the problem and not the actual insert itself? just, zip then use ftp or scp as suggested then use a php script to unpack it from there.. then use your script to insert to db.
 
There is a file upload limit built in to PHP that you may need to change. Search Google for upload_max_filesize for information on how to change that setting.

For really large files, you will still get a timeout and you will either need to split up the files or upload the file to the server and use the mysqlimport shell command. Here's the command to upload a CSV file:

mysqlimport --fields-optionally-enclosed-by=""" --fields-terminated-by=, --lines-terminated-by="\r\n" --user=USERNAME --password=PASSWORD DATA_FILE.csv
 
Status
Not open for further replies.