Direct link between html5 and mysql
HTML alone will prevent you from connecting to mysql database. But yes, server side javascript can help you achieve what you are trying to do. There are node.js modules available to connect and query the mysql database. You need to install node.js and then you can write the backend in Javascript.
source to share
Well, you won't be able to directly connect to it using html5 as it works client side. This means that the code for html5 (most likely some form of javascript) will run on the client, but your mysql system is on a different server. Generally, you do not directly access the database on the Internet (security reasons).
On the other hand, as other posters have pointed out, you can run a javascript server. I'm not sure why you would want to do this, although php is probably a more powerful and more suitable tool for this type of operation.
You can do it with php though, as you mentioned. Check http://us3.php.net/manual/en/function.mysql-connect.php
source to share