I am trying to take Dump of a database which has around 4,334,714 records and size 559 MB.
But when I fire a Dump command I get an error “Lost connection to MySQL server during query”
I also tried to write a script where I try to limit my records and dump it in a separate temporary table but ended up with the same error.
I also tried to take compress dump using :
mysqldump -u [USERNAME] -p [DBNAME] | gzip > [/path_to_file/DBNAME].sql.gz
Is there any other way I can achieve this? Or what could be the reasons of mysql loosing the connection?