hi all i know that to be able to bakckup with mysqldump i need to type

mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]

i was just wondering how can i pass that command from a windows app using c#

>i was just wondering how can i pass that command from a windows app using c#

Process class.

tried your suggestion but i just shows 2 command prompt windows and it doesnt execute the command heres my code

ProcessStartInfo startInfo = new ProcessStartInfo("cmd.exe");
startInfo.WindowStyle = ProcessWindowStyle.Minimized;
Process.Start(startInfo);
startInfo.Arguments = "mysqldump -u admin -p admin test > c:\backupfile.sql";
 Process.Start(startInfo);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.