Just to explain a bit more, the command line runs from left-to-right, except in the case of redirection of input. So, the reason your first one didn't work is because that was taking the OUTPUT of mysql and sending it to sed, as well as trying to redirect input to sed from file 'WAR.sql'.
In the second case, you're using file redirection on mysql, except you're giving it a command (sed, in this case), which meant that the shell probably tried to open a [non-existent] file named 'sed' in the current directory. The next input redirection probably just confused it if the shell even got that far in parsing.
I believe (and voted for) the answer from gbacon as the simplest solution to achieve what I think you want.