cancel
Showing results for 
Search instead for 
Did you mean: 

Inability to import data files using phpMyAdmin

undertrees
Newbie
Posts: 3
Registered: 13-09-2009

Inability to import data files using phpMyAdmin

I am new to this newsgroup and I appreciate the welcome from your moderator Adie.
I have several websites (with Forec9) which include mysql control of website databases. For several years, uploading my files (CSV or TAB-separated) into the corresponding Tables within my Database has worked fine. I used to FTP my files to cshell.forec9.net and using telnet I was able to use m,y 16 character password to access MySql.
I used to include the uploaded .csv/tab files into the tables using
LOAD DATA INFILW 'MYDATAFILE.CSV' INTO TABLE tablename;
Now I have to come to terms with phpMYADMIN. Using the same mysql password I can see all the tables withing my database and use sql SELECT statements to display, etc. I can even EXPORT the tables from server to client PC.
But how do I transfer a client PC .CSV file into a server (rumpus) Table?
I have tried two methods.
1. I used FTP to transfer the .CSV file to cshell.force9.net. Then, having selected the corresponding
Table, I used the sql command
LOAD DATA INFILW 'MYDATAFILE.CSV' INTO TABLE tablename;
The error message I got was
#1045 Access denied for user 'underw'@'%' (using password: YES)
So, with the corresponding Table in view, I used the IMPORT command of phpMyAdmin. This dialogue allows me to enter the path to the .CSV file on my PC and set the field delimiter to 'comma'.  The error message was:
No data was received to import. Either no filename was submitted or the file size exceeded the max permitted by you PHP configuration. [the filesize in this case was tiny).
I have raised a ticket with PN but they tell me they are not instructed on how to unravel mysql questions. I asked about my privileges and permissions in the new setup and they told me it was all done automatically. What faith!!!
2 REPLIES
Community Veteran
Posts: 14,381
Thanks: 713
Fixes: 10
Registered: 01-08-2007

Re: Inability to import data files using phpMyAdmin

What I found with phpmyadmin was that you actually have to create the table first before importing it.
For example I had a table called accounts. I tried importing it and got the same error you got.
After googling I got a sneaky suspicion that it wanted the table created first. I created it and gave it one field - id, primary and auto_increment (doesn't make much odds what you do with it as it will be over written). Then go back to the import facility and upload. You should now find that it will simply overwrite its existing table.
Don't ask me why, I don't know. Phpmyadmin is a mysterious beast, all I know is it worked for me.
I need a new signature... i'm bored of the old one!
Community Gaffer
Community Gaffer
Posts: 13,411
Thanks: 1,178
Fixes: 91
Registered: 04-04-2007

Re: Inability to import data files using phpMyAdmin

Quote from: undertrees
So, with the corresponding Table in view, I used the IMPORT command of phpMyAdmin. This dialogue allows me to enter the path to the .CSV file on my PC and set the field delimiter to 'comma'.  The error message was:
No data was received to import. Either no filename was submitted or the file size exceeded the max permitted by you PHP configuration. [the filesize in this case was tiny).

Am I correct to assume that you reported this over in p.s.customer-feedback too? If so then I understand that you've got things working with the alternative phpMyAdmin instance that I gave you access to.
For the benefit of anybody who is suffering a similar problem, then try accessing phpMyAdmin using the IP address here instead. This is a replacement instance of the platform that we'll be making live over the next week or two.

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵