title: ER_NOT_SUPPORTED_AUTH_MODE - MySQL server
body: <br>
  <h2>Failed at Connecting <code>Node.js Server</code> to <code>MySQL-Database</code></h2>
  <hr />
  <p>       
  I had <strong>MariaDB&quot;</strong> installed on a <strong>&quot;Node.js Server&quot;</strong>, but decided that I wanted to use a SQL Database instead. I uninstalled, and completely removed <strong>&quot;MariaDB&quot;</strong>, after which, I proceeded to install the <em>&quot;Community Ed.&quot; <strong>&quot;MySQL Database&quot;</strong>. After going through the entire *</em>'MySQL Setup Process'<em>**, I made several attempts to connect to the database via a JavaScript document that implemented the de facto code snippet for a JS DB Connection — <em>my DB-connection document is posted as a code snippet bellow</em> — shown in the code snippet bellow</em>. Disappointingly, the JS/SQL connection failed at each attempt.</p>
  <br>
  <br>
  <h4>Here is the Failed Connection Error Message that I received:</h4>
  <hr />
  <pre><code>
  &quot;ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication
  protocol requested by server. Consider upgrading MariaDB client.&quot;
  
  </code></pre>
  <p><br><br></p>
  <h4>JS/SQL Connection Snippet that I am using:</h4>
  <hr />
  <pre><code>
      var mysql = require('mysql');
      
      var connection = mysql.createConnection({
          host     : 'localhost',
          user     : 'root',
          password : '********',
          database : 'foobarDb'
      }); 
  
  </code></pre>