This is the code I wrote on command line:
mysql --user=root --password=root mydb --default-character-set=utf8 -e "set @arg1='[1002,2003,3304]';source run.sql"
However, it throws me this error:
ERROR at line 1: Unknown command '\U'
I have tested if I remove set statement like this and run:
mysql --user=root --password=root mydb --default-character-set=utf8 -e "source run.sql"
The run script file executes.I know I can open the SQL file and change the source code to void this, but this problem is really annoying.
Could anyone have any suggestions to solve this?
Use ;
at the end:
... -e "set @arg1='[1002,2003,3304]';source run.sql;"
or change source
by \.
:
... -e "set @arg1='[1002,2003,3304]';\. run.sql"