Hey guys, Im trying to restore a backup using mysql.exe. When I do it by the cmd it works fine, using this line
But on VB .Net is does not work, this is the code I use
It show the cmd window, but I believe theres something wrong with the arguments because it shows me the list of valid arguments but I cant find whats wrong.
I hope some1 could help me.
Thanks!
"C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin\mysql.exe" --host=localhost --port=3306 --user=root --password=PASSWORD < "C:\Users\Frehley\Desktop\Control de Stock\Stock\backup.sql"
But on VB .Net is does not work, this is the code I use
Clave = txtClave.Text
Database = txtDatabase.Text
Host = txtHost.Text
Puerto = txtPuerto.Text
User = txtUser.Text
Dim back As String = Application.StartupPath & "\backup.sql"
Dim mysqlll As String = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) & "\MySQL\MySQL Server 5.0\bin\mysql.exe"
Process.Start(mysqlll, "--host=" & Host & " --port=" & Puerto & " --user=" & User & " --password=" & Clave & " < """ & back & """")
It show the cmd window, but I believe theres something wrong with the arguments because it shows me the list of valid arguments but I cant find whats wrong.
I hope some1 could help me.
Thanks!