mysqldump.exe not taking full backup of mysql database <p>I have a procedure for backing up MySQL database.And also i have different MySQL servers. This procedure works on some of MySQL servers.But on some of servers it won't works proper and create a backup file with the size of 1kb.</p> <h2>Code</h2> <pre><code>public void DatabaseBackup(string ExeLocation, string DBName) { try { string tmestr = ""; tmestr = DBName + "-" + DateTime.Now.ToString("hh.mm.ss.ffffff") + ".sql"; tmestr = tmestr.Replace("/", "-"); tmestr = "c:/" + tmestr; StreamWriter file = new StreamWriter(tmestr); ProcessStartInfo proc = new ProcessStartInfo(); string cmd = string.Format(@"-u{0} -p{1} -h{2} {3}", "uid", "pass", "host", DBName); proc.FileName = ExeLocation; proc.RedirectStandardInput = false; proc.RedirectStandardOutput = true; proc.Arguments = cmd; proc.UseShellExecute = false; proc.CreateNoWindow = true; Process p = Process.Start(proc); string res; res = p.StandardOutput.ReadToEnd(); file.WriteLine(res); p.WaitForExit(); file.Close(); } catch (IOException ex) { } } </code></pre> <p>Can any one tell me what is the problem and how can i solve it.</p>