Saturday, April 12, 2025

Breaking News
>> Securing and encrypt View State and Cookies values  >> Page has one or more controls that do not correspond with   >> “The Controls collection cannot be modified because the control contains code blocks”  >> How to fix "Validation(): Element 'xxxx' is not supported  >> How to create a new session in ASP.NET programmatically  >> MySQL Database Backup using mysqldump command    

Editors Picks

Wednesday, October 31, 2012

MySQL Database Backup using mysqldump command



MySQL Database Backup using mysqldump command.
·          
MySQL provide a great command line utility to take backup of your MySQL database and restore it. mysqldump command line utility is available with MySQL installation (bin directory) that can be used to achieve this.
1. Getting backup of a MySQL database using mysqldump.
Use following command line for taking backup of your MySQL database using mysqldump utility.

mysqldump –u[user name] –h[hostname] –p[password] [database name] > [dump file]
Example:

   mysqldump –uroot –hlocalhost –prootpassword test > D:/test.sql


2. Restoring MySQL database.
The mysqldump utility is used only to take the MySQL dump. To restore the database from the dump file that you created in previous step, use mysql command.
mysql -u[username] –h[hostname] –p[Password] [database name] < [dump file]
Example:
mysql -uroot –hlocalhost -prootpassword test < D:/test.sql

Do you know the other uses of mysqldump utility?

1 comment :

Contact Us

Name

Email *

Message *