
var mysql = require('mysql');
var hostname = "localhost";


exports.createConnection = function() {
    
    var connection = mysql.createConnection({
      host     : hostname,
      user     : 'me',
      password : 'secret',
    });

    connection.connect();
    return connection;
};

exports.getStatus = function(callback) {

    var connection = exports.createConnection();

    connection.query("SELECT Version()", function(err, rows, fields) {

        if (err) {
            callback(err.toString() + " (" + hostname + ")");
        } else {
            console.log("rows: " + rows);
            console.log("fields: " + fields);

            callback("connected (" + hostname + ")");
        }
    });

    connection.end();
};


@@ -190,18 +190,20 @@
      : '
-me
+root
 ',%0A     
@@ -219,16 +219,28 @@
  : '
-secret',
+',%0A      port: 13306
 %0A   
@@ -423,9 +423,9 @@
 ECT 
-V
+v
 ersi

fix default database connection string