external data from php mysql
jquery includes ajax calls you can make to a server hosting a php CGI to get the data. If you are using php to generate your JS, you could just generate the page with the data embedded (the ajax method is infinitely better).
Marcel Wijnberger commented
would be very nice to have. also some more (for dummies like me) documentation on how to connect to mysql database using php