As I follow from the documentation, The import command in its most basic form is:
mysql.exe < example.sql
It works when I run it from the command line in Windows. But it doesn't work when I start the process mysql.exe with < example.sql parameters. For example, creating a shortcut and setting its path to mysql.exe < example.sql doesn't work and it only prints the help info for mysql.exe.
As a side note, I first noticed this problem when trying to run the following C# code:
new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "mysql.exe",
Arguments = "< example.sql",
}
}.Start();
< example.sqlare not parameters formysql.exe, the<denotes a redirection operator, so the content of fileexample.sqlis redirected intomysql.exe; I guess you have to change the file name tocmd.exeand the arguments to/C "mysql.exe < example.sql"; consider to specify full absolute paths to all of the files...mysql.exe. Also you can turn your comment into answer. It answers my question.mysql.exe. Just wait a minute to get my comment converted to an answer...