Dim Proc As New Process
proc.StartInfo.FileName = "cmd.exe"
proc.StartInfo.CreateNoWindow = True
proc.StartInfo.WorkingDirectory = "D:\MY\bin"
MsgBox(0)
proc.StartInfo.UseShellExecute = False
proc.StartInfo.RedirectStandardInput = True
proc.StartInfo.RedirectStandardOutput = True
proc.StartInfo.RedirectStandardError = True
proc.Start()
'proc.Standardlnput.WriteLine("mysql -uroot -proot")
MsgBox(1)
proc.StandardInput.WriteLine("t33")
MsgBox(2)
Dim s As String = FileSys.ReadAllText("D:\BF\t33-5.sql")
For Each s1 As String In s.replace(vbcr, "").split(vblf)
proc.StandardInput.WriteLine(s1)
Next
proc.Close()
MsgBox(3)
上面代码:还原MYSQL数据库,执行没报错,但也没有还原,如何解决?
[此贴子已经被作者于2024/3/11 16:27:26编辑过]