There are three ways to achieve the appropriate syntax highlighting:
Use the default syntax highlighting for the language associated with the tag attached to the question.
For example, supply no syntax highlighting hint when the question is tagged mysql which is associated with language "lang-sql"
Explicitly supply a syntax highlighting "lang" hint from the supported language values.
<!-- language: lang-sql -->
Explicitly supply a syntax highlighting "tag" hint that indirectly has a language associated with it.
<!-- language: mysql -->
For the answer you gave, any one of these three techniques would work but you mixed up the second and third techniques by combining the "lang-" prefix with the tag mysql, which works when tag and language names coincide, but not in this case.