#" is not the character to start a comment in SQL, but "
#" is the character to the end of the line in MySQL.
If you are a Vimmer and only use MySQL when you edit
.sql files, you may want to regard the characters after
.sql files are regarded as just SQL in Vim, but you can specify them as MySQL. Just to write the following one line on
autocmd BufRead,BufNewFile *.sql set filetype=mysql