Header-Text-Box-Right

we have developed this blog to share my existing knowledge which I had gained in last 10+ years in IT. It is difficult to write all our knowledge on this blog but, still we am trying to put all our learning to this blog so, all the ideas will be shared.......

Thursday, August 13, 2009

How to take back up of my sql database using C#

downloadYou can also download running code.

Taking a back up of my sql using C# is very easy but this also be termed as tricky backup. Like Sql server my sql does not provide built in stored procedures to take back up. For back up my sql use a Exe file named “mysqldump.exe”

You will find this Exe file in “C:\Program Files\MySQL\MySQL Server 5.0\bin” folder of mySql.

This file takes so many parameters for different options. But my task is to simply take a backup of single database

To take a backup of single database following are the parameters

mysqldump -u<usernane> -p <password> -h<servername or ip> <databasename> > <localtion to take backup>

Please let me know if this helps you to perform your task easily.

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | cheap international calls