An Entrepreneur, Coach, IT Consultant, Strategic Adviser, and a Traveler craving to explore and contribute to forming a better society.

Tuesday, February 24, 2009

MySQLDUMP Taking Backup of Multiple Databases

No comments :
MySQLDUMP Taking Backup of Multiple Databases



To take backup of all mysql Databases on the same server without password

MySQL> mysqldump -u root --all-databases
To take backup of all databases on the same server with password
MySQL> mysqldump -u root -p password --all-databases
To take backup of all mysql databases from a different server without password

MySQL> mysqldump -h hostname_or_ip -u root --all-databases
To take backup of all mysql databases from a different server with password

MySQL> mysqldump -h hostname_or_ip -u root -p password --all-databases
To take backup of multiple databases on the same server without password

MySQL> mysqldump -u root --databases database1 database2 database3 ... databaseN
To take backup of multiple databases on the same server with password

MySQL> mysqldump -u root -p password --databases database1 database2 database3 ... databaseN
To take backup of multiple databases from a different server without password

MySQL> mysqldump -h hostname_or_ip -u root --databases database1 database2 database3 ... databaseN
To take backup of multiple databases from a different server with password

MySQL> mysqldump -h hostname_or_ip -u root -p password --databases database1 database2 database3 ... databaseN
To take backup of multiple databases including their routines, functions, store procedures

MySQL> mysqldump -h hostname_or_ip -u root -p password --databases database1 database2 database3 ... databaseN -R
-R --> this will include all the information about routines, stored procedures, functions
To take backup of multiple databases without "create database" statement

MySQL> mysqldump -h hostname_or_ip -u root -p password --databases database1 database2 database3 ... databaseN -n
-n -->  'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;' will not be put in the output. The above line will be added otherwise, if --databases or --all-databases option was given.}.
Keywords: MySQL, MySQL Database, MySQL Database Backup, Database Backup, Backup, MySQLDUMP

No comments :