It's very simple to make a mysqldump in cmd
on windows, simply:
Open cmd
and put type mysqldump uroot ppassword database > c:/data.sql
This results in an SQL dump file for the desired database.
I'm writing a console application so I may run this command:
-uroot -ppass databse > locationdata.sql
I tried the following code to no avail:
System.Diagnostics.ProcessStartInfo procStartInfo =
new System.Diagnostics.ProcessStartInfo("cmd", "/c " + cmd);
How might I start a cmd
process and send my command successfully?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…