cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble importing MySQL database

giantant
Newbie
Posts: 2
Registered: ‎13-09-2009

Trouble importing MySQL database

Hi
I've created a Joomla site at home, exported the MySQL database as a .txt file and now can't import it into my empty PlusNet database through PHPMyAdmin.  I've tried halving the number of tables to reduce file size and have tried exporting the exported DB as a .zip file which makes it just 48Kb in size.  I keep getting the same error message of "No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16".
Grateful for any ideas!
Thanks
Tim
7 REPLIES 7
giantant
Newbie
Posts: 2
Registered: ‎13-09-2009

Re: Trouble importing MySQL database

Just to demonstrate that this seems to be a PlusNet issue, I had no trouble at all installing the database in exactly the same way on another server.
Tim
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Trouble importing MySQL database

Have you tried exporting just the tables rather than the complete database? You should be able to import the tables via phpMyAdmin.
David
undertrees
Newbie
Posts: 3
Registered: ‎13-09-2009

Re: Trouble importing MySQL database

I'm having exactly the same problem. It's not related to size of text file, because I've tried a file of just a couple of rows and columns, importing into a test table. I get the same error message as you.
See http://community.plus.net/forum/index.php/topic,79341.0.html for further details.
People on other forums say "Just use the Import facility of MyPHPAdmin" which suggests that normally it works, but that PlusNet have not set it up properly. I've seen reference to needing additional privileges for importing data compared with being able to add data one row at a time interactively in MyPHPAdmin.
Everything worked fine until PlusNet turned off Telnet and SSH access to their MySQL server - I used to ftp the tab-separated file to the server, then log on and do a Load Data Infile. But they've withdrawn access while they sort out a security issue, so I've been unable to upload the tables used by my dynamic sites for nearly a month...
robwebb1
Newbie
Posts: 9
Registered: ‎25-07-2009

Re: Trouble importing MySQL database

i had this problem, just importing the tables seemed to work
pjmarsh
Superuser
Superuser
Posts: 4,035
Thanks: 1,579
Fixes: 20
Registered: ‎06-04-2007

Re: Trouble importing MySQL database

I've not tried this at all, but if you are trying to import a database is it failing on the create database as you don't have permissions to create databases with Plusnet.  You would just need to import the tables into the existing database.
Phil

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Trouble importing MySQL database

Quote from: undertrees
Everything worked fine until PlusNet turned off Telnet and SSH access to their MySQL server - I used to ftp the tab-separated file to the server, then log on and do a Load Data Infile. But they've withdrawn access while they sort out a security issue, so I've been unable to upload the tables used by my dynamic sites for nearly a month...

Does the following work for you (more options will be needed if it is a CSV rather than a tab-separated text file)?
Quote from: spraxyt
However I think running the command within a PHP program on CCGI should work.
The steps would be
(1) FTP the text file to the same directory as the PHP program
Within the PHP program
(2) Connect to the database
(3) $load_query = "LOAD DATA LOCAL INFILE 'nameoffile.txt' INTO TABLE nameoftable";
(4) $result = mysql_query($load_query);
(5) if ($result) {echo "table loaded successfully";}
    else {echo "loading failed< br / >\n", mysql_error();}
Run the program in the browser as for a normal PHP program.
David
martinu
Dabbler
Posts: 17
Registered: ‎30-07-2007

Re: Trouble importing MySQL database

Quote from: spraxyt
Quote from: undertrees
Everything worked fine until PlusNet turned off Telnet and SSH access to their MySQL server - I used to ftp the tab-separated file to the server, then log on and do a Load Data Infile. But they've withdrawn access while they sort out a security issue, so I've been unable to upload the tables used by my dynamic sites for nearly a month...

Does the following work for you (more options will be needed if it is a CSV rather than a tab-separated text file)?
Quote from: spraxyt
However I think running the command within a PHP program on CCGI should work.
The steps would be
(1) FTP the text file to the same directory as the PHP program
Within the PHP program
(2) Connect to the database
(3) $load_query = "LOAD DATA LOCAL INFILE 'nameoffile.txt' INTO TABLE nameoftable";
(4) $result = mysql_query($load_query);
(5) if ($result) {echo "table loaded successfully";}
     else {echo "loading failed< br / >\n", mysql_error();}
Run the program in the browser as for a normal PHP program.


This code does work. Normal service has been resumed: it is now possible to populate MySQL tables from CSV/TSV files again! Running a PHPscript is a perfectly good substitute for telnetting or SSHing to the server and running the LOAD DATA command from there.
PHPMyAdmin is also able to import now: in plusnet.service.customer-feedback, in the thread "Uploading data to an SQL database from a CSV file while Telnet access is turned off" Bob Pullen posted on 6 October at 14:36 to say that they had just built a new trial version of PHPMyAdmin. Unlike the old one, this can import CSV data. So there was a problem with the old version of PHPMyAdmin.