In mySQL, I shouldn't use semicolon when runing a source command. Why? I'm learning SQL by myself. I've set up a mySQL server, and I was trying to import the sakila example database, and the textbook I'm using states that for that effect I should use source pathway; and end it with a semicolon. This is consistent with the initial warning at the top of the client MySQL command prompt.
However, I get several errors.
So, someone recommended me to run the command without the semicolon. When I run it , everything works just fine.
Why is that?
Semilcolon is use to signalize to MySQL that the command has ended.
But in your case it is interpreted as part of the file name, and there it is forbidden to use semicolons. see https://en.wikipedia.org/wiki/Filename