title: Need assistance with accessing mysql database using node.js
body: <p>I am trying to run a simple node sample for access a mysql db and am getting the following error-Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'ubuntu.local' (using password: YES)</p>
  
  <pre><code>var mysql      = require('mysql');
  var connection = mysql.createConnection({
    host     : '192.168.0.12',
    user     : 'root',
    password : 'password',
    database : 'app'
  });
  
  connection.connect();
  
  connection.query('SELECT * from users', function(err, rows, fields) {
    if (err) throw err;
  
    console.log('The solution is: ', rows[0]);
  });
  
  connection.end();
  </code></pre>
  
  <p>The above is the code for accessing the mysql using node.js.Any suggestions as to what I may be doing wrong, thanks in advance.</p>