title: Create pool using connection string nodejs mysql
body: <p>I have been looking for a way to use mysql connection string to create a pool rather than using the credentials, this is so I can use the connection string from azure application settings, but so far could not find a solution.</p>
  
  <p>I can create a pool this way:</p>
  
  <pre><code>pool = mysql.createPool({
      connectionLimit: 20,
      host: HOST,
      user: USER,
      password: PASSWORD,
      database: DATABASE,
      debug: false
  });
  </code></pre>
  
  <p>But what I want to achieve is something like this:</p>
  
  <pre><code>pool = mysql.createPool(process.env.MYSQLCONNSTR_connectionstring);
  </code></pre>
  
  <p>I am using the module <a href="https://www.npmjs.com/package/mysql" rel="nofollow">felixge/node-mysql</a>.</p>