I want to create mysql database backup using c#. But this code do some problem because in my database i used "latin1_swedish_ci" thats why after export localize data convert into this form "مرسلی".
try
{
string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
using (MySqlConnection conn = new MySqlConnection(con))
{
using (MySqlCommand cmd = new MySqlCommand())
{
using (MySqlBackup mb = new MySqlBackup(cmd))
{
cmd.Connection = conn;
conn.Open();
mb.ExportToFile(path + "\\backup.sql");
conn.Close();
}
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}