您可以使用MysqLBackup.NET来帮助实现这一点:http://mysqlbackupnet.codeplex.com
string file = "C:\\backup.sql";
string conn = "server=localhost;user=root;pwd=qwerty;database=test;";
var mb = new MysqLBackup(conn);
mb.ExportInfo.FileName = file;
mb.ExportRows = false;
mb.ExportTableStructure = true;
mb.Export();