title: How to access mysql database with socket.io
body: <p>I'm just getting into coding server side javascript and have been reading tutorials on socket.io and node.js, but I haven't come across anything demonstrating how to use node.js to access a mysql database.</p>
  
  <p>Say for instance I want to create a method that listens to a table in my database at
  mysql.something.com (with database: database, username: username, etc), how would
  I get socket.io with node.js to connect to that database and listen for new input to that table and then subsequently return that input?</p>
  
  <p>I'm wondering if anyone could give me a specific example that uses a publish subscribe model. </p>
  
  <p>Thanks for the help.</p>