title: Get the location of a MySQL restore database file
body: <p>I have a VB.NET project with a MySQL database.
  I want to restore my backup database file. I've got a code working but I the user to enter the file path through an <code>OpenfileDialog</code>.</p>
  
  <p>Here is my code:</p>
  
  <pre class="lang-vb prettyprint-override"><code>restoreDirectory = OpenFileDialog1.FileName.ToString()
  Dim myProcess As New Process()
  myProcess.StartInfo.FileName = "cmd.exe"
  myProcess.StartInfo.UseShellExecute = False
  myProcess.StartInfo.WorkingDirectory = "C:\wamp\bin\mysql\mysql5.5.20\bin\"
  myProcess.StartInfo.RedirectStandardInput = True
  myProcess.StartInfo.RedirectStandardOutput = True
  myProcess.Start()
  Dim myStreamWriter As StreamWriter = myProcess.StandardInput
  Dim mystreamreader As StreamReader = myProcess.StandardOutput
  myStreamWriter.WriteLine("mysql -u root  mssa &lt; " &amp; restoreDirectory &amp; " ")
  myStreamWriter.Close()
  myProcess.WaitForExit()
  myProcess.Close()
  </code></pre>
  
  <p>I'm sure I get the correct path of the file, but it is not working. Am I missing something?</p>