savedlema 17 Junior Poster

I have been using the code below to restore backups of mysql database taken utilizing the mysql dump for a few years, but suddenly, this does not restore database backups anymore. Is there any change within mysql?

Dim myProcess As New Process()
            myProcess.StartInfo.FileName = "cmd.exe"
            myProcess.StartInfo.UseShellExecute = False
            myProcess.StartInfo.CreateNoWindow = True
            myProcess.StartInfo.WorkingDirectory = "C:\Program Files\MySQL\MySQL Server 5.6\bin\"
            myProcess.StartInfo.RedirectStandardInput = True
            myProcess.StartInfo.RedirectStandardOutput = True
            Dim myStreamWriter As StreamWriter = myProcess.StandardInput
            Dim mystreamreader As StreamReader = myProcess.StandardOutput

            myStreamWriter.WriteLine("mysql -u " & dbuser & " -p" & dbpassword & " " & dbname & " < " & locationOfBackup & "")

Please note that the "& locationOfBackup" is a varialbe containing the location and the sql file name to be restore, no problem with this.
As I have pointed out, I have been able to restore backups with this until a few months ago. It now says backup restore was completed but there is actually nothing restored.

Server version: 5.6.22-log - MySQL Community Server (GPL)

Any help please?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.