Question

if my host does not allow me to upload a file directly to my mysql folder and i can only do so throught phpmyadmin? are there any alternatives aside from its native import feature so that my connection would not time out while uploading a query that's around 8mb?

Was it helpful?

Solution

you can gzip or bzip the file and phpMyAdmin will decompress and run the script.

otherwise what I've had to do in the past is split my SQL into a number of files and load each one individually. You can do this simply by opening the SQL file in a text editor, scroll to about half way down, find the start of a statement and move everything after that into another file.

OTHER TIPS

Don't use phpmyadmin for anything critical. Definitely don't use it to create backups or do restoration. It's a bag of rubbish.

Log on to your shell and use the mysql command line client to restore the database in the standard way. If you can't do that, get a better provider.

Shell access is necessary to work with mysql databases.

Don't expect anything done with phpmyadmin NOT to destroy all your data.

BigDump?

Staggered import of large and very large MySQL Dumps (like phpMyAdmin 2.x Dumps) even through the web servers with hard runtime limit and those in safe mode. The script executes only a small part of the huge dump and restarts itself. The next session starts where the last was stopped.

You could upload the dump with an FTP client (which will allow you to resume the transfer), and load it locally.

I would definitely say BigDump. i had this exact problem with 8.3 GB sql file. read this article for more info. How To Upload a Big SQL File To MySQL also visit the script home page to download it.

See my answer here: https://stackoverflow.com/a/33728744/74585

If during an import operation you untick Partial import -> Allow the interruption of an import... then phpMyAdmin seems to send the entire thing to mysql which is processed slowly. Unfortunately phpMyAdmin (at least on my shared host) will no longer respond to requests, but using a browser on a different IP address works and let's you monitor the query's progress.

I say - use Sypex Dumper.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top