MySQL Backup of large tables

MySQL Backup of large tables

You can export mysql tables from PHPMyAdmin, but if the table is very large it will not work properly. Sometimes, it appears to have completed but all the data is not there. I use the following command line commands to backup entire databases when they are very large.
mysqldump -u root -p [DBNAME] | gzip > ./dbname.sql.gz
This seems to work well. The DBNAME can be found in PHPMyAdmin. You will be prompted for the password when you execute the command.  This automatically gzips the file so it is compressed which is a huge benefit. 


Unzip with:

gzip -d dbname.sql.gz

Restore with:

mysql -u root -p [DBNAME] < dbname.sql

Didn't really test this import, code exactly, I've done it successfully before, you might have to tweak it a little.
p: 330.852.9922
p: 800.927.4196
f: 888.644.2280
e: cservice@cprinting.com

© 2026 Carlisle Printing