4 examples for mysqldump

{{ score }}
  # Backup data and the structure from a database to a .sql file
mysqldump -u [user] -p[password] [database_name] > file.sql
        
{{ score }}
  # Backup data and the structure from many tables in a database to a .sql file
mysqldump -u user -p database_name table_1 table_2 table_3 > file_name.sql
        
{{ score }}
  # Backup data and the structure from a table in a database to a .sql file
mysqldump -u username -p database_name table_name > file_name.sql
        
{{ score }}
  # Respaldar una BD y comprimirlo con gzip
mysqldump -A | gzip > database_backup.gz