There are a few free/try-ware products out there that will allow you to connect to a MySQL database or just paste in the script to validate it. Google is your friend here.
Mimer will check ANSI-Standard syntax validation but probably not handle any MySQL specifics.