---
title: "How to dump all databases for backup. Backup file is sql commands to recreate all db's."  
description: "How to dump all databases for backup. Backup file is sql commands to recreate all db's."  
author: "Andrew Deniel"  
published: 2013-06-08  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/1765/how-to-dump-all-databases-for-backup-backup-file-is-sql-commands-to-recreate-all-db-s  
category: "mysql"  
tags: ["mysql"]  
reading_time: 1 minute  

---

# How to dump all databases for backup. Backup file is sql commands to recreate all db's.

# [mysql dir]/bin/mysqldump -u root -ppassword --opt >/tmp/alldatabases.sql

## Answers

### Answer by Andrew Deniel

# [mysql dir]/bin/mysqldump -u root -ppassword --opt >/tmp/alldatabases.sql


---

Original Source: https://www.mindstick.com/interview/1765/how-to-dump-all-databases-for-backup-backup-file-is-sql-commands-to-recreate-all-db-s

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
