DB-Upload, a database utility
(Page 1 out of 1)What is it?
DB-Upload is a new database utility for MySQL. This utility allows you to upload large .SQL files, that phpMyAdmin cannot handle. This will allow you to restore database backups that are several hundred MB big.
Why not use command line/shell/SSH?
You should use the MySQL command line client and shell access to restore a large database. It's the only way that's 100% reliable. But face it, not all web hosts allow you shell access. In fact, most web hosts won't give you access. If you need to restore a big database what do you do? phpMyAdmin can't handle sql files that are bigger than 5 MB, so you're pretty much screwed. But with DB-Upload, you can upload much bigger databases. During testing, I have uploaded databases of 90 MB and 500 MB. It can probably do larger databases as well.
How does it work?
DB-Upload executes the sql file in parts (of 100 KB), instead of doing it all at once. This way, it doesn't have the timeout problems that most PHP scripts have. In addition, it doesn't have any memory issues, because each part is only 100 KB.
The downside of this is time. It will take a while to upload a decent size database. It took me about 15 minutes to upload a 90 MB database on my localhost. It probably takes longer on a live server.
Instructions
- Download the utility: db-upload.php
- Upload your .sql file to your server and remember where you uploaded it to (the file path is what you need to know)
- Upload the DB-Upload utility to your server
- Goto http://www.yourserver.com/where/you/stored/db-upload.php
- You'll be presented with a screen where you can enter all the settings. Make sure they're correct!
- Click on 'Upload Database', and off you go. Just keep running it. DON'T close the window.
That's all there is to it.
November 2nd, 2005 at 10:01 pm
hi,
the php file, only shows the code, please help
November 3rd, 2005 at 2:30 am
hey, have worked out how to get the php file going
but i keep getting “Invalid File Specified. Go back and enter a different file path!”
i hvae uploaded it to /public_html/SQL/sql.sql
but it keeps saying there is an error?
November 3rd, 2005 at 9:46 am
sorry about all this!
have got the program to work now
but i get this error message at teh start
Warning: fread(): Length parameter must be greater than 0. in /home/smcc/public_html/SQL/db-upload.php on line 366
and then it only uploads 1.4mg before crashin!
December 8th, 2005 at 10:24 am
somehow in certain bytes the codes screw up… it keeps looping to previous byte… tried change the begin value. this works but, its that possible some of the data not uploaded. how to safely change the begin value?
December 8th, 2005 at 9:26 pm
Unless you know the exact byte at which it stopped, I don’t recommend changing the begin value, as you might upload the same thing twice. All you can do now is start over (unfortunately).
January 18th, 2006 at 1:10 am
i’m geting the same error as jamie here is the link to the erro its same as what jamie has said
http://img500.imageshack.us/img500/4931/dbuploaderror6yt.jpg
January 30th, 2006 at 9:11 pm
hey i am getting the same error is anyone managing to fix this??