Linking MySQL database via JavaScript

You can connect to MySQL via a local script (Node.js, Python, VBS,…) that you call with XRun.

Or do it the other way: Have a local script e. g. Node.js run everything and start UIvision via the command line API.