What happens when the database upload stops half way?
See Joseph Fontana's instructions too
The only way I have experience uploading a large database is by uploading half of the dumped file at a time. This was primitive, but it worked. I opened it in a text editor, chose an appropriate point in the XML (is it?) where it looked as though one table had ended and another was about to begin, pasted each part into the text box in phpmyadmin uploaded them.
But it would be nice to let the computer do it. First of all you can try and change the server settings. phpmyadmin says in its FAQ
[1.16] I cannot upload big dump files.
The first things to check (or ask your host provider to check) are the
values of upload_max_filesize, memory_limit and post_max_size in the
php.ini configuration file.
All of these three settings limit the maximum size of data that can be
submitted and handled by php. One user also said that post_max_size
and memory_limit need to be larger than upload_max_filesize.
So you need to ask your server to change those php.ini configuration values. On shared server, they may not want to.
Sometimes you can change php configuration values using a .htaccess file (example in the moodle documentation)
There is also this line in restore.php which shows it is possible to change php configuration variables form inside php
//Adjust some php variables to the execution of this script
so I presume these (following the phpmyadmin faq) might work too, if you add it to the php of phpmyadmin somewhere
You can also consider using a .htaccess file containing
php_value upload_max_filesize 100M
php_value memory_limit 101M
php_value post_max_size 101M
And see if these will over-ride the server settings
(for those that have not...create a htaccess.txt file with the above contents, upload the file and then change the name to .htaccess)
Steve Garcia also informs us that...LimitRequestBody X is a parameter that might be set in Apache. If it is set, it will trump whatever setting you have in PHP. X is in bytes, not megabytes.
putting this in your .htaccess may turn it off
otherwise you will need to ask your server to put something like
In the apache configuration file which will be either of the following two
I also wonder whether it is possible to upload files to phpmyadmin via ftp but I can't see a data folder. Again from the phpMYadmin FAQ
[1.11] I get an 'open_basedir restriction' while uploading a file from
the query box.
Since version 2.2.4, phpMyAdmin supports servers with open_basedir
restrictions. Assuming that the restriction allows you to open files
in the current directory ('.'), all you have to do is create a 'tmp'
directory under the phpMyAdmin install directory, with permissions 777
and the same owner as the owner of your phpMyAdmin directory. The
uploaded files will be moved there, and after execution of your SQL
It is a long shot (because the files are only there very temporarily) but perhaps you could try uploading the dump into such a tmp folder. This is the method that Thomas Robb recommends for uploading large files to the moodle data folder occasionally.
If the port to the MySQL database is open (often not open on shared servers) then you could use a client side database management tool such as MyDBStudio (free) or Navicat ($80 academic).
There is somewhere on the Internet a program called super dump or mega dump or similar that uploads in parts. Here it is! It is called "big dump"
A lot of people have heard of it but not tried it, but Tim Allen recommends it.
The "big dump upload" problem is one I still face. My moodle is not backing up well internally (execution time?) but my sysadmin is taking db backups. I will need to upload one one day, so please tell us which method worked for you.