back up and restore mysql database c#
问题 I am looking for a way how I can via c# back up some database from mysql (file backup). And also via c# restore database from backup file to some new location. Can you help me with some ideas how to get started here . Thanks. 回答1: ProcessStartInfo startInfo = new ProcessStartInfo("cmd.exe"); Process.Start(startInfo); startInfo.Arguments = "mysqldump -u admin -p admin test > c:\backupfile.sql"; Process.Start(startInfo); You can hide the dos prompt with startInfo.WindowStyle if you need. 回答2: