求助,mysql数据库备份,急!!!
请各位高手来帮帮我,我用.net备份mysql数据库,下面是我的代码文件能创建,可只是个空文件,里面什么东西都没有,非常感谢string user = "root";
string password = "321";
string database = "db_v13";
string fileName = database + "_bak_" + DateTime.Now.ToString("yyyyMMddhhmmss");
string bakPath = @"d:" + "\\" + fileName + ".sql";
string cmdStr = "/c mysqldump --opt -u "+ user +" -p="+ password +" "+ database +">" + bakPath;
try
{
System.Diagnostics.Process.Start("cmd", cmdStr);
}
catch (Exception)
{
}