Reputation: 2224
I have database that is big 42GB (and I need all tables), Two tables have more than 10gb.
When i do :
mysqldump -h host -u username -ppassword dbname > export.sql
Server in most cases crash, or I get message after some duration "MySQL server has gone away".
I use docker with nginx, ubuntu 16.04, php...
Upvotes: 0
Views: 458
Reputation: 1997
To dump the database and gzip it at the same time, use the following. This will prompt you for your password.
mysqldump -u [USERNAME] -p [DBNAME] | gzip > [/path_to_file/DBNAME].sql.gz
Upvotes: 1