Description: Introduction
It is the basic, easy to use MySQL Backup/Restore utility.
Background
It is basically developed for non programmers. So, anyone can use it. The simplest tool for the job.
Using the code
Backup method takes two arguments, i.e, path to save the backup file and connection string.
Hide Copy Code
// Backup MySql
private void MySQLBackup(string path, string constring)
{
string file path+ txt_database.Text+ _ + DateTime.Now.ToString( yyyy-MM-dd_hh-mm-ss )+ .sql
using (MySqlConnection conn new MySqlConnection(constring))
{
using (MySqlCommand cmd new MySqlCommand())
{
using (MySqlBackup mb new MySqlBackup(cmd))
{
cmd.Connection conn
conn.Open()
mb.ExportToFile(file)
conn.Close()
}
}
}
}
Now to the restore method with the same two arguments
Hide Copy Code
// Restore MySQL(.sql) file to the
private void
To Search:
File list (Check if you may need any files):
MySQL Backup
............\MySQL Backup
............\............\App.config
............\............\bin
............\............\...\Debug
............\............\...\.....\mysql backup
............\............\...\.....\MySQL Backup.exe
............\............\...\.....\MySQL Backup.exe.config
............\............\...\.....\MySQL Backup.pdb
............\............\...\.....\MySQL Backup.vshost.exe
............\............\...\.....\MySQL Backup.vshost.exe.config
............\............\...\.....\MySQL Backup.vshost.exe.manifest
............\............\...\.....\MySql.Data.dll
............\............\...\.....\MySqlBackup.dll
............\............\...\Release
............\............\Main.cs
............\............\Main.Designer.cs
............\............\Main.resx
............\............\MySQL Backup.csproj
............\............\obj
............\............\...\Debug
............\............\...\.....\DesignTimeResolveAssemblyReferences.cache
............\............\...\.....\DesignTimeResolveAssemblyReferencesInput.cache
............\............\...\.....\MySQL Backup.csproj.FileListAbsolute.txt
............\............\...\.....\MySQL Backup.csproj.GenerateResource.Cache
............\............\...\.....\MySQL Backup.csprojResolveAssemblyReference.cache
............\............\...\.....\MySQL Backup.exe
............\............\...\.....\MySQL Backup.pdb
............\............\...\.....\MySQL_Backup.Main.resources
............\............\...\.....\MySQL_Backup.Properties.Resources.resources
............\............\...\.....\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
............\............\...\.....\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
............\............\...\.....\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
............\............\...\.....\TempPE
............\............\Program.cs
............\............\Properties
............\............\..........\AssemblyInfo.cs
............\............\..........\Resources.Designer.cs
............\............\..........\Resources.resx
............\............\..........\Settings.Designer.cs
............\............\..........\Settings.settings
............\MySQL Backup.sln
............\MySQL Backup.v12.suo