Honestly, for this data size, I would suggest doing mysqldump, and then import the table back into another copy of MySQL installed somewhere else, possibly on a virtual machine dedicated to this task. From there, you can set timeouts that are as high as you want, and not worry about the resource limitations that blew up your production database. Using nice
on a Unix-based OS or process priorities on a Windows-based system, you can do this without much impact on the production system.
Alternatively, you can configure a replica of your production database and pull data from there. Having a so-called “reporting database” that replicates various tables or even entire databases from your production system is actually a fairly common practice in large environments to ensure that you don't accidentally kill your production database by pulling numbers for someone. As an added benefit, you do not need to wait for mysqldump backup to complete before you start retrieving data for your boss; You can do it right away.
source share