Using MySQL on Windows, is there a way to specify the input file name when restoring using MYSQLIMPORT.EXE or MYSQL.EXE other than using < inputfile ?
在Windows上使用MySQL,有没有办法在使用MYSQLIMPORT.EXE或MYSQL.EXE进行恢复时使用
For example, MYSQLDUMP.EXE has the --result-file (or -r) parameter. I cannot find an equivalent input file parameter for MYSQLIMPORT.EXE or MYSQL.EXE.
例如,MYSQLDUMP.EXE具有--result-file(或-r)参数。我找不到MYSQLIMPORT.EXE或MYSQL.EXE的等效输入文件参数。
Is < inputfile the only way to do that?
Thanks.
谢谢。
2 个解决方案
#1
0
Apparently it is easy. Just specify the input file as the last parameter of the command line, e.g.,
显然很容易。只需将输入文件指定为命令行的最后一个参数,例如,
mysqlimport -uUser -p ... input.txt
#2
0
This works: C:> mysql -e "source batch-file"
这有效:C:> mysql -e“source batch-file”
More here: https://dev.mysql.com/doc/refman/5.6/en/batch-mode.html
更多信息:https://dev.mysql.com/doc/refman/5.6/en/batch-mode.html
#1
0
Apparently it is easy. Just specify the input file as the last parameter of the command line, e.g.,
显然很容易。只需将输入文件指定为命令行的最后一个参数,例如,
mysqlimport -uUser -p ... input.txt
#2
0
This works: C:> mysql -e "source batch-file"
这有效:C:> mysql -e“source batch-file”
More here: https://dev.mysql.com/doc/refman/5.6/en/batch-mode.html
更多信息:https://dev.mysql.com/doc/refman/5.6/en/batch-mode.html