If I am not running Retool locally, is it still possible to connect to a MySQL database running locally on my machine with a static IP address?
Yes sure, if you got public IP of course
Yup, if your db is "publicly" accessible (once you whitelist the Retool IPs), then Retool can connect!
Typically Retool won't connect to APIs hosted on localhost (see our docs here). The workaround here is to use ngrok which will expose your local webserver on a public url: https://ngrok.com/ or try using https://localtunnel.github.io/www/. I encourage you to look into whether these options are secure enough for your purposes.
Let me know if you have any other questions