Query syntax is checked at java level or Database Level?
Two different things probably:


Syntax is checked in MySQL server. There may be connectors/client libraries which would do the parsing and checking before sending it, but it would only mean doing the same work twice. MySQL server receives query as string and then processes it. Even for prepared statements server receives statement as text and compiles it.
SQLException is probably extended Java Exception, which is purely Java side construct (generally as part of JDBC code). So this exception is thrown by Java MySQL client library when it sends your query and instead of data, server returns some error message. Client and server communicate by socket or tcp, so there is no way how server could throw exception directly to client. It has to signalize error by some other means (probably different response packet type or something similar)