我想恢复一个简单的 .SQL 文件,
MySQL 服务器受密码保护,是远程主机
我用这个解决了我的问题:
Dim proc As New Process
proc.StartInfo.FileName = "cmd.exe"
proc.StartInfo.UseShellExecute = False
'Don’t show command prompt window.
proc.StartInfo.CreateNoWindow = True
proc.StartInfo.Arguments = "/K bin\mysql.exe -h " & db_host_int & " -u " & db_user_int & " -p" & db_password_int & " " & db_database_int & " < bin/DB_SCHEMA.sql"
proc.Start()
'Time in milliseconds, can change value to wait.
proc.WaitForExit(1000)
proc.Close()