title: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
body: <p><strong>Problem in mysql used in nodejs</strong></p>
  
  <pre><code>const mysql      = require('mysql');
  var connection = mysql.createConnection({
    host     : 'localhost',
    user     : 'root',
    password : '123456789',
    database : 'userdata'
  });
  
  connection.connect(function(err) {
    if (err) {
      console.error('error connecting: ' + err);
      return;
    }
  
   console.log('connected as id ' + connection.threadId);
  });
  </code></pre>
  
  <p><strong>Error</strong>: <strong>ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client</strong></p>