You probably want to connect the MySQL database and not the Workbench (which is a software providing UI to your server)...
In nay case you can not connect your database from the client (where the HTML page is) using JavaScript... You need some server side code (PHP is good, but can be any other too), that JavaScript can talk to and will provide data services...
This may be a good starting point:
PHP AJAX and MySQL[
^]