Restoring Database.........

  • 13 years ago

    Hi, Guys

    I want to restore my mysql database through my programatically

    I have backed up my db in and also tried using mysql.exe to restore database

    But Not working Pls help me

    Thanks in Advance


  • 13 years ago


    I post something like this before here and in mysql web site and I didnt get help. Try this:


    Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

    Dim OpenFileDialog1 As New OpenFileDialog

    OpenFileDialog1.Title =

    "Database Recovery"

    OpenFileDialog1.Filter =

    "Backup Files(*.dmp)|*.dmp"

    OpenFileDialog1.FilterIndex = 1

    If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then



    """C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe"" --user=" & wContainer.Username & " --password=" & wContainer.Password & " --host=localhost < """ & OpenFileDialog1.FileName & """")


    "Database restored successfully", MsgBoxStyle.Information, "System information")

    Catch ex As Exception

    MsgBox(ex.Message, MsgBoxStyle.Critical,


    End Try

    End If

    End Sub

    Good luck.

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only two kinds of languages: the ones people complain about and the ones nobody uses” - Bjarne Stroustrup