简体   繁体   中英

How to Decrypt, incryptdumpfile in mysql using C# (MySqlBackup.dll)

I want to Decrypt the Mysql Incrypted dump file with mysqlbackup.dll. I use bc.DecryptDumpFile() but this show error "Incorrect password or corrupted context" How to decrypt this file

MySqlBackup bc = new MySqlBackup();
bc.DecryptDumpFile(Application.StartupPath + "//POS_Assistant - 24-Jul-19.dll", Application.StartupPath + "//POS.sql", "Rehman92");

Maybe the below code helps:

   private void DecryptDumpFile()
    {
        string oldDumpFile = "C:\\backup.sql";
        string newDumpFile = "C:\\backup_new.sql";
        MySqlBackup mb = new MySqlBackup();
        mb.EnableEncryption = true;
        mb.EncryptionKey = "qwerty";
        mb.DecryptSqlDumpFile(oldDumpFile, newDumpFile);
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM