var mysql = require('mysql');
console.log('Get connection ...');
var conn = mysql.createConnection({
database: 'test',
host: "localhost",
user: "root",
password: "",
});
conn.connect(function(err) {
if (err) throw err;
console.log("Connected!");
});
console.log('111');
> node ./test.js
Get connection ...
111