I think you'll need to download the
MySQL ODBC Connector for this to work. (The MySQL site is going quite slow atm, I don't know why)
Once you've set up a data source from the administration tools, it's much like connecting to any other database.
Hopefully someone else will be able to give you some JScript examples - I've only ever used this from Visual Basic