Can JavaScript connect with MySQL? If so, how?
I think you would need to add something like PHP into the equation. PHP to interact with the database and then you could make AJAX calls with Javascript.