var mysql = require('mysql'); var connection = mysql.createConnection({ host : 'localhost', user : 'root', password : 'root', database : 'xzjwt1211' }); connection.connect(); var sql = 'SELECT * from t_site'; connection.query(sql, function (err, results, fields) { if (err){ console.log('[select error - ', err.message); return; } console.log(results[0].remark); });