title: Set up local database for use with Node.Js with Visual Studio
body: <p>I've been trying to learn Node.js recently, and I now want to access a database, which I use <a href="https://github.com/felixge/node-mysql" rel="nofollow">this</a> library for. Problem is that I want to create a database on my computer and connect to it from my node.js program, but I can't for my life figure out how this is done!</p>
  
  <p>In my solution I added a <strong>SQL Server Database Project</strong>, and tried to connect using this following string:</p>
  
  <pre><code>var connection = mysql.createConnection({
  host     : 'localhost',
  user     : 'me',
  password : 'secret',
  database : 'Database1'
  });
  </code></pre>
  
  <p>But I'm getting an exception saying <code>error connecting: Error: connect ECONNREFUSED 127.0.0.1:3306</code>, which is thrown by some timeout (which I figure is because of the database isn't visible or something?).
  So my question is how do I set this up so I can work with data in Visual Studio, without having to rent a server to host my database?
  I'm not even sure I'm using the right project-template for my database, but I cannot see any other type of it. From what I've read on the Internet I see that there usually is some other template you should use to create a database.</p>
  
  <p>I really don't know what to do, so any suggestions are welcomed.</p>