2012-05-24 108 views
0

使用我的mysql.exe要恢复一个简单的.SQL文件,我怎么能在VB.NET

MySQL服务器保护的密码,为一个远程主机

+1

http://catb.org/~esr/faqs/smart-questions.html – Lumi

回答

0

我用这个解决我的问题:

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()