MySql dump restore from Run Dialog (not the cmd prompt)
I need to restore a mysqldump on a windows machine, which i perfectly know
how. But I need to do it via the Run Dialog in one GO.
So we open the Run Dialog and type : "[PathToMysql]\mysql.exe" -u
[someUser] -p[SomePass] [DatabaseName] < "[PathToDumpFile]"
If I execute the command inside the command prompt (cmd.exe), it works
perfectly. But if I run it directly from the Run Dialog, I get the list of
all mysql.exe options...
If I skip the (< "[PathToDumpFile]") part and execute the rest in the Run
Dialog, I end up with the mysql shell. So there is something in the last
part that the run dialog does not like but works in the cmd window.
Anybody has any experience with this or has an alternate suggestion?
If you wonder why from the Run Dialog, it's because it reacts the same as
a command sent through WMI, it's just faster to test that way. Since I'll
build the command dynamically to run on a remote server that could change
whenever, I'd rather not play with a batch file but I'll have to if what
I'm looking for proves impossible.
Thank you.
No comments:
Post a Comment