var mysql_pool = require('mysql');

/* MYSQL RDS */
// var pool  = mysql_pool.createPool({
// 	host     : 'sampledb.cy0fkl5xnx4r.us-west-1.rds.amazonaws.com',
// 	user     : 'root',
// 	password : 'rootroot',
// 	port     : '3306',
// 	database : 'sampledb',
// 	connectionLimit : '10'
// });

var mysql = require('mysql');
var dbconfig = require('/srv/www/sampledb/shared/config/opsworks.js');

var pool = mysql.createPool({
  host: dbconfig.db['host'],
  user: dbconfig.db['username'],
  password: dbconfig.db['password'],
  port: dbconfig.db['port'],
  database: dbconfig.db['database'],
  connectionLimit : '10'
});

/* LOCAL MYSQL CONNECTION*/
/*var pool  = mysql_pool.createPool({

	host     : 'localhost',
	user     : 'root',
	password : 'root',
	port     : '3306',
	database : 'users',
	connectionLimit : '10'
});
*/
exports.pool = pool;

@@ -45,19 +45,16 @@
  RDS */%0A
-// 
 var pool
@@ -81,19 +81,16 @@
 ePool(%7B%0A
-// 
 %09host   
@@ -146,19 +146,16 @@
 s.com',%0A
-// 
 %09user   
@@ -166,19 +166,16 @@
 'root',%0A
-// 
 %09passwor
@@ -190,19 +190,16 @@
 troot',%0A
-// 
 %09port   
@@ -210,19 +210,16 @@
 '3306',%0A
-// 
 %09databas
@@ -234,19 +234,16 @@
 pledb',%0A
-// 
 %09connect
@@ -262,16 +262,16 @@
 10'%0A
-// 
 %7D);%0A%0A
+// 
 var 
@@ -296,16 +296,19 @@
 ysql');%0A
+// 
 var dbco
@@ -371,16 +371,19 @@
 .js');%0A%0A
+// 
 var pool
@@ -404,16 +404,19 @@
 ePool(%7B%0A
+// 
   host: 
@@ -436,18 +436,21 @@
 host'%5D,%0A
+//
   
+ 
 user: db
@@ -472,18 +472,21 @@
 name'%5D,%0A
+//
   
+ 
 password
@@ -512,16 +512,19 @@
 word'%5D,%0A
+// 
   port: 
@@ -544,16 +544,19 @@
 port'%5D,%0A
+// 
   databa
@@ -584,16 +584,19 @@
 base'%5D,%0A
+// 
   connec
@@ -608,24 +608,27 @@
 imit : '10'%0A
+// 
 %7D);%0A%0A/* LOCA

Update mySqlConn.js