Ошибка отказано в доступе - mysqlbackup n windows
After read this https://www.codeproject.com/Articles/256466/MySqlBackup-NET#features I have instaalled from NuGet Install-Package MySqlBackup.NET -Version 2.1.0 MySql.Data and MySqlBackup are present on Reference The project is Windows.Form on Win10
Что я уже пробовал:
private void Backup() { string constring = "server=localhost; Database=db_catalogo; Uid=root; Pwd=test;"; constring += "charset=utf8;convertzerodatetime=true;"; string file = "D:\\backup.sql"; using (MySqlConnection conn = new MySqlConnection(constring)) { using (MySqlCommand cmd = new MySqlCommand()) { using (MySqlBackup mb = new MySqlBackup(cmd)) { cmd.Connection = conn; conn.Open(); mb.ExportInfo.AddCreateDatabase = true; mb.ExportInfo.ExportTableStructure = true; mb.ExportInfo.ExportRows = false; mb.ExportToFile(file); // ???? Access Denied // // the backup.sql directory is created // and not the file backup.sql conn.Close(); } } } }
<\код>