Forrest logo
tool overview
On this page you find all important commands for the CLI tool mysqldump. If the command you are looking for is missing please ask our AI.

mysqldump

The mysqldump client utility performs logical backups, producing a set of SQL statements that can be executed to reproduce the original database object definitions and table data. It dumps one or more MySQL databases for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, or XML format.

List of commands for mysqldump:

  • mysql:database:schema:export:without-data Export MySQL database schema without exporting its data
    $ mysqldump -h ${host_name_or_ip} -u ${username} -p --no-data dbname > ${output_sql_file_path}
    try on your machine
    explain this command
  • mysqldump:backup:with-password Create a backup (user will be prompted for a password).
    $ mysqldump --user ${user} --password ${database_name} --result-file=${filename-sql}
    try on your machine
    explain this command
  • mysqldump:tldr:15c71 mysqldump: Backup all databases from a remote host, redirecting the output to a file (user will be prompted for a password).
    $ mysqldump --host=${ip_or_hostname} --user ${user} --password --all-databases > ${filename-sql}
    try on your machine
    explain this command
  • mysqldump:tldr:71d28 mysqldump: Backup a specific table redirecting the output to a file (user will be prompted for a password).
    $ mysqldump --user ${user} --password ${database_name} ${table_name} > ${filename-sql}
    try on your machine
    explain this command
  • mysqldump:tldr:d144e mysqldump: Backup all databases redirecting the output to a file (user will be prompted for a password).
    $ mysqldump --user ${user} --password --all-databases > ${filename-sql}
    try on your machine
    explain this command
  • sql:warp:b962f Dump a MySQL database into a file
    $ mysqldump -u ${user_name} -p ${db_name} > ${file_name}
    try on your machine
    explain this command
tool overview