node.js - Create pool using connection string nodejs mysql -


i have been looking way use mysql connection string create pool rather using credentials, can use connection string azure application settings, far not find solution.

i can create pool way:

pool = mysql.createpool({     connectionlimit: 20,     host: host,     user: user,     password: password,     database: database,     debug: false }); 

but want achieve this:

pool = mysql.createpool(process.env.mysqlconnstr_connectionstring); 

i using module felixge/node-mysql.

i trying connection string provided azure mysql db in format:

database=database;data source=host;user id=userid;password=password 

but turns out format not supported , worked when used this:

mysql://userid:password@host/database 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -