Database export is interrupted

Error Message

When I try to export (download) my database using phpMyAdmin (for example at https://mywebsite/myadmin), I select all tables and click Export, but the download stops when the file size reaches about 40 MB. So I end up downloading only ~40 MB, even though my database is about 400 MB.

I suspect this happens because my website is on a free plan and phpMyAdmin may have a size limit for exports. I can export smaller tables (around 30–40 MB), but I have two large tables more than 10 MB — about 140 MB and 357 MB—and I can’t download them in anyway.

What can I do to successfully export/download my full database? Is it possible to use an FTP solution (like FileZilla) to do it? I’m not sure what steps to take. Please, any help!

The example you’ve provided is pretty sus. Are you using the phpMyAdmin function in your Client Area or are you using a self hosted one?

mywebsite is just a placeholder for my real website domain. I installed phpMyAdmin through InfinityFree’s cPanel.

mywebsite is just a placeholder for my real website domain. I installed phpMyAdmin through InfinityFree’s cPanel. I don’t know is it Client Area or self hosted actually.

This means that you are self hosting a phpMyAdmin instance which is not recommended or supported. Please try using the phpMyAdmin provided in the Client Area instead.

Hmm, I have none in MySQL Database section:

while I have two:

It’s a common bug, when you install WordPress through Softaculous the database is not synced to your account; the database is still there and simply create a database with that name will fix the issue.

Yes, it works, now I can see my database:

Now, when I click the phpMyAdmin button, I successfully access my database. But when I select a large table (140 MB) and click Export, the downloaded file is smaller than the original table. Also, every time I download it, the downloaded file has a different size.


Looks like Client Area version of the phpMyAdmin has the same issue - stop downloading after about 10-20 sec.

I tried using different browsers, but I still get the same error. This clearly looks like a hosting issue/limitation.

Why can’t I download even a single large table in its entirety? Any help please!

What are your export settings in PMA?

I’m using Quick export (Quick - display only the minimal options) with SQL format.

I’m using Quick export (Quick - display only the minimal options) with SQL format.

I just tested it, but I was able to export the table without any issues. However, the download only took a few seconds for me, so it might be a time limit, not a size limit.

The downloaded file is 72.6 MB for me. I don’t see anything to suggest that it’s not the complete table. Please be aware that the size of a table on the database server is generally larger than the same data as SQL text, and that the size estimations shown in phpMyAdmin are an estimation.

As for why it doesn’t work for you, I don’t know. Stopping after 10-20 seconds seems way too early to me, and doesn’t look like a deliberate timeout.

Did you maybe try to export the file using a different device on a different network? It might be that something else along the route is closing the connection too soon.

And if all else fails, the Custom export options provide the ability to export the data with a limit and an offset. You can use that to try and download the table in parts. I agree it’s not ideal, but it should work.

Finally, I do not recommend to host phpMyAdmin yourself. We already run phpMyAdmin for you, and phpMyAdmin is often a target for hackers to try and break into your database. If you do want to self-host a database manager, I suggest giving Adminer a try, which is much simpler to setup but includes all critical functionality.

First of all, thank you for your advice and support.

I tried many times to download the large tables (140 MB and 350 MB) using different devices and networks, but the result was always the same: the downloaded file contained only a small part of the table.

So what I did with one of the large tables was download it in parts. It was a nightmare because there were many parts, but in the end I managed to download them. After that, I uploaded those parts to another hosting and combined them back into a single table.

Now, on that other hosting, I can download the entire table in full without any problems (see the screenshot). The same original table downloads partially on InfinityFree, but it downloads completely on the other hosting.

Because of this, the only conclusion I can draw is that there’s a problem with the InfinityFree hosting or my account specifically, not with my connection or anything else.

And after downloading a large table many times, I still don’t understand what the exact limitation is—whether it’s based on volume (size) or on time. The download time and the downloaded size for the same table are always different. I didn’t notice any repeating or consistent numbers for either time or volume, so it’s still unclear to me what exactly limits the download.

Right, that’s clearly an issue. An export being a different size every time is very strange.

I just spent two hours to figure out what caused this, but I was able to find it: the server has a max_statement_time setting, which kills all queries that take more than 4 seconds to run. Export queries from phpMyAdmin are hitting that limit, and phpMyAdmin silently swallows the error and skips the chunk of the table. Since the exact query time varies between runs, that explains the incomplete backups of varying size.

I am working on a script that uses more, smaller queries to export a database which circumvents this issue. I can share it if you still need it.

I’ve also reported this issue to iFastNet, since not being able to export even modestly sized tables is a serious issue that’s not acceptable in my opinion.

Thank you for your support! This is good news that you recognized the issue and found it. I think my unpleasant experience with downloading the database is important for users to know, especially for backing up their files. I’m wondering why no one has reported this problem yet.

Yes, absolutely, I still need this workaround because downloading my large tables by small parts is a nightmare.

A few reasons I can think of why people might not have reported it.

  • The issue might be new. I don’t know when this setting was added to our servers, and it might be recent.
  • The export doesn’t explicitly fail. It seems to complete successfully, and you need to notice yourself that it’s actually incomplete. People might just not realize that the data is missing.
  • People might discover the issue, but not report it. This is a lot more common that you might think. There have been issues where I could see in retrospect that the issue was encountered by thousands of people over the span of weeks or months, but nobody actually reported it. Too many people don’t bother, or simply don’t believe that we can or want to make it work.

I have attached an export script that should work for this. It provides the option to either export an entire database or a single table.

db-export.php (10.6 KB)